diff options
author | Peter Powell <petpow@saberuk.com> | 2013-06-14 04:02:58 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2013-07-04 17:51:33 +0100 |
commit | 450e94945e08813538428f958b267baba1e4d5d1 (patch) | |
tree | bef052cc3197930b5626be085f940e359d9c6d25 /make | |
parent | 414d9f0b30542d9b90fcea4e8345b012050b7de7 (diff) |
Tidy up CXXFLAGS and LDFLAGS.
- Add -Iinclude at declaration instead of doing it later on.
- Add -Wextra -Wfatal-errors and -Wno-unused-parameter.
- Enable -Wall and -Wshadow on ICC.
- Remove -DPIC (useless).
- Remove empty declaration of LDFLAGS.
- Remove unneeded CXXFLAGS on Darwin.
Diffstat (limited to 'make')
-rw-r--r-- | make/template/main.mk | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/make/template/main.mk b/make/template/main.mk index 9d0e6e6d5..dc811e021 100644 --- a/make/template/main.mk +++ b/make/template/main.mk @@ -34,9 +34,8 @@ CC = @CC@ SYSTEM = @SYSTEM@ BUILDPATH = @BUILD_DIR@ SOCKETENGINE = @SOCKETENGINE@ -CXXFLAGS = -pipe -fPIC -DPIC +CXXFLAGS = -fPIC -pipe -Iinclude -Wall -Wextra -Wfatal-errors -Wno-unused-parameter -Wshadow LDLIBS = -pthread -lstdc++ -LDFLAGS = CORELDFLAGS = -rdynamic -L. $(LDFLAGS) PICLDFLAGS = -fPIC -shared -rdynamic $(LDFLAGS) BASE = "$(DESTDIR)@BASE_DIR@" @@ -51,12 +50,10 @@ INSTMODE_BIN = 0755 INSTMODE_LIB = 0644 @IFEQ $(CC) icc - CXXFLAGS += -Wshadow @ELSE - CXXFLAGS += -pedantic -Woverloaded-virtual -Wshadow -Wformat=2 -Wmissing-format-attribute -Wall + CXXFLAGS += -pedantic -Woverloaded-virtual -Wshadow -Wformat=2 -Wmissing-format-attribute @ENDIF - @IFEQ $(SYSTEM) linux LDLIBS += -ldl -lrt @ENDIF @@ -71,7 +68,6 @@ INSTMODE_LIB = 0644 INSTALL = ginstall @ENDIF @IFEQ $(SYSTEM) darwin - CXXFLAGS += -DDARWIN -frtti LDLIBS += -ldl CORELDFLAGS = -dynamic -bind_at_load -L. $(LDFLAGS) PICLDFLAGS = -fPIC -shared -twolevel_namespace -undefined dynamic_lookup $(LDFLAGS) @@ -102,8 +98,6 @@ DBGOK=0 @ENDIF FOOTER = finishmessage -CXXFLAGS += -Iinclude - @GNU_ONLY MAKEFLAGS += --no-print-directory @GNU_ONLY SOURCEPATH = $(shell /bin/pwd) |