blob: 7383c59c2e00b3ab3c213784dee0a02ca861766a [file] [log] [blame]
swissChilid8137922021-02-17 15:34:07 -08001SOURCES = boot.o main.o descriptor_tables.o mem.o vga.o gdt_flush.o idt.o interrupts.o
2CFLAGS = -nostdlib -nostdinc -fno-builtin -fno-stack-protector -ffreestanding -m32 -O2 -g
3LDFLAGS = -Tlink.ld -melf_i386
4ASMFLAGS = -felf
5
6kernel.elf: $(SOURCES)
7 ld $(LDFLAGS) -o $@ $^
8
9clean:
10 rm -f *.o *.bin *.elf
11
12qemu: install
13 qemu-system-i386 -monitor stdio ../bin/bluejay.iso
14
15.s.o:
16 nasm $(ASMFLAGS) $<
17
18install: kernel.elf
19 cp kernel.elf ../boot/
20 grub-mkrescue -o ../bin/bluejay.iso ..
21
22.PHONY: install qemu clean