# Library and include

INC_NETCDFF = -I${EBROOTNETCDFMINFORTRAN}/include
INC_NETCDF = -I${EBROOTNETCDF}/include
LIB_NETCDF = -L${EBROOTNETCDF}/lib64 -lnetcdf
LIB_NETCDFF = -L${EBROOTNETCDFMINFORTRAN}/lib -lnetcdff
INC_LAPACK = -I${EBROOTSCALAPACK}/include
LIB_LAPACK = -L${EBROOTSCALAPACK}/lib -lscalapack
LIB_BLAS = -L${EBROOTOPENBLAS}/lib -lopenblas
INC_BLAS = -I${EBROOTOPENBLAS}/include
INC_FFT = -I${EBROOTFFTW}/include
LIB_FFT = -L${EBROOTFFTW}/lib -lfftw3 -lfftw3_mpi

#INCS = $(INC_NETCDF) $(INC_FFT) $(INC_NETCDFF) $(INC_LAPACK) $(INC_BLAS)
INCS = $(INC_NETCDF) $(INC_FFT) $(INC_NETCDFF)                $(INC_BLAS)
LIBS = $(LIB_NETCDF) $(LIB_NETCDFF) $(LIB_FFT) $(LIB_LAPACK) $(LIB_BLAS)

CF90 = mpif90
CPPFLAGS = -D_G95_ -DQMPI
CF77 = $(CF90)
LD = $(CF90)
CPP = cpp -traditional-cpp
CC = mpicc

CPPARCH =
CPPFLAGS +=

SIZEO = -fdefault-real-8
OPTO = -O3 -fallow-argument-mismatch
DEBUG_FLAGS = #-g -traceback -W1 -warn unused -warn uncalled -debug extended -debug-parameters -ftrapuv -fpe0

FFLAGS = $(SIZEO) $(OPTO) $(DEBUG_FLAGS) $(INCS)
CFLAGS = -Df2cFortran $(OPTO) $(INCS)
LINKFLAGS = $(SIZEO) $(OPTO) $(DEBUG_FLAGS) $(LIBS)

# language-specific flags
#
F77FLG =
F90FLG =
