2010-08-25 21:42:57 +00:00
|
|
|
|
|
|
|
MAKEWHAT=
|
|
|
|
EXTRAFLAGS=
|
|
|
|
STRIPFLAG=-s
|
|
|
|
isrelease=n
|
|
|
|
skipcompile=n
|
|
|
|
if test $# -ge 1 ; then
|
|
|
|
Platname=$1
|
|
|
|
shift
|
2019-01-31 13:50:44 +00:00
|
|
|
while test $# -ge 1
|
2010-08-25 21:42:57 +00:00
|
|
|
do
|
|
|
|
if test "$1" = "-release" ; then
|
|
|
|
isrelease=y
|
|
|
|
elif test "$1" = "-skipcompile" ; then
|
|
|
|
skipcompile=y
|
|
|
|
elif test "$1" = "-tecio" ; then
|
2019-01-31 13:50:44 +00:00
|
|
|
MAKEWHAT=libtecio.a
|
2010-08-25 21:42:57 +00:00
|
|
|
else
|
|
|
|
EXTRAFLAGS="$EXTRAFLAGS $1"
|
|
|
|
fi
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
else
|
|
|
|
echo "Choose platform:"
|
|
|
|
echo " "
|
|
|
|
echo " macux.104"
|
2019-01-31 13:50:44 +00:00
|
|
|
echo " macix64.106"
|
2010-08-25 21:42:57 +00:00
|
|
|
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"
|
2019-01-31 13:50:44 +00:00
|
|
|
echo " linux64.26"
|
2010-08-25 21:42:57 +00:00
|
|
|
echo " linux.22"
|
|
|
|
echo " linuxa.22"
|
2019-01-31 13:50:44 +00:00
|
|
|
echo " linux32-centos4.8"
|
|
|
|
echo " linux64-sled10.4"
|
|
|
|
echo " linuxg29x64.26"
|
2010-08-25 21:42:57 +00:00
|
|
|
echo " crayc90"
|
|
|
|
echo "->\c"
|
|
|
|
read Platname
|
|
|
|
|
|
|
|
echo "Choose:"
|
2019-01-31 13:50:44 +00:00
|
|
|
echo " 1. Make libtecio.a only"
|
|
|
|
echo " 2. Make libtecio.a and pltview"
|
2010-08-25 21:42:57 +00:00
|
|
|
|
|
|
|
read choice
|
|
|
|
|
2019-01-31 13:50:44 +00:00
|
|
|
if test $choice -eq 1 ;then
|
|
|
|
MAKEWHAT=libtecio.a
|
2010-08-25 21:42:57 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
MAKECMD=make
|
|
|
|
LINKFLAGS=
|
|
|
|
LINKLIBS=
|
|
|
|
AR=ar
|
|
|
|
ARFLAGS=qv
|
|
|
|
DISTSUBDIR2=
|
|
|
|
|
2019-01-31 13:50:44 +00:00
|
|
|
#
|
|
|
|
# The blah-64 platforms are 64-bit builds of tecio, typically on 32-bit
|
|
|
|
# platforms.
|
|
|
|
#
|
2010-08-25 21:42:57 +00:00
|
|
|
case $Platname in
|
2019-01-31 13:50:44 +00:00
|
|
|
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"
|
2010-08-25 21:42:57 +00:00
|
|
|
STRIPFLAG=-Wl,-x
|
2019-01-31 13:50:44 +00:00
|
|
|
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"
|
2010-08-25 21:42:57 +00:00
|
|
|
;;
|
|
|
|
sgix.65-64) CCOMP=CC
|
2019-01-31 13:50:44 +00:00
|
|
|
FINALCFLAGS="-DIRISX -mips4 -64"
|
2010-08-25 21:42:57 +00:00
|
|
|
LINKFLAGS="-mips4 -64"
|
|
|
|
;;
|
|
|
|
sgix64.65) CCOMP=CC
|
2019-01-31 13:50:44 +00:00
|
|
|
FINALCFLAGS="-DIRISX -mips4 -64"
|
2010-08-25 21:42:57 +00:00
|
|
|
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
|
2019-01-31 13:50:44 +00:00
|
|
|
FINALCFLAGS="-DIRISX -DIRIX62 -mips4 -64"
|
2010-08-25 21:42:57 +00:00
|
|
|
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
|
2019-01-31 13:50:44 +00:00
|
|
|
FINALCFLAGS="-DIBMRS6000X -q64"
|
2010-08-25 21:42:57 +00:00
|
|
|
ARFLAGS="-X64 qv"
|
|
|
|
;;
|
|
|
|
compaq.51) CCOMP=cxx
|
2019-01-31 13:50:44 +00:00
|
|
|
FINALCFLAGS="-DCOMPAQX -I/usr/include -ieee_with_inexact"
|
2010-08-25 21:42:57 +00:00
|
|
|
;;
|
|
|
|
decalpha.32)CCOMP=cc
|
2019-01-31 13:50:44 +00:00
|
|
|
FINALCFLAGS="-DDECALPHAX -I/usr/include -ieee_with_inexact"
|
2010-08-25 21:42:57 +00:00
|
|
|
;;
|
|
|
|
hp7xx.*-64) CCOMP=aCC
|
2019-01-31 13:50:44 +00:00
|
|
|
FINALCFLAGS="+DD64 +DS2.0 -AA -DHPX -I/usr/include/X11R6 -I/usr/include/Motif2.1"
|
2010-08-25 21:42:57 +00:00
|
|
|
LINKFLAGS="+DA2.0W +DD64 +DS2.0W"
|
|
|
|
;;
|
|
|
|
hp7xx64.11) CCOMP=aCC
|
2019-01-31 13:50:44 +00:00
|
|
|
FINALCFLAGS="+DA2.0W +DD64 +DS2.0W -AA -DHPX -I/usr/include/X11R6 -I/usr/include/Motif2.1"
|
2010-08-25 21:42:57 +00:00
|
|
|
LINKFLAGS="+DA2.0W +DD64 +DS2.0W"
|
|
|
|
;;
|
|
|
|
hpi64.11) CCOMP=aCC
|
2019-01-31 13:50:44 +00:00
|
|
|
FINALCFLAGS="+DD64 -AA -DHPX -I/usr/include/X11R6 -I/usr/include/Motif2.1"
|
2010-08-25 21:42:57 +00:00
|
|
|
LINKFLAGS="+DD64"
|
|
|
|
;;
|
|
|
|
hp7xx.11) CCOMP=aCC
|
2019-01-31 13:50:44 +00:00
|
|
|
FINALCFLAGS="+DAportable -AA -DHPX -I/usr/include/X11R6 -I/usr/include/Motif2.1"
|
2010-08-25 21:42:57 +00:00
|
|
|
LINKFLAGS="+DAportable"
|
|
|
|
;;
|
|
|
|
crayc90) CCOMP=cc
|
2019-01-31 13:50:44 +00:00
|
|
|
FINALCFLAGS="-DCRAY -DUNIXX"
|
2010-08-25 21:42:57 +00:00
|
|
|
;;
|
2019-01-31 13:50:44 +00:00
|
|
|
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"
|
2010-08-25 21:42:57 +00:00
|
|
|
;;
|
|
|
|
linux*) CCOMP=g++
|
2019-01-31 13:50:44 +00:00
|
|
|
FINALCFLAGS="-fPIC -DLINUX"
|
2010-08-25 21:42:57 +00:00
|
|
|
;;
|
|
|
|
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
|
2019-01-31 13:50:44 +00:00
|
|
|
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"
|
2010-08-25 21:42:57 +00:00
|
|
|
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
|
2019-01-31 13:50:44 +00:00
|
|
|
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"
|
2010-08-25 21:42:57 +00:00
|
|
|
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
|
2019-01-31 13:50:44 +00:00
|
|
|
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"
|
2010-08-25 21:42:57 +00:00
|
|
|
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
|
2019-01-31 13:50:44 +00:00
|
|
|
FINALCFLAGS="-DSUN -DSUNSOLARISX -I/usr/openwin/include -I/usr/dt/include"
|
2010-08-25 21:42:57 +00:00
|
|
|
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....
|
|
|
|
#
|
2019-01-31 13:50:44 +00:00
|
|
|
# $MAKECMD $MAKEWHAT AR=$AR CC=$CCOMP LINKFLAGS="$LINKFLAGS" STRIPFLAG=$STRIPFLAG CFLAGS="$EXTRAFLAGS -DUSEENUM -DTHREED $FINALCFLAGS"
|
2010-08-25 21:42:57 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2019-01-31 13:50:44 +00:00
|
|
|
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;
|
2010-08-25 21:42:57 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "$CCOMP -I./tecsrc -DMAKEARCHIVE $FINALCFLAGS -c pltview.cpp"
|
|
|
|
$CCOMP -I./tecsrc -DMAKEARCHIVE $FINALCFLAGS -c pltview.cpp
|
|
|
|
|
2019-01-31 13:50:44 +00:00
|
|
|
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
|