summaryrefslogtreecommitdiff
path: root/qpid/cpp/options.mk
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2006-10-24 21:13:01 +0000
committerAlan Conway <aconway@apache.org>2006-10-24 21:13:01 +0000
commit28a292ba973e13aaf2a83440b8d8bde576871ce7 (patch)
tree5daded52fc1b8a0010237c9210370135527cf400 /qpid/cpp/options.mk
parent7853774b9e2451cb4722eb63c53fc25a51c27b1a (diff)
downloadqpid-python-28a292ba973e13aaf2a83440b8d8bde576871ce7.tar.gz
Makefile support for optimized release build. Do make BUILD=RELEASE.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@467486 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/options.mk')
-rw-r--r--qpid/cpp/options.mk12
1 files changed, 8 insertions, 4 deletions
diff --git a/qpid/cpp/options.mk b/qpid/cpp/options.mk
index df9e2d62d1..563e232eee 100644
--- a/qpid/cpp/options.mk
+++ b/qpid/cpp/options.mk
@@ -23,7 +23,10 @@ EXTRA_LIBDIRS := -L/usr/local/apr/lib
## Compile flags
-DEBUG := -ggdb3 -O0
+# Release vs. debug flags, default to debug
+DEBUG := -ggdb3
+RELEASE := -O3 -DNDEBUG
+BUILD := DEBUG
# _USE_APR_IO_ set when APR IO build is desired.
DEFINES := -D _USE_APR_IO_
@@ -33,11 +36,12 @@ DEFINES := -D _USE_APR_IO_
# qpid-dev list.
#
# The following warnings deliberately omitted, they warn on valid code.
-# -Wno-unreachable-code -Wpadded
+# -Wno-unreachable-code -Wpadded -Winline
#
-WARN := -Werror -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Winline
+WARN := -Werror -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch
+
INCLUDES := -Isrc -Igen $(EXTRA_INCLUDES)
-CXXFLAGS := $(DEBUG) $(DEFINES) $(WARN) -MMD -fpic $(INCLUDES)
+CXXFLAGS := $($(BUILD)) $(DEFINES) $(WARN) -MMD -fpic $(INCLUDES)
## Link flags
# Allow exes to find libs without env changes. Remove for release builds.
LDFLAGS := -Llib $(EXTRA_LIBDIRS)