--- MITgcm/tools/build_options/linux_amd64_g77 2009/07/21 19:55:13 1.4 +++ MITgcm/tools/build_options/linux_amd64_g77 2011/05/16 19:03:37 1.8 @@ -1,6 +1,6 @@ #!/bin/bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/build_options/linux_amd64_g77,v 1.4 2009/07/21 19:55:13 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/build_options/linux_amd64_g77,v 1.8 2011/05/16 19:03:37 jmc Exp $ # $Name: $ # # Build options for Suse 9 Opteron @@ -9,12 +9,13 @@ # FC=g77 -DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4' +CC=gcc34 +DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4 -DNML_EXTENDED_F77' CPP='cpp -traditional -P' NOOPTFLAGS='-O0' EXTENDED_SRC_FLAG='-ffixed-line-length-132' -#MAKEDEPEND=/usr/X11R6/bin/gccmakedep -#MAKEDEPEND=/usr/X11R6/bin/makedepend +GET_FC_VERSION="--version" + # For IEEE, use the "-ffloat-store" option if test "x$IEEE" = x ; then FFLAGS='-Wimplicit -Wunused -Wuninitialized' @@ -24,6 +25,9 @@ # FFLAGS="$FFLAGS -g -mfpmath=sse -msse -msse2 -fbounds-check" FOPTIM='-O0' fi +# for big objects: +FFLAGS="$FFLAGS -fPIC" +CFLAGS="-O0 -fPIC" if test -d /usr/include/netcdf-3 ; then #-- some FedoraCore standard location used to be "netcdf-3" @@ -41,10 +45,12 @@ LIBS='-L/usr/lib/netcdf-3' fi fi -elif test -d /usr/include/netcdf ; then +elif test -d /usr/include/netcdf -o -f /usr/include/netcdf.h ; then #-- allows a "compat"(gcc 3.4) 2nd version of libs for g77 , next to the # standard one (for gfortran, gcc 4.x). But uses same include files. - INCLUDES='-I/usr/include/netcdf' + if test -d /usr/include/netcdf ; then + INCLUDES='-I/usr/include/netcdf' + fi if test -d /usr/lib64/netcdf34 ; then if test -f /usr/lib64/netcdf34/libnetcdf_g77.a ; then LIBS='-L/usr/lib64/netcdf34 -lnetcdf_g77'