mirror of
https://github.com/limine-bootloader/limine
synced 2024-12-04 22:22:24 +03:00
41 lines
900 B
Makefile
41 lines
900 B
Makefile
CC = cc
|
|
CFLAGS = -O2
|
|
LDFLAGS =
|
|
LD = ld
|
|
QEMU = qemu-system-x86_64
|
|
QEMUFLAGS = -m 1G -enable-kvm -cpu host
|
|
|
|
INTERNALLDFLAGS := \
|
|
-Tlinker.ld \
|
|
-nostdlib \
|
|
-zmax-page-size=0x1000 \
|
|
-static \
|
|
-pie \
|
|
--no-dynamic-linker \
|
|
-ztext
|
|
|
|
INTERNALCFLAGS := \
|
|
-I../stivale \
|
|
-I. \
|
|
-std=gnu11 \
|
|
-ffreestanding \
|
|
-fno-stack-protector \
|
|
-fno-pic -fpie \
|
|
-mno-80387 \
|
|
-mno-mmx \
|
|
-mno-3dnow \
|
|
-mno-sse \
|
|
-mno-sse2 \
|
|
-mno-red-zone
|
|
|
|
all: test.elf
|
|
|
|
test.elf: stivale.o stivale2.o e9print.o memory.o
|
|
$(LD) $^ $(LDFLAGS) $(INTERNALLDFLAGS) -o $@
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) $(INTERNALCFLAGS) -c $< -o $@
|
|
|
|
clean:
|
|
rm -rf test.elf stivale.o stivale2.o e9print.o memory.o
|