Warning, /tools/build_options/linux_ia32_g95 is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
84a44edf6c Cons*0001 #!/bin/bash
0002 #
0003 #
0004
0005 FC=g95
0006 F90C=g95
0007 CC=gcc
0008 DEFINES='-DWORDLENGTH=4'
0009 CPP='cpp -traditional -P'
0010 NOOPTFLAGS='-O0'
0011
0012 if test "x$DEVEL" != x ; then
0013 FFLAGS='-g -Wall -Wextra -fbounds-check -ftrace=full -finteger=-99999 -flogical=false -freal=nan'
0014 else
80497dc312 Cons*0015 FFLAGS='-Wunused'
84a44edf6c Cons*0016 fi
0017
0018 # "warning: -Wuninitialized is not supported without -O"
0019 FFLAGS="$FFLAGS -fendian=big -fimplicit-none"
0020
0021 if test "x$IEEE" = x ; then
0022 # No need for IEEE-754
0023 FOPTIM='-O3 -malign-double -funroll-loops'
0024 else
0025 # Try to follow IEEE-754
0026 has_sse2=f
0027 grep flags /proc/cpuinfo | grep sse2 > /dev/null 2>&1 && has_sse2=t
0028 if test "x$has_sse2" = xt ; then
80497dc312 Cons*0029 FOPTIM='-mfpmath=sse -msse -msse2'
84a44edf6c Cons*0030 else
80497dc312 Cons*0031 FOPTIM='-ffloat-store'
84a44edf6c Cons*0032 fi
0033 # echo 'FFLAGS="'$FFLAGS'"'
80497dc312 Cons*0034 FOPTIM="-O0 -malign-double $FOPTIM"
84a44edf6c Cons*0035 fi
0036 F90FLAGS=$FFLAGS
0037 F90OPTIM=$FOPTIM
0038 CFLAGS=$FOPTIM
0039
0040 if [ "x$NETCDF_ROOT" != x ] ; then
0041 INCLUDEDIR="${NETCDF_ROOT}/include"
0042 INCLUDES="-I${NETCDF_ROOT}/include"
0043 LIBDIR="${NETCDF_ROOT}/lib"
0044 LIBS="-L${NETCDF_ROOT}/lib"
0045 elif [ "x$NETCDF_HOME" != x ]; then
0046 INCLUDEDIR="${NETCDF_HOME}/include"
0047 INCLUDES="-I${NETCDF_HOME}/include"
0048 LIBDIR="${NETCDF_HOME}/lib"
0049 LIBS="-L${NETCDF_HOME}/lib"
0050 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
0051 NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
0052 NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
0053 INCLUDEDIR="${NETCDF_INC}"
0054 INCLUDES="-I${NETCDF_INC}"
0055 LIBDIR="${NETCDF_LIB}"
0056 LIBS="-L${NETCDF_LIB}"
0057 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
0058 INCLUDEDIR="${NETCDF_INCDIR}"
0059 INCLUDES="-I${NETCDF_INCDIR}"
0060 LIBDIR="${NETCDF_LIBDIR}"
0061 LIBS="-L${NETCDF_LIBDIR}"
0062 elif test -d /usr/include/netcdf-3 ; then
0063 INCLUDES='-I/usr/include/netcdf-3'
0064 LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3'
0065 elif test -d /usr/include/netcdf ; then
0066 INCLUDES='-I/usr/include/netcdf'
0067 elif test -d /usr/local/netcdf ; then
0068 INCLUDES='-I/usr/local/netcdf/include'
0069 LIBS='-L/usr/local/netcdf/lib'
0070 elif test -d /usr/local/include/netcdf.inc ; then
0071 INCLUDES='-I/usr/local/include'
0072 LIBS='-L/usr/local/lib64'
0073 fi