#!/bin/bash
#
#  $Header: /u/gcmpack/MITgcm/tools/build_options/sp5+mpi,v 1.1 2006/06/27 11:23:43 heimbach Exp $
#

#  tested on bluevista, ce107 Sep 2007
#  using the following invocation:
#    ../../../tools/genmake2 -mods=../code -of=../../../tools/build_options/sp5+mpi -make=gmake

S64='$(TOOLSDIR)/set64bitConst.sh'
MAKEDEPEND=makedepend

# NML_TERMINATOR should enable using "&" as terminator, but doesnt work
DEFINES='-DTARGET_AIX -DWORDLENGTH=4 -DNML_TERMINATOR'

INCLUDES='-I/usr/lpp/ppe.poe/include/thread64 -I/usr/local/include'
CPP='/lib/cpp -P'
# The -q64 is redundant on bluevista, default mode is 64bit
CC='xlc_r -q64'
FC='xlf95_r -q64'
LINK='xlf95_r -q64'
LIBS='-lmass -L/usr/local/lib64/r4i4 -L/usr/local/lib64 -L/usr/local/lib'
FFLAGS='-qfixed=132' 
if test "x$IEEE" = x ; then
    #  No need for IEEE-754
    FOPTIM='-O3 -Q -qarch=auto -qtune=auto -qcache=auto -qmaxmem=-1'
    CFLAGS='-O3 -Q -qarch=auto -qtune=auto -qcache=auto -qmaxmem=-1'
else
    #  Try to follow IEEE-754
    FOPTIM='-O3 -qstrict -Q -qarch=auto -qtune=auto -qcache=auto -qmaxmem=-1'
    CFLAGS='-O3 -qstrict -Q -qarch=auto -qtune=auto -qcache=auto -qmaxmem=-1'
fi
#
# useful for netcdf
FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X"
#
# useful for timing, but not all libs availale on bluevista
#HPMTINC='-I/usr/local/include'
#HPMTLIB='-L/usr/local/lib -lhpm -lpmapi'
#GSLINC='-I/homebv/evangeli/gsl-1.5/include'
#GSLLIB='-L/homebv/evangeli/gsl-1.5/lib64 -lgsl -lgslcblas'
#PAPIINC='-I/usr/local/include'
#PAPILIB='-L/usr/local/lib -lpapi'
