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