nor86/Makefile

35 lines
599 B
Makefile
Raw Permalink Normal View History

2021-07-04 20:45:50 +00:00
FLOPPY = 360
2021-06-28 18:33:23 +00:00
.SUFFIXES:
.SUFFIXES: .bin .asm
2021-06-28 19:58:11 +00:00
all: nor86.img
nor86.img: boot.bin nor86.krn CC0 README.md
2021-06-28 19:58:11 +00:00
rm -f $@
mkdosfs -C $@ $(FLOPPY)
rw -i boot.bin -o $@
2021-06-30 17:35:07 +00:00
mcopy -i $@ CC0 ::
mcopy -i $@ README.md ::
2021-07-04 20:48:29 +00:00
mcopy -i $@ *.asm ::
mcopy -i $@ *.inc ::
mcopy -i $@ nor86.krn ::
nor86.krn: kernel.asm
nasm -fbin -d F$(FLOPPY) -o $@ $<
nasm -MD $@.d -d F$(FLOPPY) -fbin -o $@ $<
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-07-04 20:35:27 +00:00
rm -f *.bin *.img *.bin.d *.krn *.krn.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