########################################################################################
#### Generic configuration file for Linux with x86_64 processor and the GNU compiler
####
#### Please do not edit this file to configure - instead make a copy called
#### makefile-default or makefile-HOSTNAME and edit that file.
####


#### Python executable.  Uncomment and set to python3 to compile for Python 3
#PYTHON=python


#### Compilers and compilation flags

# Uncomment to enable OpenMP support
#OPENMPFLAGS = -openmp

# C and C++ compiler and compilation flags.  You enable OpenMP support here.
# OpenMP is currently only supported in the parallel version.
CC=gcc
CXX=g++
CFLAGS = -O3 -g -march=native -m64 -pipe -fPIC -ffast-math -Wall -Wno-sign-compare -Wno-unused-function -Wno-terminate
CXXFLAGS = $(CFLAGS)

ASAP_SET_RPATH=-Wl,-rpath=

# Compilation flags for parallel simulations
MPICFLAGS = $(CFLAGS) $(OPENMPFLAGS)
MPICXXFLAGS = $(MPICFLAGS)

# Extra libraries and flags needed when linking the executable for parallel simulations
EXTRA_LIBS =  $(OPENMPFLAGS)

# Enable PARPOSTFIX if the compilation flags for parallel and serial code is different,
# e.g. if to OpenMP is enabled in one case.
ifdef OPENMPFLAGS
PARPOSTFIX = -par
endif

# 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


#### Compilation flags and command that may need to be changed on special architectures.
#### The values in the comments are a good starting point.

# Compilation command for linking shared object
#CXXSHARED = $(CXX) -shared

# Libraries for linkage.  LIBS is for both serial and parallel version, EXTRA_LIBS is for parallel only.
#LIBS = -lm

# Dependency generation
#DEPENDFLAG = -MM
#DEPENDCLEAN = sed -e 's@/usr/[^ ]*@@g' | sed -e '/^ *\\ *$$/d'
