|
|
@ -1,3 +1,6 @@ |
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
|
|
|
|
CFLAGS = -fno-pie -m32 -Os -ffreestanding
|
|
|
|
|
|
|
|
|
|
|
|
C_SOURCES = $(wildcard kernel/*.c drivers/*.c lib/*.c)
|
|
|
|
C_SOURCES = $(wildcard kernel/*.c drivers/*.c lib/*.c)
|
|
|
|
HEADERS = $(wildcard kernel/*.h drivers/*.h lib/*.h)
|
|
|
|
HEADERS = $(wildcard kernel/*.h drivers/*.h lib/*.h)
|
|
|
|
OBJ = $(C_SOURCES:.c=.o)
|
|
|
|
OBJ = $(C_SOURCES:.c=.o)
|
|
|
@ -27,7 +30,7 @@ kernel.bin: kernel/kernel_entry.o kernel/enable_paging.o $(OBJ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%.o : %.c ${HEADERS} |
|
|
|
%.o : %.c ${HEADERS} |
|
|
|
gcc -fno-pie -m32 -Os -ffreestanding -c $< -o $@
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
|
|
|
|
%.o : %.asm |
|
|
|
%.o : %.asm |
|
|
|
nasm $< -f elf -o $@
|
|
|
|
nasm $< -f elf -o $@
|
|
|
|