From 7b88542a9894954f1427e2409cf8bbe27ba4133b Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Thu, 2 Dec 2021 23:20:27 -0700 Subject: Added Make guards --- Win.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Win.mk b/Win.mk index 94e0b3f..0446c22 100644 --- a/Win.mk +++ b/Win.mk @@ -29,24 +29,30 @@ endif default: clean build/kernel7.img build/kernel7.img: build/kernel.elf + @mkdir -p $(@D) ${OBJCOPY} $< -O binary $@ build/kernel.list: build/kernel-g.elf + @mkdir -p $(@D) ${OBJDUMP} -D $< > $@ build/kernel-g.elf: ${A_OBJECTD} ${C_OBJECTD} + @mkdir -p $(@D) ${CC} -T linker.ld -o $@ ${CFLAGS} $^ -lgcc build/kernel.elf: ${A_OBJECTD} ${C_OBJECTD} + @mkdir -p $(@D) ${CC} -T linker.ld -o $@ -ffreestanding -O2 -nostdlib $^ -lgcc export: build/kernel.list cp build/kernel-g.elf /mnt/c/Local/ obj/%.co: src/%.c + @mkdir -p $(@D) ${CC} ${CFLAGS} -c $< -o $@ obj/%.ao: src/%.S + @mkdir -p $(@D) ${AS} ${AFLAGS} -c $< -o $@ run: build/kernel.elf -- cgit v1.2.1