# Precompiler options
CPP_OPTIONS= -DMPI -DHOST=\"IFC91_ompi\" -DIFC \
-DnoAugXCmeta \
-DPGF90 \
-DMPI -DMPI_BLOCK=8000 \
-Duse_collective \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Duse_bse_te \
-Dtbdyn \
-Duse_shmem
CPP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)
FC = mpif90 -msse3 -axcore-avx2,core-avx-i
FCL = mpif90 -mkl
FREE = -free -names lowercase
FFLAGS = -assume byterecl -w
OFLAG = -O2 -msse3 -axcore-avx2,core-avx-i
OFLAG_IN = $(OFLAG)
DEBUG = -O0
INCS =-I$(MKLROOT)/include/fftw
#LAPACK = -lmkl_scalapack_lp64
BLACS = -lmkl_blacs_openmpi_lp64
#SCALAPACK = $(LAPACK) $(BLACS)
BLAS = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
FFTLIB = -lfftw3xf
#OBJECTS = fftmpi.o fftmpi_map.o fft3dfurth.o fft3dlib.o
OBJECTS = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o \
LLIBS = -L$(HPC_MKL_LIB) $(BLAS)
OBJECTS_O1 += fft3dfurth.o fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o
# For what used to be vasp.5.lib
CPP_LIB = $(CPP)
FC_LIB = $(FC)
CC_LIB = icc -msse3 -axcore-avx2,core-avx-i
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB = $(FREE)
OBJECTS_LIB= linpack_double.o getshmem.o
# For the parser library
CXX_PARS = icpc
LIBS += parser
LLIBS += -Lparser -lparser -lstdc++
# Normally no need to change this
SRCDIR = ../../src
BINDIR = ../../bin