diff --git a/EasyBuild b/EasyBuild index 0d2a1bc..c91eeb5 100644 --- a/EasyBuild +++ b/EasyBuild @@ -3,3 +3,8 @@ SetDirectory "{Parent}" # too easy Make -w > :BuildResults:BuildOut :BuildResults:BuildOut + +# So that PowerROM is definitely the newest thing in the tree! +SetDirectory :BuildResults: +Catenate PowerROM > PowerROM_ +Rename -y PowerROM_ PowerROM diff --git a/EasyBuild.sh b/EasyBuild.sh new file mode 100755 index 0000000..9419f57 --- /dev/null +++ b/EasyBuild.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# Uncomment this block to use https://github.com/elliotnunn/mac-rom + +# echo "> Diving into mac-rom repo" +# cd ../mac-rom +# ./EasyBuild.sh +# cmp -s BuildResults/RISC/Image/RomMondo "$OLDPWD/RomMondo.bin" || cp BuildResults/RISC/Image/RomMondo "$OLDPWD/RomMondo.bin" +# cd "$OLDPWD" +# echo "< Done with mac-rom repo" + + +# Avoid the uber-slow step of running the emulator when nothing has changed + +if [ ! -f BuildResults/PowerROM ] +then + echo "PowerROM not yet built" + echo "> Starting emulator to build PowerROM" + empw -b EasyBuild + echo "< Emulator done" + exit +fi + +echo "Checking for files updated since PowerROM" +find **/*.s *.s *.x *.bin -newer BuildResults/PowerROM | grep . || exit 0 + +echo "> Starting emulator to build PowerROM" +empw -b EasyBuild +echo "< Emulator done" diff --git a/README.md b/README.md index fdf71ae..72b99b2 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,16 @@ Using EMPW, that's: empw -b EasyBuild +Even nicer is this Unix shell script, which avoids unnecessary launches of the emulator: + + ./EasyBuild.sh + The 4 MB image will be at `BuildResults/PowerROM`. +Using a different 68k ROM image +------------------------------- +Clone https://github.com/elliotnunn/mac-rom next door to this repo, and uncomment the "Diving into mac-rom repo" lines in `EasyBuild.sh` + What's next? ------------ On NewWorld Macs, this image is extracted into RAM from a "Mac OS ROM" file at boot. Use https://github.com/elliotnunn/newworld-rom to build such a file.