summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRomain Geissler <romain.geissler@amadeus.com>2023-07-13 12:39:45 +0000
committerMichael Grunder <michael.grunder@gmail.com>2023-07-13 11:27:05 -0700
commitbff171c9fc83f8abed9a283a3da2dc91a5671419 (patch)
tree178e2a84f03de74503313bdccbf93b5308f7ac6b /Makefile
parentd7a84df9ea9954c6847587784d9d1ecb7d09e909 (diff)
Allow disabling the -Werror flag.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index bd2106b..56e3d59 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,11 @@ export REDIS_TEST_CONFIG
CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++')
OPTIMIZATION?=-O3
-WARNINGS=-Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers
+WARNINGS=-Wall -Wextra -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers
+USE_WERROR?=1
+ifeq ($(USE_WERROR),1)
+ WARNINGS+=-Werror
+endif
DEBUG_FLAGS?= -g -ggdb
REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CPPFLAGS) $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) $(PLATFORM_FLAGS)
REAL_LDFLAGS=$(LDFLAGS)