mirror of
https://github.com/limine-bootloader/limine
synced 2025-01-09 14:22:03 +03:00
41 lines
549 B
Makefile
41 lines
549 B
Makefile
|
CC = gcc
|
||
|
LD = ld
|
||
|
|
||
|
CFLAGS = -O2 -pipe -Wall -Wextra
|
||
|
|
||
|
INTERNAL_CFLAGS = \
|
||
|
-m16 \
|
||
|
-ffreestanding \
|
||
|
-nostdlib \
|
||
|
-masm=intel \
|
||
|
-fno-pic \
|
||
|
-mno-sse \
|
||
|
-mno-sse2 \
|
||
|
-ffreestanding \
|
||
|
-fno-stack-protector \
|
||
|
-I.
|
||
|
|
||
|
LDFLAGS =
|
||
|
|
||
|
INTERNAL_LDFLAGS = \
|
||
|
-m elf_i386 \
|
||
|
-nostdlib \
|
||
|
-Tlinker.ld
|
||
|
|
||
|
.PHONY: all clean
|
||
|
|
||
|
C_FILES := $(shell find ./ -type f -name '*.c')
|
||
|
OBJ := $(C_FILES:.c=.o)
|
||
|
|
||
|
all: qloader2.bin
|
||
|
|
||
|
qloader2.bin: $(OBJ)
|
||
|
$(LD) $(LDFLAGS) $(INTERNAL_LDFLAGS) $(OBJ) -o $@
|
||
|
|
||
|
%.o: %.c
|
||
|
$(CC) $(CFLAGS) $(INTERNAL_CFLAGS) -c $< -o $@
|
||
|
|
||
|
clean:
|
||
|
rm -f $(OBJ)
|
||
|
|