summaryrefslogtreecommitdiff
path: root/make/template/main.mk
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2013-07-04 17:48:58 +0100
committerPeter Powell <petpow@saberuk.com>2013-07-04 17:55:23 +0100
commit240f34086a805dc4c3151aae00101f9bec6870df (patch)
tree87621d8cecc160fa7b2089f7b32a6c6b61cea324 /make/template/main.mk
parent8aff5d15d3434fa11974d01d3319f958ed548e7c (diff)
Rename CXXFLAGS to CORECXXFLAGS to respect users enviroment.
Diffstat (limited to 'make/template/main.mk')
-rw-r--r--make/template/main.mk20
1 files changed, 12 insertions, 8 deletions
diff --git a/make/template/main.mk b/make/template/main.mk
index 51ef01cff..fd094b578 100644
--- a/make/template/main.mk
+++ b/make/template/main.mk
@@ -34,7 +34,7 @@ CXX = @CC@
SYSTEM = @SYSTEM@
BUILDPATH = @BUILD_DIR@
SOCKETENGINE = @SOCKETENGINE@
-CXXFLAGS = -fPIC -pipe -Iinclude -Wall -Wextra -Wfatal-errors -Wno-unused-parameter -Wshadow
+CORECXXFLAGS = -fPIC -pipe -Iinclude -Wall -Wextra -Wfatal-errors -Wno-unused-parameter -Wshadow
LDLIBS = -pthread -lstdc++
CORELDFLAGS = -rdynamic -L. $(LDFLAGS)
PICLDFLAGS = -fPIC -shared -rdynamic $(LDFLAGS)
@@ -50,7 +50,7 @@ INSTMODE_BIN = 0755
INSTMODE_LIB = 0644
@IFNEQ $(CXX) icc
- CXXFLAGS += -pedantic -Woverloaded-virtual -Wshadow -Wformat=2 -Wmissing-format-attribute
+ CORECXXFLAGS += -pedantic -Woverloaded-virtual -Wshadow -Wformat=2 -Wmissing-format-attribute
@ENDIF
@IFNEQ $(SYSTEM) darwin
@@ -82,20 +82,20 @@ INSTMODE_LIB = 0644
DBGOK=0
@IFEQ $(D) 0
- CXXFLAGS += -O2
+ CORECXXFLAGS += -O2
@IFEQ $(CXX) g++
- CXXFLAGS += -g1
+ CORECXXFLAGS += -g1
@ENDIF
HEADER = std-header
DBGOK=1
@ENDIF
@IFEQ $(D) 1
- CXXFLAGS += -O0 -g3 -Werror
+ CORECXXFLAGS += -O0 -g3 -Werror
HEADER = debug-header
DBGOK=1
@ENDIF
@IFEQ $(D) 2
- CXXFLAGS += -O2 -g3
+ CORECXXFLAGS += -O2 -g3
HEADER = debug-header
DBGOK=1
@ENDIF
@@ -118,10 +118,14 @@ FOOTER = finishmessage
@ENDIF
@IFDEF PURE_STATIC
- CXXFLAGS += -DPURE_STATIC
+ CORECXXFLAGS += -DPURE_STATIC
@ENDIF
-@DO_EXPORT RUNCC RUNLD CXXFLAGS LDLIBS PICLDFLAGS VERBOSE SOCKETENGINE CORELDFLAGS
+# Add the users CXXFLAGS to the base ones to allow them to override
+# things like -Wfatal-errors if they wish to.
+CORECXXFLAGS += $(CXXFLAGS)
+
+@DO_EXPORT RUNCC RUNLD CORECXXFLAGS LDLIBS PICLDFLAGS VERBOSE SOCKETENGINE CORELDFLAGS
@DO_EXPORT SOURCEPATH BUILDPATH PURE_STATIC SPLIT_CC
# Default target