summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2014-08-09 03:43:32 -0700
committerJosh Haberman <jhaberman@gmail.com>2014-08-09 03:43:32 -0700
commitd869097400048af4b943e0679bab21b759facb80 (patch)
tree933247f287a427202dc98904419e7dd27e683574 /Makefile
parentcf2a959fa1fa48ca068dfecb6bee660b0a2ff395 (diff)
Make the absence of perf-cppflags give a good default build.
Defaults are now: - thread-safe with GCC/Clang - Debugging not enabled (enable with -UNDEBUG)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 4 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 16b14b0..5ad9251 100644
--- a/Makefile
+++ b/Makefile
@@ -7,17 +7,13 @@
#
# Summary of compiler flags you may want to use:
#
-# * -DNDEBUG: makes binary smaller and faster by removing sanity checks.
-# * -O3: optimize for maximum speed
+# * -UNDEBUG: enables assertions() (makes binary larger and slower)
+# * -O0: disable optimizations
+# * -g: enable debug symbols
# * -fomit-frame-pointer: makes code smaller and faster by freeing up a reg.
#
# Threading:
-# * -DUPB_USE_PTHREADS: configures upb to use pthreads r/w lock.
# * -DUPB_THREAD_UNSAFE: remove all thread-safety.
-# * -pthread: required on GCC to enable pthreads (but what does it do?)
-#
-# Other:
-# * -DUPB_UNALIGNED_READS_OK: makes code smaller, but not standard compliant
.PHONY: all lib clean tests test benchmarks benchmark descriptorgen
.PHONY: clean_leave_profile
@@ -49,7 +45,7 @@ CXX=g++
CFLAGS=-std=gnu99
CXXFLAGS=
INCLUDE=-Itests -I.
-CPPFLAGS=$(INCLUDE) -Wall -Wextra -Wno-sign-compare $(USER_CFLAGS)
+CPPFLAGS=$(INCLUDE) -DNDEBUG -Wall -Wextra -Wno-sign-compare $(USER_CFLAGS)
LDLIBS=-lpthread upb/libupb.a
LUA=lua # 5.1 and 5.2 should both be supported
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback