# Version "$Id: Makeinclude.Linux2_x86_64gfortmpi 1 2017-06-10 18:05:20Z coats $"
#
#  Build MPI/PnetCDF distributed-file support using "mpif90" and "mpcc",
#  where compilers are built "on top of" Gnu compilers
#
#  12/2013 by CJC: Conditional preprocessor-code "-DNEED_ARGS=1"
#  to implement  IARGC() and GETARG() for compilers
#  ("gfortran" version 4.8 or later to be exact) that insist on
#  enforcing F2003-only with no backwards nor industry-standards compatibility.
#
#  Remove "-DNEED_ARGS=1" from ARCHFLAGS for version 4.7.x and earlier
#
# Use "-march=native -mtune=native" if compile-platform and compute-platform
# are the same.
# Use "-Wall -Wsurprising" for full diagnostics.

AR   = ar
CC   = mpicc
CXX  = mpiCC
FC   = mpif90
M4   = m4
LINK = $(CC)

## Module-include-directory command
MODI = -I
E132 = -ffixed-line-length-132

MFLAGS    = -ffast-math -funroll-loops -m64  #  -Wall -Wsurprising -march=native -mtune=native

OMPFLAGS  = -fopenmp
OMPLIBS   = -fopenmp
COPTFLAGS = -O3 ${MFLAGS}
FOPTFLAGS = -O3 ${MFLAGS}
FPPFLAGS  = -DF90=1 -DIOAPI_PNCF=1
FSFLAGS   = -fno-automatic
ARCHFLAGS = \
 -DAUTO_ARRAYS=1 \
 -DF90=1 -DFLDMN=1 \
 -DFSTR_L=int \
 -DIOAPI_NO_STDOUT=1 \
 -DNEED_ARGS=1
PARFLAGS  =
ARCHLIB   = -dynamic -lm -lpthread -lc

M4DEFFILE = $(PVM_ROOT)/conf/$(PVM_ARCH).m4
PVMLIBS   = -lpvm3
