2011-01-16 04:01:19 +03:00
|
|
|
.PHONY: all clean install
|
|
|
|
|
|
|
|
all: kernel
|
|
|
|
|
|
|
|
install: kernel
|
|
|
|
mount bootdisk.img /mnt -o loop
|
|
|
|
cp kernel /mnt/kernel
|
|
|
|
umount /mnt
|
|
|
|
|
2011-01-16 06:11:17 +03:00
|
|
|
kernel: start.o link.ld main.o vga.o gdt.o idt.o
|
2011-01-16 04:59:11 +03:00
|
|
|
ld -m elf_i386 -T link.ld -o kernel *.o
|
2011-01-16 04:01:19 +03:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
gcc -Wall -m32 -O -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
|