2022-02-11 16:16:49 +00:00
|
|
|
NASM = nasm
|
2023-03-11 15:49:55 +00:00
|
|
|
PYTHON = python3
|
2023-03-27 15:07:52 +00:00
|
|
|
QEMU = qemu-system-i386
|
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
|
|
|
|
2023-03-19 18:49:03 +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
|
|
|
|
2023-03-19 18:49:03 +00:00
|
|
|
ponydos.bin: ponydos_static.inc
|
2023-03-18 13:55:53 +00:00
|
|
|
|
|
|
|
shell.bin: ponydos.inc
|
|
|
|
|
2023-03-22 22:41:12 +00:00
|
|
|
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 -o $@ $<
|
|
|
|
|
2023-03-22 17:22:49 +00:00
|
|
|
.ans.wall:
|
2023-03-19 17:28:30 +00:00
|
|
|
$(PYTHON) process_wallpaper.py $@ $< 7 0 0 0
|
2023-03-11 15:49:55 +00:00
|
|
|
|
|
|
|
run: ponydos.img
|
2023-03-27 15:07:52 +00:00
|
|
|
$(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
|
|
|
|
|
2023-03-18 12:23:32 +00:00
|
|
|
size: ponydos.asm
|
2023-03-18 14:01:12 +00:00
|
|
|
@$(NASM) -fbin -d SIZE -o /dev/stdout ponydos.asm | wc -c
|
2023-03-18 12:23:32 +00:00
|
|
|
|
|
|
|
.PHONY: all run clean distclean size
|