#! /bin/sh # Compile pfe object files for hpux in the current directory, # where the two source files are assumed to be # $1-ext.c and $1-dll.c. # --dnw 22Nov02 # A nonempty $2 is intended for code generated by the # ^Forth translator. TOSFLAG= FTOSFLAG= NOEXTRAFLAG= if test $2 && test $2 != tos && test $2 != ftos \ && test $2 != both && test $2 != none then echo "The second argument must be 'tos', 'ftos', 'both', 'none', or empty." exit 1 else case $2 in tos ) TOSFLAG=-DHF_TOSREG echo "TOS is in a register." ;; ftos ) FTOSFLAG=-DHF_FTOSREG echo "FTOS is in a register." ;; both ) TOSFLAG=-DHF_TOSREG FTOSFLAG=-DHF_FTOSREG echo "Both TOS and FTOS are in registers." ;; "" ) echo "Neither TOS nor FTOS is in a register." ;; none ) NOEXTRAFLAG=-DNO_EXTRA_REGS echo "Using no extra registers." ;; esac fi # Set these paths for your build setup. These directories must # already exist. A .libs directory will be created in the current # directory if it doesn't already exist DEPDIR=.deps INCLUDEDIR=$HOME/include # use pfe "make install" target LIBDIR=$HOME/lib/pfe # use pfe "make install" target # Be sure that the pfe depcomp and libtool are findable. DEPCOMP=$HOME/bin/depcomp # from pfe distribution LIBTOOL=$HOME/bin/libtool # made by pfe configure GCC=gcc # from pfe configure # The following two are based on the output of pfe "make". # Make $1-ext object file. source=$1-ext.c object=$1-ext.lo libtool=yes \ depfile=$DEPDIR/$1-ext.Plo tmpdepfile=$DEPDIR/$1-ext.TPlo \ depmode=gcc /bin/sh $DEPCOMP \ /bin/sh $LIBTOOL --silent --mode=compile $GCC \ -I. -I$INCLUDEDIR \ -DHAVE_CONFIG_H $TOSFLAG $FTOSFLAG $NOEXTRAFLAG \ -DNDEBUG -O1 -pipe -Wwrite-strings \ -DUNROLL_NEXT -Wall -fomit-frame-pointer -D_OMIT_FRAME_POINTER \ -c -o $1-ext.lo $1-ext.c # Make $1-dll object file. source=$1-dll.c object=$1-dll.lo libtool=yes \ depfile=$DEPDIR/$1-dll.Plo tmpdepfile=$DEPDIR/$1-dll.TPlo \ depmode=gcc /bin/sh $DEPCOMP \ /bin/sh $LIBTOOL --silent --mode=compile $GCC \ -DHAVE_CONFIG_H -I. -I$INCLUDEDIR \ -DNDEBUG -O1 -pipe -Wwrite-strings \ -DUNROLL_NEXT -Wall -fomit-frame-pointer -D_OMIT_FRAME_POINTER \ -c -o $1-dll.lo $1-dll.c