#! /bin/sh # This script has been known to work with Max OS X 10.3.4 and # gcc 4.0.0. --dnw 20May05 # Compile, link, and install the pfe loadable module $1.so from # source files in the current directory: $1-ext.c, $1-dll.c, # and $1-ext.h. # We constructed the script from the output of pfe "make" with # --silent removed from the LIBTOOL line in Makefile in the # build directory. # Define the appropriate prefix: # PREFIX=/usr/local PREFIX=$HOME # These directories must already exist. INCLUDEDIR=$PREFIX/include LIBDIR=$PREFIX/lib/pfe # compile cc -I. -I$INCLUDEDIR -I. -DHAVE_CONFIG_H \ -DNDEBUG -O3 -fomit-frame-pointer -DUNROLL_NEXT \ -Wall -pipe -funsigned-char -Wno-char-subscripts -Wwrite-strings \ -no-cpp-precomp -fno-common \ -c -o $1-ext.o $1-ext.c cc -I. -I$INCLUDEDIR -I. -DHAVE_CONFIG_H \ -DNDEBUG -O3 -fomit-frame-pointer -DUNROLL_NEXT \ -Wall -pipe -funsigned-char -Wno-char-subscripts -Wwrite-strings \ -no-cpp-precomp -fno-common \ -c -o $1-dll.o $1-dll.c # link cc -bundle -flat_namespace -undefined suppress \ -lm -o $1.so $1-dll.o $1-ext.o # install cp -p $1.so $LIBDIR cp -p $1-ext.h $INCLUDEDIR