rdos/Makefile

20 lines
481 B
Makefile
Raw Normal View History

2019-03-31 15:22:24 +02:00
FD_CYLINDERS = 40
FD_HEADS = 2
FD_SECTORS = 9
default: kernel.com
2019-03-31 15:22:24 +02:00
kernel.bin: kernel/*.asm
2019-03-25 09:51:37 +01:00
nasm -s -o $@ -I kernel kernel/main.asm
2019-03-31 15:22:24 +02:00
boot/%.bin: boot/%.asm
2019-03-25 09:51:37 +01:00
nasm -s -o $@ -I lib $<
2019-03-31 15:22:24 +02:00
fdimage.img: boot/floppy.bin kernel.bin
dd if=/dev/zero bs=512 count=$$(( $(FD_CYLINDERS) * $(FD_HEADS) * $(FD_SECTORS) )) of=$@
mformat -i $@ -t $(FD_CYLINDERS) -h $(FD_HEADS) -n $(FD_SECTORS) -B boot/floppy.bin ::
2019-03-31 22:53:33 +02:00
mcopy -i $@ kernel.bin ::boot.bin
clean:
2019-03-31 15:22:24 +02:00
rm -f *.com *.bin *.img boot/*.bin