--- MITgcm/tools/build_options/darwin_ia32_gfortran 2008/05/09 00:23:01 1.3 +++ MITgcm/tools/build_options/darwin_ia32_gfortran 2010/03/21 22:22:52 1.10 @@ -1,20 +1,29 @@ #!/bin/bash - -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/build_options/darwin_ia32_gfortran,v 1.3 2008/05/09 00:23:01 dimitri Exp $ # -# tested on MacBook Pro -# on 28-Nov-2006 +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/build_options/darwin_ia32_gfortran,v 1.10 2010/03/21 22:22:52 jmc Exp $ +# $Name: $ + +# tested on MacBook Pro with Snow Leopard +# on 20-Nov-2009 +# gcc and gfortran obtained from +# http://hpc.sourceforge.net/ +# http://prdownloads.sourceforge.net/hpc/gcc-snwleo-intel-bin.tar.gz?download +# http://prdownloads.sourceforge.net/hpc/gfortran-snwleo-intel-bin.tar.gz?download CPP='/usr/bin/cpp -traditional -P' FC=gfortran ###CC=gcc +#Following flag is needed when using 32-bit gfortran with 64-bit gcc, +#as can be the case right after switching to Snow Leopard. +#CFLAGS='-arch i386' LINK=gfortran NOOPTFLAGS='-O0' +EXTENDED_SRC_FLAG='-ffixed-line-length-132' S64='$(TOOLSDIR)/set64bitConst.sh' #EH3 MAKEDEPEND='${TOOLSDIR}/xmakedepend' #EH3 MAKEDEPEND=makedepend -DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4 -DNML_TERMINATOR' +DEFINES='-DWORDLENGTH=4 -DNML_TERMINATOR' INCLUDEDIRS='/sw/include' INCLUDES='-I/sw/include' LIBS='-L/sw/lib' @@ -29,10 +38,12 @@ # For IEEE, use the "-ffloat-store" option if test "x$IEEE" = x ; then - FFLAGS='-Wunused -Wuninitialized -fsecond-underscore' + FFLAGS='-Wunused -Wuninitialized -fsecond-underscore -fconvert=big-endian' FOPTIM='-O3 -funroll-loops' + NOOPTFLAGS='-O2 -funroll-loops' + NOOPTFILES='gad_c4_adv_x.F gad_u3_adv_x.F' else - FFLAGS='-Wunused -ffloat-store -fsecond-underscore' + FFLAGS='-Wunused -ffloat-store -fsecond-underscore -fconvert=big-endian' FOPTIM='-O0' fi