From 0228be3fd404cdebecf6d21b8964f6063f12dfbe Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 23 Jul 2022 20:46:13 +0200 Subject: compile everything except user_bootstrap as PIC --- Makefile | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index f1b6ce3..8d5c261 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ check: $(shell find src/kernel/ -type f -name *.c) @echo $^ | xargs -n 1 sparse $(CFLAGS) $(SPARSEFLAGS) clean: - rm -rv out/ + rm -r out/ out/boot.iso: out/fs/boot/kernel.bin out/fs/boot/grub/grub.cfg out/fs/boot/init @@ -100,19 +100,11 @@ out/obj/%.s.o: src/%.s out/obj/%.c.o: src/%.c @mkdir -p $(@D) - @$(CC) $(CFLAGS) -c $^ -o $@ - -out/obj/user/%.c.o: src/user/%.c - @mkdir -p $(@D) - @$(CC) $(CFLAGS) -fPIE -c $^ -o $@ - -out/obj/usertestelf.c.o: src/usertestelf.c - @mkdir -p $(@D) - @$(CC) $(CFLAGS) -fPIE -c $^ -o $@ + @$(CC) $(CFLAGS) -fPIC -c $^ -o $@ -out/obj/shared/%.c.o: src/shared/%.c +out/obj/user_bootstrap/%.c.o: src/user_bootstrap/%.c @mkdir -p $(@D) - @$(CC) $(CFLAGS) -fPIC -c $^ -o $@ + @$(CC) $(CFLAGS) -c $^ -o $@ out/obj/kernel/arch/amd64/32/%.c.o: src/kernel/arch/amd64/32/%.c @mkdir -p $(@D) -- cgit v1.2.3