rnd/src/Makefile

45 lines
1.5 KiB
Makefile
Raw Normal View History

2020-05-03 07:14:23 +00:00
PGM=rnd
2020-05-04 05:09:29 +00:00
BASE_DSK=../storage/prodos-2.0.3-boot.dsk
2020-05-03 07:14:23 +00:00
# It is necessary to use this older version of AppleCommander to support
# the PowerBook G4 and iBook G3. This version only requires Java 1.3.
2020-05-04 05:09:29 +00:00
AC=java -jar ../lib/AppleCommander-1.3.5-ac.jar
2020-05-26 05:23:54 +00:00
AS65=java -cp ../lib/dev65.jar uk.co.demon.obelisk.w65xx.As65
LK65=java -cp ../lib/dev65.jar uk.co.demon.obelisk.w65xx.Lk65
2020-05-03 07:14:23 +00:00
SRC=$(PGM).s
VOL=$(PGM)
DSK=$(PGM).dsk
APPLEWIN_VER=1.29.10.0
2020-05-09 07:13:21 +00:00
TO_REMOVE=$(PGM).bin $(PGM).lst $(PGM).map $(DSK) _FileInformation.txt $(PGM).obj *~
2020-05-03 07:14:23 +00:00
ifeq ($(OS),Windows_NT)
COPY=copy
2020-05-09 07:13:21 +00:00
remove=for %%f in $(1) do if exist %%f del %%f
2020-05-03 07:14:23 +00:00
EMU=$(USERPROFILE)\Dropbox\opt\applewin-$(APPLEWIN_VER)\applewin.exe -no-printscreen-dlg -s7 empty -s6d1
else
COPY=cp
2020-05-09 07:13:21 +00:00
remove=for f in $(1); do if [ -f $$f ]; then rm $$f; fi; done
2020-05-05 03:57:47 +00:00
EMU=wine $(HOME)/Dropbox/opt/applewin-$(APPLEWIN_VER)/applewin -no-printscreen-dlg -s7 empty -s6d1
2020-05-03 07:14:23 +00:00
endif
# There is some kind of problem with turning this into a boot disk
# after it is created by AppleCommander. So, copy an existing boot
# disk instead.
#$(AC) -pro140 $(DSK) $(VOL)
$(DSK): $(PGM)
$(COPY) $(BASE_DSK) $(DSK)
2020-05-05 03:57:47 +00:00
#$(AC) -p $(DSK) STARTUP BAS < ../storage/STARTUP#fc0801
$(AC) -p $(DSK) $(PGM) BIN 0x8000 < $(PGM).bin
2020-05-03 07:14:23 +00:00
$(PGM): $(PGM).obj
2020-05-05 03:57:47 +00:00
$(LK65) -code '$$8000-$$9000' -bin $(PGM).obj
2020-05-03 07:14:23 +00:00
2020-05-04 05:09:29 +00:00
# as65 does not exit with a non-zero code so that make can detect when it failed.
2020-05-03 07:14:23 +00:00
$(PGM).obj: symbols.s macros.s $(SRC)
2020-05-04 05:09:29 +00:00
$(AS65) $(SRC) 2>&1 | tee as65-output.txt && [ ! -s as65-output.txt ]
2020-05-03 07:14:23 +00:00
test: $(DSK)
$(EMU) $(DSK)
clean:
2020-05-26 05:23:54 +00:00
$(call remove,$(TO_REMOVE))