aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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