diff options
author | dzwdz | 2022-08-15 20:48:23 +0200 |
---|---|---|
committer | dzwdz | 2022-08-15 20:48:23 +0200 |
commit | 3e80780859c4cbe5223ca4329bfd6176f5c2c879 (patch) | |
tree | 92f42d2720d84434276c5382f1b43b8d73124827 /Makefile | |
parent | fa082df2da6b3be52c66ce0d48c209a3df38115d (diff) |
kernel: port to multiboot2
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -25,7 +25,7 @@ endif define from_sources - $(patsubst src/%,out/obj/%.o,$(shell find $(1) -type f,l -name '*.[cs]')) + $(patsubst src/%,out/obj/%.o,$(shell find $(1) -type f,l -name '*.[csS]')) endef @@ -68,8 +68,8 @@ out/fs/boot/kernel: src/kernel/linker.ld \ $(call from_sources, src/shared/) @mkdir -p $(@D) @$(CC) $(LFLAGS) -T $^ -o $@ - @grub-file --is-x86-multiboot $@ || echo "$@ has an invalid multiboot header" - @grub-file --is-x86-multiboot $@ || rm $@; test -e $@ + @grub-file --is-x86-multiboot2 $@ || echo "$@ has an invalid multiboot2 header" + @grub-file --is-x86-multiboot2 $@ || rm $@; test -e $@ out/libc.a: $(call from_sources, src/user/lib/) \ $(call from_sources, src/shared/) @@ -117,6 +117,10 @@ out/obj/%.s.o: src/%.s @mkdir -p $(@D) @$(AS) $^ -o $@ +out/obj/%.S.o: src/%.S + @mkdir -p $(@D) + @$(CC) -c $^ -o $@ + out/obj/shared/%.c.o: src/shared/%.c @mkdir -p $(@D) @$(CC) $(KERNEL_CFLAGS) -fPIC -c $^ -o $@ |