1 |
#!/bin/bash |
2 |
|
3 |
# $Header: /u/gcmpack/MITgcm/tools/build_options/darwin_ia32_gfortran,v 1.8 2009/11/21 06:04:05 dimitri Exp $ |
4 |
# |
5 |
# tested on MacBook Pro with Snow Leopard |
6 |
# on 20-Nov-2009 |
7 |
# gcc and gfortran obtained from |
8 |
# http://hpc.sourceforge.net/ |
9 |
# http://prdownloads.sourceforge.net/hpc/gcc-snwleo-intel-bin.tar.gz?download |
10 |
# http://prdownloads.sourceforge.net/hpc/gfortran-snwleo-intel-bin.tar.gz?download |
11 |
|
12 |
CPP='/usr/bin/cpp -traditional -P' |
13 |
FC=gfortran |
14 |
###CC=gcc |
15 |
#Following flag is needed when using 32-bit gfortran with 64-bit gcc, |
16 |
#as can be the case right after switching to Snow Leopard. |
17 |
#CFLAGS='-arch i386' |
18 |
LINK=gfortran |
19 |
NOOPTFLAGS='-O0' |
20 |
EXTENDED_SRC_FLAG='-ffixed-line-length-132' |
21 |
|
22 |
S64='$(TOOLSDIR)/set64bitConst.sh' |
23 |
#EH3 MAKEDEPEND='${TOOLSDIR}/xmakedepend' |
24 |
#EH3 MAKEDEPEND=makedepend |
25 |
DEFINES='-DWORDLENGTH=4 -DNML_TERMINATOR' |
26 |
INCLUDEDIRS='/sw/include' |
27 |
INCLUDES='-I/sw/include' |
28 |
LIBS='-L/sw/lib' |
29 |
|
30 |
##INCLUDEDIRS='/Users/heimbach/NetCDF/netcdf-3.6.0-p1/gfortran/include' |
31 |
##INCLUDES='-I/Users/heimbach/NetCDF/netcdf-3.6.0-p1/gfortran/include' |
32 |
##LIBS='-L/Users/heimbach/NetCDF/netcdf-3.6.0-p1/gfortran/lib' |
33 |
|
34 |
###FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) _ ## X ## _" |
35 |
###FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X" |
36 |
###FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _" |
37 |
|
38 |
# For IEEE, use the "-ffloat-store" option |
39 |
if test "x$IEEE" = x ; then |
40 |
FFLAGS='-Wunused -Wuninitialized -fsecond-underscore -fconvert=big-endian' |
41 |
FOPTIM='-O3 -funroll-loops' |
42 |
NOOPTFLAGS='-O2 -funroll-loops' |
43 |
NOOPTFILES='gad_c4_adv_x.F gad_u3_adv_x.F' |
44 |
else |
45 |
FFLAGS='-Wunused -ffloat-store -fsecond-underscore -fconvert=big-endian' |
46 |
FOPTIM='-O0' |
47 |
fi |