summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordzwdz2022-07-23 20:46:13 +0200
committerdzwdz2022-07-23 20:46:13 +0200
commit0228be3fd404cdebecf6d21b8964f6063f12dfbe (patch)
tree4ae0dd75eb17ee1b62a791260f8bead647f17f48
parent7d21dabdddcc55a76f9f5633a61c8fb34b2d99d8 (diff)
compile everything except user_bootstrap as PIC
-rw-r--r--Makefile16
1 files 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)