adding build files

This commit is contained in:
Dagen Brock 2015-09-28 20:45:46 -05:00
parent 6cd86251f6
commit 5b395b58e3
2 changed files with 76 additions and 0 deletions

9
brun Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
./make_bootable
if [ $? -ne 0 ]; then
echo "Build failed, methinks."
exit 1
fi
./gsport

67
make_bootable Executable file
View File

@ -0,0 +1,67 @@
#!/bin/bash
# Here's our fancy build pipeline. Output = src/mtsystem (binary file)
./Merlin32 -V . src/mmt.s
# name of your disk image
DISK="MT"
# whatever the build produces
OUTFILE="src/mtsystem"
# set one of the following to true
USE_CADIUS=true
USE_APPLECOMMANDER=false
if [ ! -f $OUTFILE ]; then
exit 1
fi
mv $OUTFILE src/mt.system
SRCFILES=(`ls src/*.s`)
SYSFILES=(`ls src/PRODOS src/*system`)
CADIUS="../tools/Cadius"
P8NAME="$DISK"
IMGNAME="$DISK.po"
DISKSIZE=800KB
SRCDIR=src
BLDDIR=build/nix
if [ ! -d $BLDDIR ] ; then
echo "Build directory for this platform doesn't exist so I will create it."
mkdir -p $BLDDIR
echo "Created: $BLDDIR"
sleep 1
fi
# need to autogen
#cp src/_FileInformation.txt $BLDDIR
$CADIUS createvolume $IMGNAME $P8NAME $DISKSIZE
#SOURCE FILES
for f in ${SRCFILES[@]};
do
FNAME=${f##*/}
echo Processing $FNAME
cp $f $BLDDIR/$FNAME
$CADIUS sethighbit $BLDDIR/$FNAME > /dev/null
# add -V to debug
$CADIUS addfile $IMGNAME /$P8NAME/ $BLDDIR/$FNAME >/dev/null
done
#SYSTEM FILES
for f in ${SYSFILES[@]};
do
FNAME=${f##*/}
echo Processing $FNAME
cp $f $BLDDIR/$FNAME
$CADIUS addfile $IMGNAME /$P8NAME/ $BLDDIR/$FNAME > /dev/null
done
exit