Added Makefile to simplify builds

This commit is contained in:
Luxferre
2022-08-06 13:35:10 +03:00
parent 62b84f735b
commit 00bdae06da
3 changed files with 34 additions and 11 deletions
+21
View File
@@ -0,0 +1,21 @@
# Equi reference implementation build project
PROJNAME=equi
CFILES=equi.c
PBTDIR=platform-build-tools
desktopcc:
cc -std=c89 -Os -o $(PROJNAME) $(CFILES)
strip $(PROJNAME)
tcc:
tcc -std=c89 -o $(PROJNAME) $(CFILES)
apple2-build:
cl65 --standard c89 -O -Os -t apple2 -o $(PROJNAME).apple2 $(CFILES)
apple2: apple2-build
cp $(PBTDIR)/apple2/tpl.dsk equi.dsk
java -jar $(PBTDIR)/apple2/ac.jar -p $(PROJNAME).dsk $(PROJNAME).system sys < $$(cl65 --print-target-path)/apple2/util/loader.system
java -jar $(PBTDIR)/apple2/ac.jar -as $(PROJNAME).dsk $(PROJNAME) bin < $(PROJNAME).apple2
rm *.o *.apple2