init
This commit is contained in:
commit
aef04e7ac5
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
build
|
||||
obj
|
36
Makefile
Normal file
36
Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
NAME := bozOS
|
||||
|
||||
CC := gcc
|
||||
CFLAGS := -Wall -Wextra -Werror
|
||||
|
||||
LD := $(CC)
|
||||
LDFLAGS :=
|
||||
|
||||
SRC := $(shell find src -name '*.c')
|
||||
OBJ := $(patsubst src/%.c,obj/%.o,$(SRC))
|
||||
|
||||
all: $(NAME)
|
||||
|
||||
obj/%.o: src/%.c
|
||||
mkdir -p $(dir $@)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(NAME): $(OBJ)
|
||||
mkdir -p build
|
||||
$(LD) $(LDFLAGS) -o build/$(NAME).bin $(OBJ)
|
||||
|
||||
debug: fast-iso
|
||||
qemu-system-i386 -s -S -cdrom build/$(NAME).iso -vga std -D qemu.log -d in_asm,int -M smm=off
|
||||
|
||||
clean:
|
||||
rm -rf obj
|
||||
|
||||
fclean: clean
|
||||
rm -rf build
|
||||
|
||||
re:
|
||||
$(MAKE) fclean
|
||||
$(MAKE) all
|
||||
|
||||
.PHONY: all clean fclean re
|
||||
-include $(DEP)
|
9
src/main.c
Normal file
9
src/main.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int ac, char **av)
|
||||
{
|
||||
(void)ac;
|
||||
(void)av;
|
||||
printf("PING TA MERE\n");
|
||||
return 1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user