nor86/Makefile

29 lines
450 B
Makefile
Raw Normal View History

FLOPPY = 1440
2021-06-28 18:33:23 +00:00
.SUFFIXES:
.SUFFIXES: .bin .asm
2021-06-28 19:58:11 +00:00
all: nor86.img
2021-06-30 17:41:37 +00:00
nor86.img: bootsect.bin kernel.bin CC0 README.md
2021-06-28 19:58:11 +00:00
rm -f $@
mkdosfs -C $@ $(FLOPPY)
2021-06-30 17:41:37 +00:00
rw -i bootsect.bin -o $@
2021-06-30 17:35:07 +00:00
mcopy -i $@ CC0 ::
mcopy -i $@ README.md ::
2021-06-28 19:58:11 +00:00
mcopy -i $@ kernel.bin ::
2021-06-28 18:33:23 +00:00
.asm.bin:
nasm -fbin -d F$(FLOPPY) -o $@ $<
nasm -MD $@.d -d F$(FLOPPY) -fbin -o $@ $<
2021-06-28 18:33:23 +00:00
clean:
2021-06-28 20:00:50 +00:00
rm -f *.bin *.img *.bin.d
2021-06-28 18:33:23 +00:00
2021-06-28 19:58:11 +00:00
run: nor86.img
2021-06-28 18:33:23 +00:00
qemu-system-i386 -fda $<
.PHONY: all clean run
2021-06-28 20:00:50 +00:00
include *.d