Skip to content
Snippets Groups Projects
Commit a278a6c2 authored by Mulas, Giacomo's avatar Mulas, Giacomo
Browse files

There was no ifndef CXXFLAGS, thus its value was not respected if set outside

Added some indentation to make the ifdef nesting a bit less cryptic
parent 5410dfee
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,7 @@ ifdef USE_ILP64 ...@@ -61,7 +61,7 @@ ifdef USE_ILP64
ifndef MKL_ILP64 ifndef MKL_ILP64
override MKL_ILP64=1 override MKL_ILP64=1
endif #MKL_ILP64 endif #MKL_ILP64
endif endif #USE_ILP64
ifndef LAPACK_INCLUDE ifndef LAPACK_INCLUDE
# this is for the MKL implementation # this is for the MKL implementation
override LAPACK_INCLUDE=$(MKLROOT)/include override LAPACK_INCLUDE=$(MKLROOT)/include
...@@ -73,7 +73,7 @@ ifdef USE_ILP64 ...@@ -73,7 +73,7 @@ ifdef USE_ILP64
override LAPACK_LDFLAGS=-L$(MKLROOT)/lib -Wl,--no-as-needed -lmkl_intel_ilp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl override LAPACK_LDFLAGS=-L$(MKLROOT)/lib -Wl,--no-as-needed -lmkl_intel_ilp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl
else else
override LAPACK_LDFLAGS=-L$(MKLROOT)/lib -Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl override LAPACK_LDFLAGS=-L$(MKLROOT)/lib -Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl
endif endif #USE_ILP64
endif #LAPACK_LDFLAGS endif #LAPACK_LDFLAGS
# the next else refers to USE_MKL # the next else refers to USE_MKL
else #this is for when USE_MKL is _not_ defined else #this is for when USE_MKL is _not_ defined
...@@ -87,7 +87,7 @@ ifdef USE_ILP64 ...@@ -87,7 +87,7 @@ ifdef USE_ILP64
override LAPACK_LDFLAGS=-llapacke64 override LAPACK_LDFLAGS=-llapacke64
else else
override LAPACK_LDFLAGS=-llapacke override LAPACK_LDFLAGS=-llapacke
endif endif #USE_ILP64
endif #LAPACK_LDFLAGS endif #LAPACK_LDFLAGS
# the next endif is for USE_MKL # the next endif is for USE_MKL
endif endif
...@@ -96,6 +96,7 @@ endif ...@@ -96,6 +96,7 @@ endif
# define (outside) USE_MAGMA for magma support # define (outside) USE_MAGMA for magma support
ifdef USE_MAGMA ifdef USE_MAGMA
ifndef MAGMA_LDFLAGS
ifdef MAGMA_LIB ifdef MAGMA_LIB
override MAGMA_LDFLAGS= -L$(MAGMA_LIB) override MAGMA_LDFLAGS= -L$(MAGMA_LIB)
endif endif
...@@ -103,31 +104,34 @@ ifdef CUDA_HOME ...@@ -103,31 +104,34 @@ ifdef CUDA_HOME
override MAGMA_LDFLAGS+= -L$(CUDA_HOME)/lib64 override MAGMA_LDFLAGS+= -L$(CUDA_HOME)/lib64
endif endif
override MAGMA_LDFLAGS+= -lmagma -lcudart override MAGMA_LDFLAGS+= -lmagma -lcudart
#the next endif is for MAGMA_LDFLAGS
endif
#the next endif is for USE_MAGMA #the next endif is for USE_MAGMA
endif endif
# define (outside) USE_NVTX for NVIDIA profiling # define (outside) USE_NVTX for NVIDIA profiling
ifdef USE_NVTX ifdef USE_NVTX
override NVTX_FLAGS= -DUSE_NVTX ifndef NVTX_CXXFLAGS
override NVTX_CXXFLAGS= -DUSE_NVTX
ifdef CUDA_HOME ifdef CUDA_HOME
override NVTX_FLAGS+= -I$(CUDA_HOME)/include override NVTX_CXXFLAGS+= -I$(CUDA_HOME)/include
# closes CUDA_HOME # closes CUDA_HOME
endif endif
# closes NVTX_CXXFLAGS
endif
# closes USE_NVTX # closes USE_NVTX
endif endif
# CXXFLAGS defines the default compilation options for the C++ compiler # CXXFLAGS defines the default compilation options for the C++ compiler
ifndef CXXFLAGS ifndef CXXFLAGS
override CXXFLAGS=-O3 -ggdb -pg -coverage -I$(HDF5_INCLUDE) $(MPI_CXXFLAGS) $(NVTX_FLAGS) override CXXFLAGS=-O3 -ggdb -pg -coverage -I$(HDF5_INCLUDE) $(MPI_CXXFLAGS) $(NVTX_CXXFLAGS)
ifdef USE_OPENMP ifdef USE_OPENMP
override CXXFLAGS+= -fopenmp override CXXFLAGS+= -fopenmp
# closes USE_OPENMP # closes USE_OPENMP
endif endif
ifdef USE_ILP64 ifdef USE_ILP64
override CXXFLAGS+= -DUSE_ILP64 override CXXFLAGS+= -DUSE_ILP64
endif endif
ifdef USE_LAPACK ifdef USE_LAPACK
override CXXFLAGS+= -DUSE_LAPACK override CXXFLAGS+= -DUSE_LAPACK
ifdef USE_ILP64 ifdef USE_ILP64
...@@ -135,7 +139,6 @@ override CXXFLAGS+= -DLAPACK_ILP64 ...@@ -135,7 +139,6 @@ override CXXFLAGS+= -DLAPACK_ILP64
endif endif
# closes USE_LAPACK # closes USE_LAPACK
endif endif
ifdef USE_MKL ifdef USE_MKL
override CXXFLAGS+= -DUSE_MKL -I$(MKLROOT)/include override CXXFLAGS+= -DUSE_MKL -I$(MKLROOT)/include
ifdef USE_ILP64 ifdef USE_ILP64
...@@ -143,12 +146,10 @@ override CXXFLAGS+= -DMKL_ILP64 ...@@ -143,12 +146,10 @@ override CXXFLAGS+= -DMKL_ILP64
endif endif
# closes USE_MKL # closes USE_MKL
endif endif
ifdef USE_OPENMP ifdef USE_OPENMP
override CXXFLAGS+= -fopenmp override CXXFLAGS+= -fopenmp
# closes USE_OPENMP # closes USE_OPENMP
endif endif
ifdef USE_MAGMA ifdef USE_MAGMA
override CXXFLAGS+= -DUSE_MAGMA override CXXFLAGS+= -DUSE_MAGMA
ifdef CUDA_HOME ifdef CUDA_HOME
...@@ -162,11 +163,9 @@ override CXXFLAGS+= -DMAGMA_ILP64 ...@@ -162,11 +163,9 @@ override CXXFLAGS+= -DMAGMA_ILP64
endif endif
# closes USE_MAGMA # closes USE_MAGMA
endif endif
#closes CXXFLAGS #closes CXXFLAGS
endif endif
# HDF5_LIB defines the default path to the HDF5 libraries to use # HDF5_LIB defines the default path to the HDF5 libraries to use
# CXXLDFLAGS defines the default linker flags to use for C++ codes # CXXLDFLAGS defines the default linker flags to use for C++ codes
ifndef CXXLDFLAGS ifndef CXXLDFLAGS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment