# modules: CrayGNU cray-fftw cray-python 
CC       = cc
CPP      = 
FC       = ftn
LD       = ftn
AR       = ar -r

CP2K_ROOT=/scratch/snx3000/hjudge/CP2K/build-cpu

DFLAGS   = -D__FFTW3 -D__parallel -D__SCALAPACK -D__LIBINT -D__GFORTRAN -D__ELPA -D__LIBXC
CFLAGS   = $(DFLAGS) -g -O3 -mavx -fopenmp -march=native -mtune=native
CXXFLAGS = $(CFLAGS)

FCFLAGS  = $(DFLAGS) -O3 -mavx -fopenmp -funroll-loops -ftree-vectorize -ffree-form -ffree-line-length-512 -march=native -mtune=native
FCFLAGS  += -I$(CP2K_ROOT)/libs/libint/include 
FCFLAGS  += -I$(CP2K_ROOT)/libs/libxc/include
FCFLAGS  += -I$(CP2K_ROOT)/libs/elpa-openmp/include/elpa_openmp-2020.05.001/modules -I$(CP2K_ROOT)/libs/elpa-openmp/include/elpa_openmp-2020.05.001/elpa
LDFLAGS  = $(FCFLAGS)
LIBS   	 = -lfftw3 -lfftw3_threads
LIBS     += -L$(CP2K_ROOT)/libs/libint/lib -lint2 -lstdc++ 
LIBS     += -L$(CP2K_ROOT)/libs/libxc/lib -lxcf90 -lxcf03 -lxc
LIBS     += -L$(CP2K_ROOT)/libs/elpa-openmp/lib -lelpa_openmp

