Makefile: add $(DEVELOPER_CFLAGS) variable
[gitweb.git] / Makefile
index a8383b99397ad871654b401ed95ab272b3b07e85..feee885c93bc0f90939ea8bb048fa0ee1205012e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -375,6 +375,15 @@ GIT-VERSION-FILE: FORCE
 # CFLAGS and LDFLAGS are for the users to override from the command line.
 
 CFLAGS = -g -O2 -Wall
+DEVELOPER_CFLAGS = -Werror \
+       -Wdeclaration-after-statement \
+       -Wno-format-zero-length \
+       -Wold-style-definition \
+       -Woverflow \
+       -Wpointer-arith \
+       -Wstrict-prototypes \
+       -Wunused \
+       -Wvla
 LDFLAGS =
 ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
@@ -941,15 +950,7 @@ include config.mak.uname
 -include config.mak
 
 ifdef DEVELOPER
-CFLAGS += -Werror \
-       -Wdeclaration-after-statement \
-       -Wno-format-zero-length \
-       -Wold-style-definition \
-       -Woverflow \
-       -Wpointer-arith \
-       -Wstrict-prototypes \
-       -Wunused \
-       -Wvla
+CFLAGS += $(DEVELOPER_CFLAGS)
 endif
 
 ifndef sysconfdir