diff --git a/config/common/buildSettings.mk b/config/common/buildSettings.mk index def143af698f2f77cb46a89b8b78026c7d4ef3fb..313a2368c9925fa349a55eaadaa7af7f63c3adf7 100644 --- a/config/common/buildSettings.mk +++ b/config/common/buildSettings.mk @@ -34,10 +34,10 @@ TCLSH ?= ${FSLDIR}/bin/fsltclsh # constructed in common/vars.mk # Compiler flags for C projects -ARCHCFLAGS = +ARCHCFLAGS = -std=c99 # Compiler flags for C++ projects. -ARCHCXXFLAGS = -D_GLIBCXX_USE_CXX11_ABI=0 +ARCHCXXFLAGS = -std=c++11 # Linker flags for all projects ARCHLDFLAGS = @@ -61,10 +61,11 @@ ifeq ($(SYSTYPE), Darwin) # Commands CC ?= cc CXX ?= c++ + LD ?= ld # Compiler flags ARCHCXXFLAGS += -arch x86_64 -Wall -pedantic -fPIC - ARCHCFLAGS += $(ARCHCXXFLAGS) -std=c99 + ARCHCFLAGS += -arch x86_64 -Wall -pedantic -fPIC ARCHLDFLAGS += -Wl,-search_paths_first ARCHLIBS += -llapack -lblas -lz -lm endif @@ -76,14 +77,16 @@ endif ##################################################################### ifeq ($(SYSTYPE), Linux) - # Commands + # Commands CC ?= gcc CXX ?= c++ + LD ?= ld # Compiler flags ARCHCFLAGS += -fexpensive-optimizations \ -Wall -pedantic -Wno-long-long -fPIC - ARCHCXXFLAGS += $(ARCHCFLAGS) + ARCHCXXFLAGS += -fexpensive-optimizations \ + -Wall -pedantic -Wno-long-long -fPIC ARCHLDFLAGS += -Wl,-rpath,'$$ORIGIN/../lib' ARCHLIBS += -lopenblas -lz -lm endif # if Linux diff --git a/config/common/vars.mk b/config/common/vars.mk index 174d274d3c77d67f459d7cd87b9f0b1eed9515c2..a984e970e081ecf9e850a73e6816d782c7c0d323 100644 --- a/config/common/vars.mk +++ b/config/common/vars.mk @@ -1,5 +1,10 @@ ######################################################### # Variables used for FSL project compilation/installation +# +# Default compiler/platform specific variables are +# initialised in buildSettings.mk, which is included +# before this file. Project specific variables are +# initialised in the project Makefile. ######################################################### # All projects must specify a name