Commit 695f5ded authored by Rainer Weinberger's avatar Rainer Weinberger

added SYSTYPE "Ubuntu" to Makefile

parent 1a40bb80
......@@ -37,6 +37,7 @@ CONFIGVARS := $(shell cat $(BUILD_DIR)/arepoconfig.h)
RESULT := $(shell SRC_DIR=$(SRC_DIR) BUILD_DIR=$(BUILD_DIR) ./git_version.sh)
# Default
MPICH_INCL =
MPICH_LIB = -lmpich
GMP_LIB = -lgmp
GSL_LIB = -lgsl -lgslcblas
......@@ -63,6 +64,29 @@ HDF5_INCL = -I/opt/local/include -DH5_USE_16_API
HDF5_LIB = -L/opt/local/lib -lhdf5 -lz
HWLOC_INCL= -I/opt/local/include
endif
# end of Darwin
# Ubuntu Linux
ifeq ($(SYSTYPE),"Ubuntu")
# compiler and its optimization options
OPTIMIZE = -std=c11 -ggdb -O3 -Wall -Wno-format-security -Wno-unknown-pragmas -Wno-unused-function
# overwrite default:
MPICH_INCL= -I/usr/lib/x86_64-linux-gnu/openmpi/include/
MPICH_LIB = -L/usr/lib/x86_64-linux-gnu/openmpi/lib/ -lmpi
GSL_INCL =
GSL_LIB = -lgsl -lgslcblas
HWLOC_LIB = -lhwloc
# libraries that are included on demand, depending on Config.sh options
FFTW_INCL =
FFTW_LIBS =
HDF5_INCL = -I/usr/include/hdf5/serial/ -DH5_USE_16_API
HDF5_LIB = -L/usr/lib/x86_64-linux-gnu/hdf5/serial/ -lhdf5 -lz
HWLOC_INCL=
endif
# end of Ubuntu
# insert the library paths for your system here, similar to SYSTYPE "Darwin" above
......@@ -292,7 +316,7 @@ endif
#combine compiler options#
##########################
CFLAGS = $(OPTIMIZE) $(HDF5_INCL) $(GSL_INCL) $(FFTW_INCL) $(HWLOC_INCL) -I$(BUILD_DIR)
CFLAGS = $(OPTIMIZE) $(MPICH_INCL) $(HDF5_INCL) $(GSL_INCL) $(FFTW_INCL) $(HWLOC_INCL) -I$(BUILD_DIR)
LIBS = $(GMP_LIB) $(MATH_LIB) $(MPICH_LIB) $(HDF5_LIB) $(GSL_LIB) $(FFTW_LIB) $(HWLOC_LIB)
......@@ -388,4 +412,3 @@ $(BUILD_DIR)/Makefile.check: Makefile Template-Config.sh defines_extra check.py
$(BUILD_DIR)/Config.check: Template-Config.sh check.py
@$(PYTHON) check.py 4 Template-Config.sh $@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment