diff --git a/Makefile-dsk.mk b/Makefile-dsk.mk index 86a4f7d..7cfd28c 100644 --- a/Makefile-dsk.mk +++ b/Makefile-dsk.mk @@ -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