rdos/Makefile

20 lines
508 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.rom
kernel.rom: kernel/*.asm
nasm -s -o $@ -I kernel kernel/main.asm && ./fix-rom.sh $@
2019-03-25 09:51:37 +01:00
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 $<
fdimage.img: boot/floppy.bin kernel.rom
2019-03-31 15:22:24 +02:00
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 ::
mcopy -i $@ kernel.rom ::kernel.rom
clean:
rm -f *.com *.bin *.rom *.img boot/*.bin