From 7d8758d6435bd39ed65ba2be4115853d84ef55a2 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Tue, 2 Mar 2021 18:39:39 +0100 Subject: [PATCH] Further Makefile fixes --- test/Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/test/Makefile b/test/Makefile index f1c2e32f..93f22179 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,19 +1,17 @@ -TARGET := test.elf - CC = cc CFLAGS = -O2 -LD = ld +LD = cc QEMU = qemu-system-x86_64 QEMUFLAGS = -m 1G -enable-kvm -cpu host -LDINTERNALFLAGS := -Tlinker.ld -nostdlib -pie -z max-page-size=0x1000 +LDINTERNALFLAGS := -Tlinker.ld -nostdlib -fpie -z max-page-size=0x1000 INTERNALCFLAGS := -I../stivale -I. -ffreestanding -fno-stack-protector \ -fpic -fpie -fomit-frame-pointer -mno-red-zone -mno-80387 -mno-mmx -mno-3dnow -mno-sse \ -mno-sse2 -masm=intel -all: $(TARGET) +all: test.elf -$(TARGET): stivale.o stivale2.o e9print.o - $(LD) $(LDINTERNALFLAGS) stivale.o stivale2.o e9print.o -o $@ +test.elf: stivale.o stivale2.o e9print.o + $(LD) $(LDINTERNALFLAGS) stivale.o stivale2.o e9print.o -o test.elf %.o: %.c $(CC) $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@