2017-01-08 03:35:35 +00:00
|
|
|
#
|
|
|
|
# Passport Makefile
|
|
|
|
# assembles source code, optionally builds a disk image and mounts it
|
|
|
|
#
|
|
|
|
# original by Quinn Dunki on 2014-08-15
|
|
|
|
# One Girl, One Laptop Productions
|
|
|
|
# http://www.quinndunki.com/blondihacks
|
|
|
|
#
|
|
|
|
# adapted by 4am on 2017-01-07
|
|
|
|
#
|
|
|
|
|
|
|
|
# third-party tools required to build
|
|
|
|
# https://sourceforge.net/projects/acme-crossass/
|
2017-11-09 05:47:12 +00:00
|
|
|
ACME=acme
|
2019-05-03 01:15:04 +00:00
|
|
|
# https://www.brutaldeluxe.fr/products/crossdevtools/cadius/
|
|
|
|
# https://github.com/mach-kernel/cadius
|
|
|
|
CADIUS=cadius
|
2017-11-09 05:47:12 +00:00
|
|
|
# https://bitbucket.org/magli143/exomizer/wiki/Home
|
2018-10-04 03:11:40 +00:00
|
|
|
# requires Exomizer 3.0 or later
|
2019-06-16 19:15:11 +00:00
|
|
|
EXOMIZER=exomizer raw -q -P23
|
2017-01-08 03:35:35 +00:00
|
|
|
|
2019-05-03 01:15:04 +00:00
|
|
|
BUILDDISK=build/passport
|
2017-01-08 03:35:35 +00:00
|
|
|
|
|
|
|
asm:
|
|
|
|
mkdir -p build
|
2017-11-09 05:47:12 +00:00
|
|
|
cd src/mods && $(ACME) universalrwts.a
|
2018-10-04 03:11:40 +00:00
|
|
|
$(EXOMIZER) build/universalrwts.bin -o build/universalrwts.tmp
|
2017-11-09 05:47:12 +00:00
|
|
|
printf "\xB8\x00" | cat - build/universalrwts.tmp > build/universalrwts.pak
|
2018-09-26 17:20:03 +00:00
|
|
|
cd src/mods && $(ACME) -r ../../build/t00only.lst t00only.a
|
2018-10-04 03:11:40 +00:00
|
|
|
$(EXOMIZER) build/t00only.bin -o build/t00only.tmp
|
2017-11-09 05:47:12 +00:00
|
|
|
printf "\x20\x00" | cat - build/t00only.tmp > build/t00only.pak
|
2022-04-12 00:25:31 +00:00
|
|
|
cd src && $(ACME) -r ../build/passport.lst -o ../build/passport.tmp -DFORWARD_DECRUNCHING=1 passport.a 2> ../build/relbase.log
|
2019-06-15 20:47:48 +00:00
|
|
|
cd src && $(ACME) -DRELBASE=`cat ../build/relbase.log | grep "RELBASE =" | cut -d"=" -f2 | cut -d"(" -f2 | cut -d")" -f1` -DFORWARD_DECRUNCHING=1 passport.a 2> ../build/vars.log
|
2021-04-20 01:17:23 +00:00
|
|
|
grep "ThisSlot=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
2019-06-15 19:23:02 +00:00
|
|
|
grep "PrintByID=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
|
|
|
grep "WaitForKey=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
|
|
|
grep "CleanExit=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
2021-06-19 00:50:19 +00:00
|
|
|
grep "OpenFile=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
|
|
|
grep "ReadFile=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
|
|
|
grep "CloseFile=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
2019-06-15 19:23:02 +00:00
|
|
|
grep "GetVolumeName=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
|
|
|
grep "GetVolumeInfo=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
|
|
|
grep "PREFSVER=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
|
|
|
grep "PREFSFILE=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
2021-06-19 00:15:15 +00:00
|
|
|
grep "SLOT=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
|
|
|
grep "DRIVE=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
2021-06-19 01:13:59 +00:00
|
|
|
grep "MainMenu=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
|
|
|
grep "CheckCache=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
|
2019-06-15 19:23:02 +00:00
|
|
|
$(EXOMIZER) -b build/passport.tmp -o build/passport.pak
|
|
|
|
cd src && $(ACME) -DFORWARD_DECRUNCHING=0 wrapper.a
|
2019-05-03 01:15:04 +00:00
|
|
|
cp res/work.po "$(BUILDDISK)".po
|
|
|
|
cp res/_FileInformation.txt build/
|
|
|
|
$(CADIUS) ADDFILE "${BUILDDISK}".po "/PASSPORT/" "build/PASSPORT.SYSTEM"
|
|
|
|
bin/po2do.py build/ build/
|
|
|
|
rm "$(BUILDDISK)".po
|
2017-01-08 03:35:35 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf build/
|
|
|
|
|
|
|
|
mount:
|
2019-05-03 01:15:04 +00:00
|
|
|
open "$(BUILDDISK)".dsk
|
2017-01-08 03:35:35 +00:00
|
|
|
|
|
|
|
all: clean asm mount
|