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
ifndef MKL_ILP64
override MKL_ILP64=1
endif #MKL_ILP64
endif
endif #USE_ILP64
ifndef LAPACK_INCLUDE
# this is for the MKL implementation
override LAPACK_INCLUDE=$(MKLROOT)/include
......@@ -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
else
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
# the next else refers to USE_MKL
else #this is for when USE_MKL is _not_ defined
......@@ -87,7 +87,7 @@ ifdef USE_ILP64
override LAPACK_LDFLAGS=-llapacke64
else
override LAPACK_LDFLAGS=-llapacke
endif
endif #USE_ILP64
endif #LAPACK_LDFLAGS
# the next endif is for USE_MKL
endif
......@@ -96,6 +96,7 @@ endif
# define (outside) USE_MAGMA for magma support
ifdef USE_MAGMA
ifndef MAGMA_LDFLAGS
ifdef MAGMA_LIB
override MAGMA_LDFLAGS= -L$(MAGMA_LIB)
endif
......@@ -103,31 +104,34 @@ ifdef CUDA_HOME
override MAGMA_LDFLAGS+= -L$(CUDA_HOME)/lib64
endif
override MAGMA_LDFLAGS+= -lmagma -lcudart
#the next endif is for MAGMA_LDFLAGS
endif
#the next endif is for USE_MAGMA
endif
# define (outside) USE_NVTX for NVIDIA profiling
ifdef USE_NVTX
override NVTX_FLAGS= -DUSE_NVTX
ifndef NVTX_CXXFLAGS
override NVTX_CXXFLAGS= -DUSE_NVTX
ifdef CUDA_HOME
override NVTX_FLAGS+= -I$(CUDA_HOME)/include
override NVTX_CXXFLAGS+= -I$(CUDA_HOME)/include
# closes CUDA_HOME
endif
# closes NVTX_CXXFLAGS
endif
# closes USE_NVTX
endif
# CXXFLAGS defines the default compilation options for the C++ compiler
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
override CXXFLAGS+= -fopenmp
# closes USE_OPENMP
endif
ifdef USE_ILP64
override CXXFLAGS+= -DUSE_ILP64
endif
ifdef USE_LAPACK
override CXXFLAGS+= -DUSE_LAPACK
ifdef USE_ILP64
......@@ -135,7 +139,6 @@ override CXXFLAGS+= -DLAPACK_ILP64
endif
# closes USE_LAPACK
endif
ifdef USE_MKL
override CXXFLAGS+= -DUSE_MKL -I$(MKLROOT)/include
ifdef USE_ILP64
......@@ -143,12 +146,10 @@ override CXXFLAGS+= -DMKL_ILP64
endif
# closes USE_MKL
endif
ifdef USE_OPENMP
override CXXFLAGS+= -fopenmp
# closes USE_OPENMP
endif
ifdef USE_MAGMA
override CXXFLAGS+= -DUSE_MAGMA
ifdef CUDA_HOME
......@@ -162,11 +163,9 @@ override CXXFLAGS+= -DMAGMA_ILP64
endif
# closes USE_MAGMA
endif
#closes CXXFLAGS
endif
# HDF5_LIB defines the default path to the HDF5 libraries to use
# CXXLDFLAGS defines the default linker flags to use for C++ codes
ifndef CXXLDFLAGS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment