#!/bin/sh
DoExitAsm ()
{ echo "An error occurred while assembling $1"; exit 1; }
DoExitLink ()
{ echo "An error occurred while linking $1"; exit 1; }
echo Assembling smallcarbontest
/usr/bin/as -o SmallCarbonTest.o SmallCarbonTest.s -arch i386
if [ $? != 0 ]; then DoExitAsm smallcarbontest; fi
rm SmallCarbonTest.s
echo Linking SmallCarbonTest
OFS=$IFS
IFS="
"
/usr/bin/ld  -framework carbon     -multiply_defined suppress -L. -o SmallCarbonTest `cat link.res`
IFS=$OFS
if [ $? != 0 ]; then DoExitLink SmallCarbonTest; fi
