#==========================================================
# CaMa-Flood Mkinclude (for Linux, Intel fortran)
#==========================================================
RM = /bin/rm -f
CP = /bin/cp

#======================================
# Pre-Prosessing options
# DMPI=-DUseMPI_CMF        : activate MPI parallelization
# DCDF=-DUseCDF_CMF        : activate netCDF, comment out when not needed
# DSINGLE=-DSinglePrec_CMF : activate Single Precision Mode
# DATM=-DNoAtom_CMF        : avoid OMP ATOMIC calculation (bit identical simulation)
#======================================

DCDF=-DUseCDF_CMF
#DMPI=-DUseMPI_CMF
DSINGLE=-DSinglePrec_CMF
#DATM=-DNoAtom_CMF

CFLAGS=$(DMPI) $(DCDF) $(DATM) $(DSINGLE)

#======================================
# Intel Fortran: Linux
#======================================

## without netCDF
#INC  = -I/opt/intel/include
#LIB  = -L/opt/intel/lib/intel64 -L/opt/intel/mkl/lib

# with netCDF
INC  = -I/opt/intel/include -I/opt/local/include -I/opt/local/netcdf-fortran/include
LIB  = -L/opt/intel/lib/intel64 -L/opt/intel/mkl/lib/intel64 -L/opt/local/lib -L/opt/local/netcdf-fortran/lib -lnetcdff

#==============================
# FCMP: main program (src/), FC: pre/post process (map/ etc/)
FCMP = ifort -qopenmp
#FCMP = mpif90 -qopenmp
#FCMP = mpif90
FC = ifort

LFLAGS =
FFLAGS = -O3 -warn all -fpp -free -assume byterecl -heap-arrays -nogen-interface -lpthread -static-intel

# Debug Mode
#FFLAGS = -check all  -warn all -fpp -free -assume byterecl -heap-arrays -std -nogen-interface -lpthread -fpe0 -ftrapuv -traceback  -static-intel
