#! /bin/sh # Compile pfe object files for linux/ia32 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. FTOSFLAG= if test $2 && test $2 != ftos then echo "The second argument must be 'ftos' or empty." exit 1 else if test $2 then FTOSFLAG=-DHF_FTOSREG echo "FTOS is in a register." else echo "Using no extra registers." fi 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=kgcc # 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 \ -DHAVE_CONFIG_H -I. -I$INCLUDEDIR \ -DNDEBUG -O3 -pipe -Wwrite-strings -Wstrict-prototypes \ $FTOSFLAG \ -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 -O3 -pipe -Wwrite-strings -Wstrict-prototypes \ -DUNROLL_NEXT -Wall -fomit-frame-pointer -D_OMIT_FRAME_POINTER \ -c -o $1-dll.lo $1-dll.c