make apple2 disk builder Unix compatible

Make the Makefile-dsk.mk work in Windows and Unix (Linux/MacOS)
This commit is contained in:
StewBC 2020-01-20 16:43:59 -08:00
parent df70999561
commit e8b0f56b1d
1 changed files with 21 additions and 14 deletions

View File

@ -1,14 +1,21 @@
DSK = cc65-Chess.dsk
# For this one, see https://applecommander.github.io/
AC ?= ac.jar
REMOVES += $(DSK)
.PHONY: dsk
dsk: $(DSK)
$(DSK): cc65-Chess.apple2
copy apple2\template.dsk $@
java -jar $(AC) -p $@ chess.system sys < $(shell cl65 --print-target-path)\apple2\util\loader.system
java -jar $(AC) -as $@ chess bin < cc65-Chess.apple2
DSK = cc65-Chess.dsk
# For this one, see https://applecommander.github.io/
AC ?= ac.jar
# Unix or Windows
ifeq ($(shell echo),)
CP = cp $1
else
CP = copy $(subst /,\,$1)
endif
REMOVES += $(DSK)
.PHONY: dsk
dsk: $(DSK)
$(DSK): cc65-Chess.apple2
$(call CP, apple2/template.dsk $@)
java -jar $(AC) -p $@ chess.system sys < $(shell cl65 --print-target-path)/apple2/util/loader.system
java -jar $(AC) -as $@ chess bin < cc65-Chess.apple2