Back to home page

MITgcm

 
 

    


Warning, /tools/build_options/linux_amd64_g77 is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit 3d93c0a0 on 2022-04-13 15:21:38 UTC
f05a8b5bba Chri*0001 #!/bin/bash
                0002 #
7084a0a1f1 Jean*0003 # Build options for g77 compiler (compat-gcc-34-g77) on Linux AMD64 platform
                0004 #  Tested on Linux 2.4.21-102-smp (x86_64),
                0005 #         on Fedora Core  8, 10 (e.g.: dickens), 13 (e.g.: baudelaire),
                0006 #                        14, 15 (e.g.: acesgrid), 17, 19
f05a8b5bba Chri*0007 
2fe47e6229 Jean*0008 CC=gcc34
7084a0a1f1 Jean*0009 FC=g77
3d93c0a01e Ou W*0010 DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4 -DNML_EXTENDED_F77 -DEXCLUDE_OPEN_ACTION'
7ea6a3439c Jean*0011 DEFINES="$DEFINES -DAUTODIFF_USE_MDSFINDUNITS -DPROFILES_USE_MDSFINDUNITS"
92050d4ee0 Jean*0012 EXTENDED_SRC_FLAG='-ffixed-line-length-132'
ede1bd7ab5 Jean*0013 GET_FC_VERSION="--version"
2a00c2551c Jean*0014 
7084a0a1f1 Jean*0015 NOOPTFLAGS='-O0'
                0016 CFLAGS='-O0'
                0017 
f05a8b5bba Chri*0018 #  For IEEE, use the "-ffloat-store" option
                0019 if test "x$IEEE" = x ; then
                0020     FFLAGS='-Wimplicit -Wunused -Wuninitialized'
                0021     FOPTIM='-O3 -funroll-loops'
                0022 else
                0023     FFLAGS='-Wimplicit -Wunused -ffloat-store'
92050d4ee0 Jean*0024 #   FFLAGS="$FFLAGS -g -mfpmath=sse -msse -msse2 -fbounds-check"
                0025     FOPTIM='-O0'
f05a8b5bba Chri*0026 fi
7084a0a1f1 Jean*0027 
                0028 #- for big setups, compile & link with "-fPIC" or set memory-model to "medium":
                0029 #CFLAGS="$CFLAGS -fPIC"
                0030 #FFLAGS="$FFLAGS -fPIC"
                0031 #-  with FC 19, need to use this without -fPIC (which cancels -mcmodel option):
                0032  CFLAGS="$CFLAGS -mcmodel=medium"
                0033  FFLAGS="$FFLAGS -mcmodel=medium"
0a19245e65 Ed H*0034 
                0035 if test -d /usr/include/netcdf-3 ; then
b2a48b1874 Jean*0036 #-- some FedoraCore standard location used to be "netcdf-3"
0a19245e65 Ed H*0037     INCLUDES='-I/usr/include/netcdf-3'
                0038     if test -d /usr/lib64/netcdf-3 ; then
                0039         if test -f /usr/lib64/netcdf-3/libnetcdf_g77.a ; then
                0040             LIBS='-L/usr/lib64/netcdf-3 -lnetcdf_g77'
                0041         else
                0042             LIBS='-L/usr/lib64/netcdf-3'
                0043         fi
                0044     elif test -d /usr/lib/netcdf-3 ; then
                0045         if test -f /usr/lib/netcdf-3/libnetcdf_g77.a ; then
                0046             LIBS='-L/usr/lib/netcdf-3 -lnetcdf_g77'
                0047         else
                0048             LIBS='-L/usr/lib/netcdf-3'
                0049         fi
                0050     fi
2fe47e6229 Jean*0051 elif test -d /usr/include/netcdf -o -f /usr/include/netcdf.h ; then
b2a48b1874 Jean*0052 #-- allows a "compat"(gcc 3.4) 2nd version of libs for g77 , next to the
                0053 #   standard one (for gfortran, gcc 4.x). But uses same include files.
2fe47e6229 Jean*0054     if test -d /usr/include/netcdf ; then
                0055        INCLUDES='-I/usr/include/netcdf'
                0056     fi
b2a48b1874 Jean*0057     if test -d /usr/lib64/netcdf34 ; then
                0058         if test -f /usr/lib64/netcdf34/libnetcdf_g77.a ; then
                0059             LIBS='-L/usr/lib64/netcdf34 -lnetcdf_g77'
                0060         else
                0061             LIBS='-L/usr/lib64/netcdf34'
                0062         fi
                0063     elif test -d /usr/lib/netcdf34 ; then
                0064         if test -f /usr/lib/netcdf34/libnetcdf_g77.a ; then
                0065             LIBS='-L/usr/lib/netcdf34 -lnetcdf_g77'
                0066         else
                0067             LIBS='-L/usr/lib/netcdf34'
                0068         fi
                0069     fi
0a19245e65 Ed H*0070 elif test -d /usr/local/netcdf ; then
                0071     INCLUDES='-I/usr/local/netcdf/include'
                0072     LIBS='-L/usr/local/netcdf/lib'
                0073 fi