From 3e80780859c4cbe5223ca4329bfd6176f5c2c879 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 15 Aug 2022 20:48:23 +0200 Subject: kernel: port to multiboot2 --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 58f4dcb..3b78aa0 100644 --- a/Makefile +++ b/Makefile @@ -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 $@ -- cgit v1.2.3