This commit is contained in:
2025-05-11 16:51:18 +02:00
commit aef04e7ac5
3 changed files with 47 additions and 0 deletions

36
Makefile Normal file
View 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)