rulimine/test/Makefile

20 lines
642 B
Makefile
Raw Normal View History

CC = cc
CFLAGS = -O2
2021-03-02 20:39:39 +03:00
LD = cc
QEMU = qemu-system-x86_64
QEMUFLAGS = -m 1G -enable-kvm -cpu host
2021-04-15 05:32:49 +03:00
LDINTERNALFLAGS := -Tlinker.ld -nostdlib -pie -static-pie -fno-pic -fpie -z max-page-size=0x1000
INTERNALCFLAGS := -I../stivale -I. -ffreestanding -fno-stack-protector \
2021-04-15 05:32:49 +03:00
-fno-pic -fpie -fomit-frame-pointer -mno-red-zone -mgeneral-regs-only -masm=intel
2021-03-02 20:39:39 +03:00
all: test.elf
2021-03-02 20:39:39 +03:00
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 $@
clean:
2021-03-04 07:30:31 +03:00
rm -rf test.elf stivale.o stivale2.o e9print.o