29 lines
450 B
Makefile
29 lines
450 B
Makefile
FLOPPY = 1440
|
|
|
|
.SUFFIXES:
|
|
.SUFFIXES: .bin .asm
|
|
|
|
all: nor86.img
|
|
|
|
nor86.img: bootsect.bin kernel.bin CC0 README.md
|
|
rm -f $@
|
|
mkdosfs -C $@ $(FLOPPY)
|
|
rw -i bootsect.bin -o $@
|
|
mcopy -i $@ CC0 ::
|
|
mcopy -i $@ README.md ::
|
|
mcopy -i $@ kernel.bin ::
|
|
|
|
.asm.bin:
|
|
nasm -fbin -d F$(FLOPPY) -o $@ $<
|
|
nasm -MD $@.d -d F$(FLOPPY) -fbin -o $@ $<
|
|
|
|
clean:
|
|
rm -f *.bin *.img *.bin.d
|
|
|
|
run: nor86.img
|
|
qemu-system-i386 -fda $<
|
|
|
|
.PHONY: all clean run
|
|
|
|
include *.d
|