#!/bin/csh -f
# $Id: mass,v 1.7 1997/03/21 01:06:34 exal WK $
# Unix C-Shell build routine for exAL.
# -- User configurable settings --
set ROMENTR=exentries.a
set RPLCOMP=rplcomp
set SASM=sasm
set MAKEROM=makerom
# Shouldn't have to change anything beyond this point
######################################################################
set TARGET=exal.lib
# Check to make sure we have entries table
if !( -e $ROMENTR ) then
echo "$0": Error - No $ROMENTR found
exit
endif
echo "$0": Creating $TARGET
echo ""
######################################################################
echo Assembling rpl..
$RPLCOMP ex2 __exalmain.a __exalmain.ext
######################################################################
echo Building tables..
echo "TITLE exAL Library" >! __build.mn
echo "OUTPUT __ex.o" >> __build.mn
echo "LLIST __ex.lr" >> __build.mn
echo "CONFIGURE exalcfg" >> __build.mn
echo "NAME exAL - Spreadsheet for the 48 (Mar.'97)" >> __build.mn
echo "ROMPHEAD __head.a" >> __build.mn
echo "REL __exalmain.o" >> __build.mn
echo "TABLE __hash.a" >> __build.mn
echo "FINISH __end.a" >> __build.mn
echo "END" >> __build.mn
######################################################################
$MAKEROM __build.mn __build.m
######################################################################
echo Assembling code..
echo " NIBASC /HPHP48-X/" >! __tmp.a
echo " INCLUDE $ROMENTR" >> __tmp.a
echo " INCLUDE __head.a" >> __tmp.a
echo " SETLIST INCLUDE" >> __tmp.a
echo " INCLUDE __exalmain.a" >> __tmp.a
echo " CLRLIST INCLUDE" >> __tmp.a
echo " INCLUDE __hash.a" >> __tmp.a
echo " INCLUDE __end.a" >> __tmp.a
if ($0 == massl) then
$SASM -EH __tmp
else
$SASM -EHN __tmp
endif
mv -f __tmp.o $TARGET
echo Checking/adjusting crc..
lbcrc $TARGET >> __tmp.a
lbcrc $TARGET
rm __*
echo Done!