all:
	make bootdisk.bin
bootdisk.bin: 512.bin gdt.bin boot.bin
	-rm bootdisk.bin
	touch bootdisk.bin
	dd if=512.bin of=bootdisk.bin count=1 seek=0
	dd if=gdt.bin of=bootdisk.bin count=1 seek=1
	dd if=boot.bin of=bootdisk.bin count=1 seek=3
512.bin: 512.asm
	-rm 512.bin
	nasm -f bin 512.asm -o 512.bin
gdt.bin: gdt.asm
	-rm gdt.bin	
	nasm -f bin gdt.asm -o gdt.bin
boot.bin: boot.o
	gcc -ffreestanding -c boot.c -o boot.o
	ld -o boot.bin -Ttext 0x0 -e main --oformat binary boot.o
