# by default some intel compilers put temporaries on the stack
# this might lead to segmentation faults if the stack limit is set to low
# stack limits can be increased by sysadmins or e.g with ulimit -s 256000
# furthermore new ifort (tested to work fine with 10.0.025) compilers support the option
# -heap-arrays 64
# add this to the compilation flags if the other options do not work
# Tested on a HP Integrity rx4640 SMP machine with 4 Itanium2 (1.5 GHz)
# The Intel Fortran compiler version 8.0 did not work,
# but version 7.1 worked for the arguments below.
# Note: -O2 produces an executable which is slightly faster than -O3
# and the compilation time was also much shorter.
CC       = cc
CPP      = cpp
FC       = efc -FR
FC_fixed = efc -FI
LD       = efc
AR       = ar -r
DFLAGS   = 
CPPFLAGS = -C $(DFLAGS) -P -traditional
FCFLAGS  = -O2 -Vaxlib -tpp2
LDFLAGS  = $(FCFLAGS) -L/apps/intel_mkl_61/mkl61/lib/64
LIBS     = -lmkl_lapack -lmkl -lguide

##For compiler 11.0 one may want to try the following flags:
#CFLAGS  = -O2 -i-static -heap-arrays 64 -free -fpp -unroll
##Linking of MKL for older Intel versions before the new one-pack composers
#LDFLAGS  = $(FCFLAGS) -L$(HOME)/lib -L/opt/intel/Compiler/11.1/072/mkl/lib/em64t
#LIBS     = -Wl,--start-group -lmkl_intel_lp64 \
#           -lmkl_intel_thread -lmkl_core -Wl,--end-group \
#           -lm -lpthread -liomp5 -openmp
