48 lines
996 B
Bash
Executable file
48 lines
996 B
Bash
Executable file
#!/bin/bash -e
|
|
|
|
PROJECT=ifengine
|
|
DATA=(8x8thin.sta gamedata.z5)
|
|
|
|
# --- HERE BE DRAGONS ---
|
|
|
|
TARGET=${JOEY}/sdks/iix/IIgs/out/${PROJECT}
|
|
GSTARGET=31:/out/${PROJECT}
|
|
AC=${JOEY}/sdks/iix/ac/
|
|
IMPORT=/tmp/import.po
|
|
|
|
if [ -d ${TARGET} ]; then
|
|
rm -rf ${TARGET}
|
|
fi
|
|
mkdir -p ${TARGET}
|
|
|
|
rm JLSTATS || true
|
|
rm /tmp/import.po || true
|
|
|
|
cp -f ${JOEY}/dist/joey.h .
|
|
CFILES=($(ls -1 *.c))
|
|
OFILES=""
|
|
for F in "${CFILES[@]}"; do
|
|
O=${F%.*}
|
|
OFILES="${OFILES} ${GSTARGET}/${O}"
|
|
echo "Compiling ${F}..."
|
|
iix compile ${F} keep=${GSTARGET}/${O}
|
|
done
|
|
rm joey.h
|
|
|
|
cp -f ${JOEY}/dist/IIgs/joeylib#b20000 ${JOEY}/sdks/iix/IIgs/Libraries/joeylib
|
|
iix chtyp -t lib ${JOEY}/sdks/iix/IIgs/Libraries/joeylib
|
|
iix -DKeepType=S16 link ${OFILES} 13:joeylib keep=${GSTARGET}/${PROJECT}
|
|
|
|
${AC}/import.sh ${TARGET}/${PROJECT} S16
|
|
for F in "${DATA[@]}"; do
|
|
${AC}/import.sh ${F} BIN
|
|
done
|
|
|
|
if [ -z $1 ]; then
|
|
pushd ${JOEY}/sdks/iix/gsplus
|
|
./gsplus -config IIgsTest.cfg || true
|
|
popd
|
|
echo ""
|
|
${AC}/export.sh JLSTATS
|
|
cat JLSTATS
|
|
fi
|