@@ -17,6 +17,7 @@ FUJINET_LIB_VERSION_DIR = $(FUJINET_LIB)/$(FUJINET_LIB_VERSION)-$(TARGETS)
1717# Name of the final, single-file executable.
1818# Default: name of the current dir with target name appended
1919PROGRAM := config
20+ DISK := dist.apple2/autorun.po
2021
2122# Path(s) to additional libraries required for linking the program
2223# Use only if you don't want to place copies of the libraries in SRCDIR
@@ -256,7 +257,7 @@ ASFLAGS += --asm-include-dir src/$(TARGETLIST)/asminc --asm-include-dir $(FUJINE
256257CFLAGS += --include-dir $(FUJINET_LIB_VERSION_DIR) -DUSING_FUJINET_LIB
257258
258259.SUFFIXES:
259- .PHONY: all test clean get_fujinet_lib zap love
260+ .PHONY: all test clean get_fujinet_lib zap love dist autorun
260261
261262all: get_fujinet_lib $(PROGRAM)
262263
@@ -344,24 +345,29 @@ test: $(PROGRAM)
344345 $(EMUCMD) $<
345346 $(POSTEMUCMD)
346347
347- dist: $(PROGRAM)
348- cp dist.apple2/bootable.po dist.apple2/dist.po
349- ./dist.apple2/add-file.sh dist.apple2/dist.po config config.system
348+ $(DISK): $(PROGRAM)
349+ cp dist.apple2/bootable.po $@
350+ ./dist.apple2/add-file.sh $@ config config.system
351+
352+ dist: $(DISK)
350353 @( \
351- echo "Attempting to copy autorun.po to firmware folder outside of project" ; \
354+ echo "Attempting to copy $(DISK) to firmware folder outside of project" ; \
352355 if [ -d ../fujinet-firmware/ ] ; then \
353356 echo "Copying into ../fujinet-firmware" ; \
354- cp dist.apple2/dist.po ../fujinet-firmware/data/webui/device_specific/BUILD_APPLE/autorun.po ; \
357+ cp dist.apple2/dist.po ../fujinet-firmware/data/webui/device_specific/BUILD_APPLE/$(DISK) ; \
355358 elif [ -d ../fujinet-platformio/ ] ; then \
356359 echo "Copying into ../fujinet-platformio (NOTE: please consider renaming to updated fujinet-firmware name)" ; \
357- cp dist.apple2/dist.po ../fujinet-platformio/data/webui/device_specific/BUILD_APPLE/autorun.po ; \
360+ cp dist.apple2/dist.po ../fujinet-platformio/data/webui/device_specific/BUILD_APPLE/$(DISK) ; \
358361 else \
359- echo "ERROR: Could not find fujinet firmware folder to copy autorun.po to." ; \
362+ echo "ERROR: Could not find fujinet firmware folder to copy $(DISK) to." ; \
360363 echo "Tried ../fujinet-firmware, and ../fujinet-platformio" ; \
361364 exit 1 ; \
362365 fi ; \
363366 )
364367
368+ # Just here so all platforms can have a `make autorun`
369+ autorun: $(DISK)
370+
365371gendebug: $(PROGRAM)
366372 @echo "Generating debug.scr script for AppleWin"
367373 @echo 'echo "Loading symbols"' > debug.scr
0 commit comments