toaruos/Makefile

22 lines
500 B
Makefile

.PHONY: all clean install
all: kernel
install: kernel
mount bootdisk.img /mnt -o loop
cp kernel /mnt/kernel
umount /mnt
cp kernel /boot/toaruos-kernel
kernel: start.o link.ld main.o vga.o gdt.o idt.o isrs.o irq.o timer.o kbd.o kprintf.o
ld -m elf_i386 -T link.ld -o kernel *.o
%.o: %.c
gcc -Wall -m32 -O0 -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o $@ $<
start.o: start.asm
nasm -f elf -o start.o start.asm
clean:
rm -f *.o kernel