aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2021-12-02 23:20:27 -0700
committerChristian Cunningham <cc@localhost>2021-12-02 23:20:27 -0700
commit7b88542a9894954f1427e2409cf8bbe27ba4133b (patch)
tree7dd73e76caafefe8f9c3512ac8a6e532b1b94d5d
parent733a45d82e84de894be0c3d29b3305219827f448 (diff)
Added Make guards
-rw-r--r--Win.mk6
1 files changed, 6 insertions, 0 deletions
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