34 lines
599 B
Makefile
34 lines
599 B
Makefile
FLOPPY = 360
|
|
|
|
.SUFFIXES:
|
|
.SUFFIXES: .bin .asm
|
|
|
|
all: nor86.img
|
|
|
|
nor86.img: boot.bin nor86.krn CC0 README.md
|
|
rm -f $@
|
|
mkdosfs -C $@ $(FLOPPY)
|
|
rw -i boot.bin -o $@
|
|
mcopy -i $@ CC0 ::
|
|
mcopy -i $@ README.md ::
|
|
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 $@ $<
|
|
|
|
.asm.bin:
|
|
nasm -fbin -d F$(FLOPPY) -o $@ $<
|
|
nasm -MD $@.d -d F$(FLOPPY) -fbin -o $@ $<
|
|
|
|
clean:
|
|
rm -f *.bin *.img *.bin.d *.krn *.krn.d
|
|
|
|
run: nor86.img
|
|
qemu-system-i386 -fda $<
|
|
|
|
.PHONY: all clean run
|
|
|
|
include *.d
|