#
# Makefile Macros generated from /glade/work/tcraig/NNA/rasm_nna.derecho_sample/scripts/ccsm_utils/Machines/config_compilers.xml using
# COMPILER=intel
# OS=LINUX
# MACH=derecho
#
CPPDEFS+= -DFORTRANUNDERSCORE -DNO_R16 -DHAVE_F2008_CONTIGUOUS $(CPPFLAGS)  -DLINUX -DCPRINTEL 

LDFLAGS+= -Wl,--allow-multiple-definition 

CFLAGS:= -O2 -fp-model precise  -g -march=core-avx2 -std=c99 -qno-opt-dynamic-align  -Wno-error=incompatible-function-pointer-types -Wno-error=implicit-function-declaration 

FC_AUTO_R8:= -r8 

FFLAGS:= -O2 -fp-model precise -convert big_endian -assume byterecl -ftz -traceback  -g -march=core-avx2 -qno-opt-dynamic-align 

FFLAGS_NOOPT:= -O0 

FIXEDFLAGS:= -fixed -132 

FREEFLAGS:= -free 

MPICC:= mpicc  

MPIFC:= mpif90 

PIO_CONFIG_OPTS:= --enable-filesystem-hints=lustre 

SCC:= icx 

SFC:= ifort 

SLIBS:= -L$(NETCDF_PATH)/lib -lnetcdf -lnetcdff 

ifeq ($(DEBUG), TRUE) 
   FFLAGS += -g -CU -check pointers -check bounds -fpe0 -ftz 
   CFLAGS += -g 
endif

ifeq ($(MODEL), cam) 
   FFLAGS +=  -O1 
endif

ifeq ($(compile_threaded), true) 
   CFLAGS += -qopenmp 
   FFLAGS += -qopenmp 
   LDFLAGS += -qopenmp 
endif

