#### Override object directories to separate similar architectures.
OBJDIR = $(FYS_PLATFORM)$(POSTFIX)
BINDIR = $(OBJDIR)
DEPDIR = Nifl_foss
$(info FYS_PLATFORM detected - building for CAMd/CINF/Niflheim with OBJDIR=$(OBJDIR).)

#### Compilers and compilation flags

# Uncomment to enable OpenMP support
#OPENMPFLAGS = -fopenmp

#MKL_CFLAGS = -DASAP_MKL -I $(MKLROOT)/include
#MKL_LDFLAGS = -lmkl_rt

# C and C++ compiler and compilation flags.  You enable OpenMP support here.
# OpenMP is currently only supported in the parallel version.
#CC=icc
#CXX=icpc
#CFLAGS = -O3 -g -xHost -fPIC $(MKL_CFLAGS)

CC=gcc
CXX=g++
CFLAGS = -O3 -g -march=native -m64 -pipe -fPIC -ffast-math -Wall -Wno-sign-compare -Wno-unused-function -Wno-write-strings $(MKL_CFLAGS) $(OPENMPFLAGS)

CXXFLAGS = $(CFLAGS)
LIBS = $(MKL_LDFLAGS) -lm $(OPENMPFLAGS)

# Compilation flags for parallel simulations
#MPICC=mpiicc
#MPICXX=mpiicpc
#MPICFLAGS = -O3 -g -xHost $(OPENMPFLAGS)
MPICCFLAGS = -O3 -g -march=native -m64 -pipe -fPIC -ffast-math -Wall -Wno-sign-compare -Wno-unused-function -Wno-write-strings $(MKL_CFLAGS)
MPICXXFLAGS = $(MPICFLAGS)

# Enable PARPOSTFIX if the compilation flags for parallel and serial code is different.
PARPOSTFIX = -par

# Extra flags to silence compiler warnings in Interface and ParallelInterface
#IFACEFLAGS = -Wno-write-strings -Wno-strict-aliasing

# Extra flags to silence compiler warning for the Brenner potential
#BRENNERCFLAGS =  -Wno-strict-aliasing -Wno-unused
