#!/bin/sh # Script to compile a .hcc to .hc # Requires two argument. The path of the .hcc and the path of the .hc if [ $# != 2 ] ; then echo photo_compile hcc_file hc_file else HCC=$1 TLCC=/tmp/`basename $1 hcc`tlcc CPP=/tmp/`basename $1 hcc`cpp OBJ=/tmp/`basename $1 hcc`os tlmpwebcc $HCC $TLCC tlcc $TLCC $CPP gcc -DEXPORT= -fPIC -I/usr/include/tlmp -I/usr/include/linuxconf -c $CPP -o $OBJ gcc -g -shared -Wl,-soname,test.so.1 -o $2 $OBJ # Make sure there is a .tlmplibs in the directory DIR=`dirname $2` if [ ! -f $DIR/.tlmplibs ] ; then TLMPLIBS=/tmp/tlmplibs.$$ echo webphoto >$TLMPLIBS cp $TLMPLIBS $DIR/.tlmplibs rm -f $TLMPLIBS fi fi