diff Makefile @ 2:19eac734a518

Makefile to actually build something with initial start to ROM init code
author William Astle <lost@l-w.ca>
date Thu, 03 Nov 2022 21:18:51 -0600
parents
children f9ec351dd82b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Thu Nov 03 21:18:51 2022 -0600
@@ -0,0 +1,47 @@
+.PHONY: all
+all: bin/lwbasic.rom bin/lwbasic-coco2b.rom bin/lwbasic-coco3.rom bin/coco2.zip bin/coco2b.zip bin/coco3.zip
+
+bin/lwbasic.rom: src/lwbasic.s
+	lwasm --raw --list=src/lwbasic.list --symbols --output=bin/lwbasic.rom src/lwbasic.s
+bin/lwbasic-coco2b.rom: src/lwbasic.s
+	lwasm --raw --list=src/lwbasic-coco2b.list --symbols --output=bin/lwbasic-coco2b.rom -DCOCO2B=1 src/lwbasic.s
+bin/lwbasic-coco3.rom: src/lwbasic.s
+	lwasm --raw --list=src/lwbasic-coco3.list --symbols --output=bin/lwbasic-coco3.rom -DCOCO3=1 src/lwbasic.s
+
+.PHONY: clean
+clean:
+	rm -f bin/*.rom bin/*.zip
+	rm -f src/*.list
+	rm -f */*~ *~
+
+bin/coco2.zip: bin/lwbasic.rom
+	mkdir -p coco2
+	rm -f coco2/* coco2.zip
+	dd if=bin/lwbasic.rom of=coco2/extbas11.rom bs=1024 count=8
+	dd if=bin/lwbasic.rom of=coco2/bas12.rom bs=1024 count=8 skip=8
+	dd if=bin/lwbasic.rom of=coco2/disk11.rom bs=1024 count=16 skip=16
+	zip bin/coco2.zip coco2/extbas11.rom coco2/bas12.rom coco2/disk11.rom
+	rm -rf coco2
+
+bin/coco2b.zip: bin/lwbasic-coco2b.rom
+	mkdir -p coco2b
+	rm -f coco2b/* coco2b.zip
+	dd if=bin/lwbasic-coco2b.rom of=coco2b/extbas11.rom bs=1024 count=8
+	dd if=bin/lwbasic-coco2b.rom of=coco2b/bas13.rom bs=1024 count=8 skip=8
+	dd if=bin/lwbasic-coco2b.rom of=coco2b/disk11.rom bs=1024 count=16 skip=16
+	zip bin/coco2b.zip coco2b/extbas11.rom coco2b/bas13.rom coco2b/disk11.rom
+	rm -rf coco2b
+
+bin/coco3.zip: bin/lwbasic-coco3.rom
+	mkdir -p coco3
+	rm -f coco3/* coco3.zip
+	dd if=bin/lwbasic-coco3.rom of=coco3/coco3.rom bs=1024 count=32
+	dd if=/dev/null of=coco3/disk11.rom bs=1024 count=8
+	zip bin/coco3.zip coco3/coco3.rom coco3/disk11.rom
+	rm -rf coco3
+
+.PHONY: mame2
+mame2: bin/coco2.zip
+	mame coco2 -skip_gameinfo -rompath ./bin
+mame2d: bin/coco2.zip
+	mame coco2 -skip_gameinfo -rompath ./bin -debug