forked from offtopia/ponydos
Wolfgang Müller
2e78130f67
This way users can specify which backend to use without having to change the Makefile itself.
45 lines
926 B
Makefile
45 lines
926 B
Makefile
NASM = nasm
|
|
PYTHON = python3
|
|
QEMU = qemu-system-i386
|
|
|
|
.SUFFIXES:
|
|
.SUFFIXES: .bin .asm .ans .wall
|
|
|
|
all: ponydos.img
|
|
|
|
FS_FILES = shell.bin ponydos.wall passion.wall viewer.bin hello.bin memory.bin ponydos.asm
|
|
|
|
ponydos.img: ponydos.bin $(FS_FILES)
|
|
$(PYTHON) assemble_floppy.py $@ ponydos.bin $(FS_FILES)
|
|
|
|
ponydos.inc: ponydos.asm ponydos_static.inc
|
|
$(NASM) -fbin -d SYMBOLS -o /dev/null ponydos.asm | $(PYTHON) extract_symbols.py $@ ponydos_static.inc
|
|
|
|
ponydos.bin: ponydos_static.inc
|
|
|
|
shell.bin: ponydos.inc
|
|
|
|
hello.bin: ponydos.inc
|
|
|
|
viewer.bin: ponydos.inc
|
|
|
|
memory.bin: ponydos.inc
|
|
|
|
.asm.bin:
|
|
$(NASM) -fbin -o $@ $<
|
|
|
|
.ans.wall:
|
|
$(PYTHON) process_wallpaper.py $@ $< 7 0 0 0
|
|
|
|
run: ponydos.img
|
|
$(QEMU) -drive file=$<,index=0,if=floppy,format=raw
|
|
|
|
clean:
|
|
rm -f *.bin *.img *.wall ponydos.inc
|
|
|
|
distclean: clean
|
|
|
|
size: ponydos.asm
|
|
@$(NASM) -fbin -d SIZE -o /dev/stdout ponydos.asm | wc -c
|
|
|
|
.PHONY: all run clean distclean size
|