ponydos/Makefile

48 lines
981 B
Makefile
Raw Permalink Normal View History

2022-02-11 16:16:49 +00:00
NASM = nasm
2023-03-11 15:49:55 +00:00
PYTHON = python3
QEMU = qemu-system-i386
2022-02-11 16:16:49 +00:00
BUILDOPTS =
2022-02-11 16:16:49 +00:00
.SUFFIXES:
2023-03-22 17:22:49 +00:00
.SUFFIXES: .bin .asm .ans .wall
2022-02-11 16:16:49 +00:00
2023-03-11 15:49:55 +00:00
all: ponydos.img
2022-02-11 16:16:49 +00:00
2023-03-27 10:00:48 +00:00
FS_FILES = shell.bin ponydos.wall passion.wall viewer.bin hello.bin memory.bin ponydos.asm
2023-03-17 23:05:32 +00:00
ponydos.img: ponydos.bin $(FS_FILES)
$(PYTHON) assemble_floppy.py $@ ponydos.bin $(FS_FILES)
2022-02-11 16:16:49 +00:00
ponydos.inc: ponydos.asm ponydos_static.inc
$(NASM) -fbin -d SYMBOLS -o /dev/null ponydos.asm | $(PYTHON) extract_symbols.py $@ ponydos_static.inc
2023-03-19 17:28:30 +00:00
ponydos.bin: ponydos_static.inc
2023-03-18 13:55:53 +00:00
shell.bin: ponydos.inc
hello.bin: ponydos.inc
2023-03-27 13:58:08 +00:00
viewer.bin: ponydos.inc
memory.bin: ponydos.inc
2022-02-11 16:16:49 +00:00
.asm.bin:
$(NASM) -fbin $(BUILDOPTS) -o $@ $<
2022-02-11 16:16:49 +00:00
2023-03-22 17:22:49 +00:00
.ans.wall:
env BUILDOPTS='$(BUILDOPTS)' $(PYTHON) process_wallpaper.py $@ $< 7 0 0 0
2023-03-11 15:49:55 +00:00
run: ponydos.img
$(QEMU) -drive file=$<,index=0,if=floppy,format=raw
2023-03-11 15:49:55 +00:00
2022-02-11 16:16:49 +00:00
clean:
2023-03-22 17:22:49 +00:00
rm -f *.bin *.img *.wall ponydos.inc
2022-02-11 16:16:49 +00:00
distclean: clean
size: ponydos.asm
2023-03-18 14:01:12 +00:00
@$(NASM) -fbin -d SIZE -o /dev/stdout ponydos.asm | wc -c
.PHONY: all run clean distclean size