MAKEWHAT= EXTRAFLAGS= STRIPFLAG=-s isrelease=n skipcompile=n if test $# -ge 1 ; then Platname=$1 shift while test $# -ge 1 do if test "$1" = "-release" ; then isrelease=y elif test "$1" = "-skipcompile" ; then skipcompile=y elif test "$1" = "-tecio" ; then MAKEWHAT=libtecio.a else EXTRAFLAGS="$EXTRAFLAGS $1" fi shift done else echo "Choose platform:" echo " " echo " macux.104" echo " macix64.106" echo " sgix.62" echo " sgix3.62" echo " sgix.65" echo " sgix64.65" echo " sgix2.65" echo " sun4.57" echo " sun464.57" echo " sun86.54" echo " ibmx.43" echo " ibmx64.43" echo " ibmx.51" echo " ibmx64.51" echo " ibmx64.53" echo " decalpha.32" echo " compaq.51" echo " hp7xx.11" echo " hp7xx64.11" echo " hpi64.11" echo " linux.24" echo " linux64.26" echo " linux.22" echo " linuxa.22" echo " linux32-centos4.8" echo " linux64-sled10.4" echo " linuxg29x64.26" echo " crayc90" echo "->\c" read Platname echo "Choose:" echo " 1. Make libtecio.a only" echo " 2. Make libtecio.a and pltview" read choice if test $choice -eq 1 ;then MAKEWHAT=libtecio.a fi fi MAKECMD=make LINKFLAGS= LINKLIBS= AR=ar ARFLAGS=qv DISTSUBDIR2= # # The blah-64 platforms are 64-bit builds of tecio, typically on 32-bit # platforms. # case $Platname in macix64*) CCOMP=g++ FINALCFLAGS="-arch x86_64 -DDARWIN -DMAC64 -I/usr/X11R6/include" STRIPFLAG=-Wl,-x LINKFLAGS="-arch x86_64" ;; macux*-64) CCOMP=g++ FINALCFLAGS="-arch ppc64 -arch x86_64 -DDARWIN -DMAC64 -I/usr/X11R6/include" STRIPFLAG=-Wl,-x LINKFLAGS="-arch ppc64 -arch x86_64" ;; macux*) CCOMP=g++ FINALCFLAGS="-arch ppc -arch i386 -DDARWIN -I/usr/X11R6/include" STRIPFLAG=-Wl,-x LINKFLAGS="-arch ppc -arch i386" ;; sgix.65-64) CCOMP=CC FINALCFLAGS="-DIRISX -mips4 -64" LINKFLAGS="-mips4 -64" ;; sgix64.65) CCOMP=CC FINALCFLAGS="-DIRISX -mips4 -64" LINKFLAGS="-mips4 -64" ;; sgix.65) CCOMP=CC FINALCFLAGS="-DIRISX -mips4 -n32" LINKFLAGS="-mips4 -n32" ;; sgix2.65) CCOMP=CC FINALCFLAGS="-DIRISX -o32" LINKFLAGS="-o32" ;; sgix.62-64) CCOMP=CC FINALCFLAGS="-DIRISX -DIRIX62 -mips4 -64" LINKFLAGS="-mips4 -64" ;; sgix.62) CCOMP=CC FINALCFLAGS="-DIRISX -DIRIX62 -mips4 -n32" LINKFLAGS="-mips4 -n32" ;; sgix1.62) CCOMP=CC FINALCFLAGS="-DIRISX -DIRIX62 -mips1 -32" LINKFLAGS="-mips1 -32" ;; sgix3.62) CCOMP=CC FINALCFLAGS="-DIRISX -DIRIX62 -mips3 -n32" LINKFLAGS="-mips3 -n32" ;; ibmx.*) CCOMP=xlC FINALCFLAGS=-DIBMRS6000X ;; ibmx64.*) CCOMP=xlC FINALCFLAGS="-DIBMRS6000X -q64" ARFLAGS="-X64 qv" ;; compaq.51) CCOMP=cxx FINALCFLAGS="-DCOMPAQX -I/usr/include -ieee_with_inexact" ;; decalpha.32)CCOMP=cc FINALCFLAGS="-DDECALPHAX -I/usr/include -ieee_with_inexact" ;; hp7xx.*-64) CCOMP=aCC FINALCFLAGS="+DD64 +DS2.0 -AA -DHPX -I/usr/include/X11R6 -I/usr/include/Motif2.1" LINKFLAGS="+DA2.0W +DD64 +DS2.0W" ;; hp7xx64.11) CCOMP=aCC FINALCFLAGS="+DA2.0W +DD64 +DS2.0W -AA -DHPX -I/usr/include/X11R6 -I/usr/include/Motif2.1" LINKFLAGS="+DA2.0W +DD64 +DS2.0W" ;; hpi64.11) CCOMP=aCC FINALCFLAGS="+DD64 -AA -DHPX -I/usr/include/X11R6 -I/usr/include/Motif2.1" LINKFLAGS="+DD64" ;; hp7xx.11) CCOMP=aCC FINALCFLAGS="+DAportable -AA -DHPX -I/usr/include/X11R6 -I/usr/include/Motif2.1" LINKFLAGS="+DAportable" ;; crayc90) CCOMP=cc FINALCFLAGS="-DCRAY -DUNIXX" ;; linux.64-gcc4.2.4.26) # # Special custom build for synopsys. Run Runmake directly on satsop. # CCOMP=/usr/local/gcc-4.2.2/bin/g++ FINALCFLAGS="-fPIC -DLINUX -DLINUX64" ;; linux*64*) CCOMP=g++ FINALCFLAGS="-fPIC -DLINUX -DLINUX64" ;; linux*) CCOMP=g++ FINALCFLAGS="-fPIC -DLINUX" ;; sun4.54) CCOMP=/opt/SUNWspro/bin/CC FINALCFLAGS="-DSUN -DSUNSOLARISX -I/usr/openwin/include -I/usr/dt/include -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg -xO1" LINKFLAGS="-library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg" MAKECMD=/usr/ccs/bin/make AR=/opt/SUNWspro/bin/CC ARFLAGS="-xar -o" ;; sun4.55) CCOMP=/opt/SUNWspro/bin/CC FINALCFLAGS="-DSUN -DSUNSOLARISX -I/usr/openwin/include -I/usr/dt/include -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg -xO1" LINKFLAGS="-library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg" MAKECMD=/usr/ccs/bin/make AR=/opt/SUNWspro/bin/CC ARFLAGS="-xar -o" ;; sun4.57) CCOMP=/opt/SUNWspro/bin/CC FINALCFLAGS="-DSUNSOLARISX -I/usr/openwin/include -I/usr/dt/include -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg -xO1" LINKFLAGS="-library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg" MAKECMD=/usr/ccs/bin/make AR=/opt/SUNWspro/bin/CC ARFLAGS="-xar -o" ;; sun4.57-64) CCOMP=/opt/SUNWspro/bin/CC FINALCFLAGS="-DSUNSOLARISX -KPIC -xarch=v9 -I/usr/openwin/include -I/usr/dt/include -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg -xO1" LINKFLAGS="-KPIC -xarch=v9 -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg" MAKECMD=/usr/ccs/bin/make AR=/opt/SUNWspro/bin/CC ARFLAGS="-xar -o" ;; sun464.57) CCOMP=/opt/SUNWspro/bin/CC FINALCFLAGS="-DSUNSOLARISX -KPIC -xarch=v9 -I/usr/openwin/include -I/usr/dt/include -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg -xO1" LINKFLAGS="-KPIC -xarch=v9 -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg" MAKECMD=/usr/ccs/bin/make AR=/opt/SUNWspro/bin/CC ARFLAGS="-xar -o" ;; sun464.59) CCOMP=/opt/SUNWspro/bin/CC FINALCFLAGS="-DSUNSOLARISX -KPIC -m64 -xarch=generic -I/usr/openwin/include -I/usr/dt/include -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg -xO1" LINKFLAGS="-KPIC -m64 -xarch=generic -library=libC -library=Cstd -library=no%rwtools7 -library=no%rwtools7_dbg" MAKECMD=/usr/ccs/bin/make AR=/opt/SUNWspro/bin/CC ARFLAGS="-xar -o" ;; sun86.54) CCOMP=/opt/SUNWspro/bin/CC FINALCFLAGS="-DSUN -DSUNSOLARISX -I/usr/openwin/include -I/usr/dt/include" MAKECMD=/usr/ccs/bin/make AR=/opt/SUNWspro/bin/CC ARFLAGS="-xar -o" ;; *) echo "Err: Invalid platform" exit ;; esac if test "$isrelease" = "y" ; then EXTRAFLAGS="$EXTRAFLAGS -DNO_ASSERTS" else STRIPFLAG= fi if test "$skipcompile" = "n" ; then rm -f *.o */*.o *.a > /dev/null 2>&1 fi rm -f *.a > /dev/null 2>&1 FINALCFLAGS="$FINALCFLAGS $EXTRAFLAGS -DUSEENUM -DTHREED" # # NOTE: Used to use make here but had problems with using remsh to run # make multiple times to get 64 bit and 32 bit versions of libraries.... # # $MAKECMD $MAKEWHAT AR=$AR CC=$CCOMP LINKFLAGS="$LINKFLAGS" STRIPFLAG=$STRIPFLAG CFLAGS="$EXTRAFLAGS -DUSEENUM -DTHREED $FINALCFLAGS" # # # cd tecsrc BASELIST=`/bin/ls -1 *.cpp` OBJLIST= for file in $BASELIST do OBJNAME=`echo $file | sed 's/\.cpp/.o/'` OBJLIST="$OBJLIST tecsrc/$OBJNAME" done if test "$skipcompile" = "n" ; then for file in $BASELIST do case $file in tecxxx.cpp) ARCHIVEFLAG=-DMAKEARCHIVE;; arrlist.cpp) ARCHIVEFLAG=-DMAKEARCHIVE;; datautil.cpp) ARCHIVEFLAG=-DMAKEARCHIVE;; *) ARCHIVEFLAG= ;; esac echo "$CCOMP $FINALCFLAGS $ARCHIVEFLAG -c $file" $CCOMP $FINALCFLAGS $ARCHIVEFLAG -c $file done fi cd .. pwd echo "$AR $ARFLAGS libtecio.a $OBJLIST" $AR $ARFLAGS libtecio.a $OBJLIST if test -f /bin/ranlib ; then /bin/ranlib libtecio.a; elif test -f /usr/bin/ranlib ; then /usr/bin/ranlib libtecio.a; elif test -f /usr/ucb/ranlib ; then /usr/ucb/ranlib libtecio.a; fi echo "$CCOMP -I./tecsrc -DMAKEARCHIVE $FINALCFLAGS -c pltview.cpp" $CCOMP -I./tecsrc -DMAKEARCHIVE $FINALCFLAGS -c pltview.cpp echo "$CCOMP $FINALCFLAGS pltview.o libtecio.a $LINKFLAGS $LINKLIBS $STRIPFLAG -lm -o pltview" $CCOMP $FINALCFLAGS pltview.o libtecio.a $LINKFLAGS $LINKLIBS $STRIPFLAG -lm -o pltview