2018-08-21 13:58:28 +00:00
|
|
|
#
|
|
|
|
# 4cade Makefile
|
|
|
|
# assembles source code, optionally builds a disk image and mounts it
|
2018-11-07 23:56:39 +00:00
|
|
|
# note: Windows users should probably use winmake.bat instead
|
2018-08-21 13:58:28 +00:00
|
|
|
#
|
|
|
|
# original by Quinn Dunki on 2014-08-15
|
|
|
|
# One Girl, One Laptop Productions
|
|
|
|
# http://www.quinndunki.com/blondihacks
|
|
|
|
#
|
|
|
|
# adapted by 4am on 2018-08-19
|
|
|
|
#
|
|
|
|
|
|
|
|
DISK=4cade.2mg
|
2018-08-23 20:02:48 +00:00
|
|
|
VOLUME=A.4AM.PACK
|
2018-08-21 13:58:28 +00:00
|
|
|
|
|
|
|
# third-party tools required to build
|
2019-09-19 14:47:04 +00:00
|
|
|
|
2018-08-21 13:58:28 +00:00
|
|
|
# https://sourceforge.net/projects/acme-crossass/
|
|
|
|
ACME=acme
|
2019-09-15 21:55:16 +00:00
|
|
|
|
2019-09-19 14:47:04 +00:00
|
|
|
# https://github.com/sicklittlemonkey/cadius
|
|
|
|
# version 1.4.0 or later
|
|
|
|
CADIUS=cadius
|
2019-09-15 02:57:52 +00:00
|
|
|
|
2018-08-21 13:58:28 +00:00
|
|
|
dsk: md asm
|
2019-08-23 17:59:22 +00:00
|
|
|
cp res/blank.2mg build/"$(DISK)" >>build/log
|
2018-09-13 13:53:04 +00:00
|
|
|
cp res/_FileInformation.txt build/ >>build/log
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/LAUNCHER.SYSTEM" >>build/log
|
2019-08-18 19:34:15 +00:00
|
|
|
cp res/attract.conf build/ATTRACT.CONF >>build/log
|
|
|
|
cp res/dfx.conf build/DFX.CONF >>build/log
|
|
|
|
cp res/fx.conf build/FX.CONF >>build/log
|
|
|
|
cp res/games.conf build/GAMES.CONF >>build/log
|
2018-11-18 16:18:42 +00:00
|
|
|
cp res/prefs.conf build/PREFS.CONF >>build/log
|
2019-07-10 17:37:59 +00:00
|
|
|
cp res/credits.txt build/CREDITS >>build/log
|
2019-09-21 00:57:23 +00:00
|
|
|
bin/padto.sh 512 build/PREFS.CONF
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "res/TITLE" >>build/log
|
|
|
|
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "res/COVER" >>build/log
|
2019-09-26 17:46:13 +00:00
|
|
|
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "res/HELP" >>build/log
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/PREFS.CONF" >>build/log
|
2019-08-18 19:34:15 +00:00
|
|
|
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/GAMES.CONF" >>build/log
|
|
|
|
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/ATTRACT.CONF" >>build/log
|
|
|
|
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/FX.CONF" >>build/log
|
|
|
|
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/DFX.CONF" >>build/log
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFILE build/"$(DISK)" "/$(VOLUME)/" "build/CREDITS" >>build/log
|
2019-02-09 01:48:07 +00:00
|
|
|
rsync -aP res/title.hgr/* build/TITLE.HGR >>build/log
|
2019-09-21 00:47:35 +00:00
|
|
|
bin/buildfileinfo.sh build/TITLE.HGR "06" "4000" >>build/log
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/TITLE.HGR" "build/TITLE.HGR" >>build/log
|
2019-02-09 01:48:07 +00:00
|
|
|
rsync -aP res/title.dhgr/* build/TITLE.DHGR >>build/log
|
2019-09-21 00:47:35 +00:00
|
|
|
bin/buildfileinfo.sh build/TITLE.DHGR "06" "4000" >>build/log
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/TITLE.DHGR" "build/TITLE.DHGR" >>build/log
|
2019-02-09 01:48:07 +00:00
|
|
|
rsync -aP res/action.hgr/* build/ACTION.HGR >>build/log
|
2019-09-21 00:47:35 +00:00
|
|
|
bin/buildfileinfo.sh build/ACTION.HGR "06" "4000" >>build/log
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/ACTION.HGR" "build/ACTION.HGR" >>build/log
|
2019-02-09 01:48:07 +00:00
|
|
|
rsync -aP res/action.dhgr/* build/ACTION.DHGR >>build/log
|
2019-09-21 00:47:35 +00:00
|
|
|
bin/buildfileinfo.sh build/ACTION.DHGR "06" "4000" >>build/log
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/ACTION.DHGR" "build/ACTION.DHGR" >>build/log
|
2019-07-12 14:12:20 +00:00
|
|
|
rsync -aP res/action.gr/* build/ACTION.GR >>build/log
|
2019-09-21 00:47:35 +00:00
|
|
|
bin/buildfileinfo.sh build/ACTION.GR "06" "6000" >>build/log
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/ACTION.GR" "build/ACTION.GR" >>build/log
|
2019-02-09 01:48:07 +00:00
|
|
|
rsync -aP res/artwork.shr/* build/ARTWORK.SHR >>build/log
|
2019-09-21 00:47:35 +00:00
|
|
|
bin/buildfileinfo.sh build/ARTWORK.SHR "C1" "2000" >>build/log
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/ARTWORK.SHR" "build/ARTWORK.SHR" >>build/log
|
2019-06-27 02:51:34 +00:00
|
|
|
rsync -aP res/attract/* build/ATTRACT >>build/log
|
2019-09-21 00:47:35 +00:00
|
|
|
bin/buildfileinfo.sh build/ATTRACT "04" "8000" >>build/log
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/ATTRACT" "build/ATTRACT" >>build/log
|
2018-10-22 22:36:37 +00:00
|
|
|
rsync -aP res/ss/* build/SS >>build/log
|
2019-09-21 00:47:35 +00:00
|
|
|
bin/buildfileinfo.sh build/SS "04" "4000" >>build/log
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/SS" "build/SS" >>build/log
|
2018-10-28 21:20:48 +00:00
|
|
|
rsync -aP res/demo/* build/DEMO >>build/log
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/DEMO" "build/DEMO" >>build/log
|
|
|
|
$(CADIUS) RENAMEFILE build/"$(DISK)" "/$(VOLUME)/DEMO/SPCARTOON.11" "SPCARTOON.1." >>build/log
|
|
|
|
$(CADIUS) RENAMEFILE build/"$(DISK)" "/$(VOLUME)/DEMO/SPCARTOON.22" "SPCARTOON.2." >>build/log
|
|
|
|
$(CADIUS) RENAMEFILE build/"$(DISK)" "/$(VOLUME)/DEMO/SPCARTOON.33" "SPCARTOON.3." >>build/log
|
|
|
|
$(CADIUS) RENAMEFILE build/"$(DISK)" "/$(VOLUME)/DEMO/SPCARTOON.44" "SPCARTOON.4." >>build/log
|
|
|
|
$(CADIUS) RENAMEFILE build/"$(DISK)" "/$(VOLUME)/DEMO/SPCARTOON.55" "SPCARTOON.5." >>build/log
|
|
|
|
$(CADIUS) RENAMEFILE build/"$(DISK)" "/$(VOLUME)/DEMO/SPCARTOON.66" "SPCARTOON.6." >>build/log
|
2018-10-29 23:23:43 +00:00
|
|
|
rsync -aP res/fx/* build/FX >>build/log
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/FX" "build/FX" >>build/log
|
|
|
|
$(CADIUS) CREATEFOLDER build/"$(DISK)" "/$(VOLUME)/X/" >>build/log
|
2019-09-26 17:03:32 +00:00
|
|
|
@for f in res/dsk/*.po; do $(CADIUS) EXTRACTVOLUME "$${f}" build/X/ >> build/log; done
|
2019-01-08 19:10:26 +00:00
|
|
|
rm -f build/X/**/.DS_Store
|
2019-09-19 14:47:04 +00:00
|
|
|
rm -f build/X/**/PRODOS*
|
|
|
|
rm -f build/X/**/LOADER.SYSTEM*
|
2019-07-23 23:53:57 +00:00
|
|
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/X" "build/X" >>build/log
|
2019-09-21 00:47:35 +00:00
|
|
|
bin/buildfileinfo.sh build/PRELAUNCH "06" "0106" >>build/log
|
2019-09-15 02:57:52 +00:00
|
|
|
$(CADIUS) ADDFOLDER build/"$(DISK)" "/$(VOLUME)/PRELAUNCH" "build/PRELAUNCH" >>build/log
|
2019-09-21 00:56:24 +00:00
|
|
|
bin/changebootloader.sh build/"$(DISK)" res/proboothd
|
2018-08-21 13:58:28 +00:00
|
|
|
|
2019-09-19 14:47:04 +00:00
|
|
|
asm: md asmlauncher asmfx asmprelaunch
|
|
|
|
|
|
|
|
asmlauncher:
|
|
|
|
$(ACME) src/4cade.a 2>build/relbase.log
|
|
|
|
$(ACME) -r build/4cade.lst -DRELBASE=`cat build/relbase.log | grep "RELBASE =" | cut -d"=" -f2 | cut -d"(" -f2 | cut -d")" -f1` src/4cade.a
|
|
|
|
|
|
|
|
asmfx:
|
|
|
|
@for f in src/fx/*.a; do grep "^\!to" $${f} >/dev/null && $(ACME) $${f} >> build/log; done
|
|
|
|
|
|
|
|
asmprelaunch:
|
|
|
|
@for f in src/prelaunch/*.a; do grep "^\!to" $${f} >/dev/null && $(ACME) $${f} >> build/log; done
|
|
|
|
|
2019-08-23 17:59:22 +00:00
|
|
|
chd: dsk
|
|
|
|
chdman createhd -c none -isb 64 -i build/"$(DISK)" -o build/"$(DISK)".chd >>build/log
|
|
|
|
|
2018-08-21 13:58:28 +00:00
|
|
|
mount: dsk
|
|
|
|
osascript bin/V2Make.scpt "`pwd`" bin/4cade.vii build/"$(DISK)"
|
|
|
|
|
|
|
|
md:
|
2018-08-23 20:02:48 +00:00
|
|
|
mkdir -p build/po
|
|
|
|
mkdir -p build/X
|
2019-02-09 01:48:07 +00:00
|
|
|
mkdir -p build/TITLE.HGR
|
|
|
|
mkdir -p build/TITLE.DHGR
|
|
|
|
mkdir -p build/ACTION.HGR
|
|
|
|
mkdir -p build/ACTION.DHGR
|
2019-07-12 14:12:20 +00:00
|
|
|
mkdir -p build/ACTION.GR
|
2019-02-09 01:48:07 +00:00
|
|
|
mkdir -p build/ARTWORK.SHR
|
2019-06-27 02:51:34 +00:00
|
|
|
mkdir -p build/ATTRACT
|
2018-10-22 22:36:37 +00:00
|
|
|
mkdir -p build/SS
|
2018-10-28 21:20:48 +00:00
|
|
|
mkdir -p build/DEMO
|
2018-10-29 23:23:43 +00:00
|
|
|
mkdir -p build/FX
|
2019-09-15 02:57:52 +00:00
|
|
|
mkdir -p build/PRELAUNCH
|
2018-08-21 13:58:28 +00:00
|
|
|
|
|
|
|
clean:
|
2018-11-07 02:18:13 +00:00
|
|
|
rm -rf build/ || rm -rf build
|
2018-08-21 13:58:28 +00:00
|
|
|
|
2018-10-31 15:13:03 +00:00
|
|
|
all: clean asm dsk mount
|