/[MITgcm]/MITgcm/tools/build_options/linux_amd64_sunf90
ViewVC logotype

Annotation of /MITgcm/tools/build_options/linux_amd64_sunf90

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Fri Mar 19 04:00:27 2010 UTC (14 years, 1 month ago) by ce107
Branch: MAIN
Changes since 1.1: +7 -3 lines
New and modified optfiles (removed -lsunmath) for Sun compilers

1 ce107 1.1 #!/bin/bash
2     #
3    
4     FC=f77
5     F90C=f90
6     CC=cc
7 ce107 1.2 LINK=${F90C}
8     FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"
9 ce107 1.1 DEFINES='-DWORDLENGTH=4'
10     CPP='cpp -traditional -P'
11     NOOPTFLAGS='-O0 -g -m64 -Kpic -xfilebyteorder=big16:%all -u -r8const'
12     NOOPTFILES=''
13 ce107 1.2 EXTENDED_SRC_FLAG='-e'
14     OMPFLAG='-xopenmp'
15 ce107 1.1
16     if test "x$DEVEL" != x ; then
17     FFLAGS='-xfilebyteorder=big16:%all -u -r8const -g -xs -C -xcommonchk -xcheck=init_local -fpover'
18     else
19     FFLAGS='-xfilebyteorder=big16:%all -u -r8const'
20     fi
21    
22     if test "x$IEEE" = x ; then
23     # No need for IEEE-754
24     FOPTIM='-fast -m64 -xvector=simd -xpad=local -Kpic'
25 ce107 1.2 LIBS="$LIBS -lmopt"
26 ce107 1.1 else
27     # Try to follow IEEE-754
28     # FOPTIM='-O0 -m64 -Kpic'
29     FOPTIM='-fast -m64 -xpad=local -fsimple=1 -Kpic'
30     fi
31     F90FLAGS=$FFLAGS
32     F90OPTIM=$FOPTIM
33 ce107 1.2 CFLAGS='-O3 -m64 -Kpic'
34 ce107 1.1
35     if [ "x$NETCDF_ROOT" != x ] ; then
36     INCLUDEDIR="${NETCDF_ROOT}/include"
37     INCLUDES="-I${NETCDF_ROOT}/include"
38     LIBDIR="${NETCDF_ROOT}/lib"
39     LIBS="-L${NETCDF_ROOT}/lib"
40     elif [ "x$NETCDF_HOME" != x ]; then
41     INCLUDEDIR="${NETCDF_HOME}/include"
42     INCLUDES="-I${NETCDF_HOME}/include"
43     LIBDIR="${NETCDF_HOME}/lib"
44     LIBS="-L${NETCDF_HOME}/lib"
45     elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
46     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
47     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
48     INCLUDEDIR="${NETCDF_INC}"
49     INCLUDES="-I${NETCDF_INC}"
50     LIBDIR="${NETCDF_LIB}"
51     LIBS="-L${NETCDF_LIB}"
52     elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
53     INCLUDEDIR="${NETCDF_INCDIR}"
54     INCLUDES="-I${NETCDF_INCDIR}"
55     LIBDIR="${NETCDF_LIBDIR}"
56     LIBS="-L${NETCDF_LIBDIR}"
57     elif test -d /usr/include/netcdf-3 ; then
58     INCLUDES='-I/usr/include/netcdf-3'
59     LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3'
60     elif test -d /usr/include/netcdf ; then
61     INCLUDES='-I/usr/include/netcdf'
62     elif test -d /usr/local/netcdf ; then
63     INCLUDES='-I/usr/local/netcdf/include'
64     LIBS='-L/usr/local/netcdf/lib'
65     elif test -d /usr/local/include/netcdf.inc ; then
66     INCLUDES='-I/usr/local/include'
67 ce107 1.2 LIBS='-L/usr/local/lib64 -L/usr/local/lib'
68 ce107 1.1 fi
69    

  ViewVC Help
Powered by ViewVC 1.1.22