1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-12-04 11:34:42 -05:00
kernel/src/Makefile

21 lines
314 B
Makefile
Raw Normal View History

2017-11-01 00:53:54 -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 $@