1 src = $(wildcard src/*.asm)
2 data = data/sprsheet.inc
5 QEMU_FLAGS = -fda floppy.img -serial file:serial.log -soundhw sb16 -d guest_errors
10 bootldr: src/boot/boot.asm $(bin)
11 nasm -o $@ -f bin -DBINSIZE=`ls -l $(bin) | awk '{print $$5}'` $<
13 $(bin): $(src) $(data)
14 nasm -o $@ -f bin -i src/ src/main.asm
16 boot.img: bootldr $(bin)
20 dd of=$@ if=/dev/zero bs=512 count=2880
21 dd of=$@ if=$< bs=1 conv=notrunc
23 data/sprsheet.inc: data/sprsheet.png
24 img2tiles -o $@ -n -t 32x32 $<
28 rm -f $(bin) bootldr floppy.img boot.img
31 disasm: bootldr.disasm $(bin).disasm
33 bootldr.disasm: bootldr
34 ndisasm -b 16 -o 7c00h $< >$@
37 ndisasm -b 16 -o 7e00h $< >$@
41 qemu-system-i386 $(QEMU_FLAGS)
45 qemu-system-i386 $(QEMU_FLAGS) -s -S