1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-10-30 12:03:52 -04:00
kernel/Makefile

21 lines
314 B
Makefile
Raw Normal View History

2017-11-01 00:43:42 -04:00
CCPREFIX = i686-elf-
AS = $(CCPREFIX)as
CC = $(CCPREFIX)gcc
OBJS = boot.s.o main.c.o
all: kernel
clean:
rm kernel $(OBJS)
kernel: $(OBJS)
$(CC) -T linker.ld -o $@ -ffreestanding -nostdlib -O2 -lgcc $(OBJS)
%.c.o: %.c
$(CC) -c $< -o $@ -std=c99 -ffreestanding -O2 -Wall -Wextra
%.s.o: %.s
$(AS) $< -o $@