#!/bin/bash # # $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/build_options/linux_amd64_g77,v 1.5 2010/10/16 17:06:04 jmc Exp $ # $Name: $ # # Build options for Suse 9 Opteron # tested on Linux 2.4.21-102-smp (x86_64), # Linux 2.6.26.8-57.fc8 (x86_64), Linux 2.6.27.9-159.fc10.x86_64 # FC=g77 DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4' CPP='cpp -traditional -P' NOOPTFLAGS='-O0' EXTENDED_SRC_FLAG='-ffixed-line-length-132' #MAKEDEPEND=/usr/X11R6/bin/gccmakedep #MAKEDEPEND=/usr/X11R6/bin/makedepend # For IEEE, use the "-ffloat-store" option if test "x$IEEE" = x ; then FFLAGS='-Wimplicit -Wunused -Wuninitialized' FOPTIM='-O3 -funroll-loops' else FFLAGS='-Wimplicit -Wunused -ffloat-store' # 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" INCLUDES='-I/usr/include/netcdf-3' if test -d /usr/lib64/netcdf-3 ; then if test -f /usr/lib64/netcdf-3/libnetcdf_g77.a ; then LIBS='-L/usr/lib64/netcdf-3 -lnetcdf_g77' else LIBS='-L/usr/lib64/netcdf-3' fi elif test -d /usr/lib/netcdf-3 ; then if test -f /usr/lib/netcdf-3/libnetcdf_g77.a ; then LIBS='-L/usr/lib/netcdf-3 -lnetcdf_g77' else LIBS='-L/usr/lib/netcdf-3' fi fi elif test -d /usr/include/netcdf ; 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/lib64/netcdf34 ; then if test -f /usr/lib64/netcdf34/libnetcdf_g77.a ; then LIBS='-L/usr/lib64/netcdf34 -lnetcdf_g77' else LIBS='-L/usr/lib64/netcdf34' fi elif test -d /usr/lib/netcdf34 ; then if test -f /usr/lib/netcdf34/libnetcdf_g77.a ; then LIBS='-L/usr/lib/netcdf34 -lnetcdf_g77' else LIBS='-L/usr/lib/netcdf34' fi fi elif test -d /usr/local/netcdf ; then INCLUDES='-I/usr/local/netcdf/include' LIBS='-L/usr/local/netcdf/lib' fi