#
# flags that should be defined for this platform. example below is for Intel 32 bit under linux
# this file is necessary for our r.f77, r.f90, r.compile, r.build utilities to work properly
#
define="-DLittle_Endian -Di386=i386"
# name of the mpi library -l${MPI_LIB} will be added for loading
MPI_LIB=${MPI_LIB:-mpich}
# mpi compiler calls for FORTRAN and C (depends on the local mpi implementation, this is for mpich)
MPI_FC="mpif90 "
MPI_CC=mpicc
# name of the FORTRAN compiler to use for .f files
FC=${F77C:-ifort}
# name of the FORTRAN compiler to use for .f90 files
F90C=${F90C:-ifort}
# name of the C compiler
CC="cc"
# flags to add if shared objects are desired (not fully debugged)
FC_SHARED="-shared"
CC_SHARED="-shared"
# in some cases the compiler does not use -I -L or -l
Iprefix="-I"
Lprefix="-L"
lprefix="-l"
# basic options to the FORTRAN compiler. position independent code is desirable, BIG ENDIAN I/O is necessary 
#                                        include path should include $ARMNLIB/include $ARMNLIB/include/$ARCH
#                                        include path should include current directory
#                                        loader path to $ARMNLIB/lib/$ARCH is usually a good idea
FC_options=${FC_options:-"-assume byterecl -automatic -convert big_endian -fpe0 -fpic ${Iprefix}. ${Iprefix}${ARMNLIB}/include ${Iprefix}${ARMNLIB}/include/${ARCH} -Wl,-rpath,${ARMNLIB}/lib/${ARCH}"}
# flags to add to the FORTRAN compiler to get OpenMP support
OPENMP="-openmp -lpthread"
# flags to add to the C compiler to get OpenMP support
OPENMPCC="-D_REENTRANT -D_THREAD_SAFE  -lpthread"
# basic options to the C compiler, example below is for gcc , position independent code is desirable
#                                        include path should include $ARMNLIB/include $ARMNLIB/include/$ARCH
#                                        include path should include current directory
CC_options="-Wtrigraphs -fpic -I. -I${ARMNLIB}/include -I${ARMNLIB}/include/${ARCH} -I."
# flags for the FORTRAN compiler to get different optimization levels
# level 2 is agggressive but still safe, level 0 is no optimization at all, level 4 is no holds barred
F_Opt[0]=-O0
F_Opt[1]=-O1
F_Opt[2]=-O2
F_Opt[3]=-O3
F_Opt[4]=-O3
# flags for the FORTRAN compiler to get the DEBUG mode
O_DEBUG="-g -ftrapuv -traceback"
# flags for the C compiler to get different optimization levels
# level 2 is agggressive but still safe, level 0 is no optimization at all, level 4 is no holds barred
C_Opt[0]=-O0
C_Opt[1]=-O1
C_Opt[2]=-O2
C_Opt[3]=-O2
C_Opt[4]=-O2
# flags for the FORTRAN compiler to get the PROFILE mode
prof_option="-p"
# the ar archiver, normally ar
AR=ar
# libraries containing the massvp (IBM vector library) entry points, standard and safe versions
# -l$VECTOR_LIBS or -l$VECTOR_LIBS_safe added to compiler call
VECTOR_LIBS=massvp4_safe
VECTOR_LIBS_safe=massvp4_safe
echo Compiler Rules applied
