]> code.citadel.org Git - citadel.git/blobdiff - libcitadel/debian/rules
fix source so that '-Wformat -Werror=format-security' doesn't stop us from compiling
[citadel.git] / libcitadel / debian / rules
index 10af4c02b02b9423f275b0b7ba8f50afc1f4b352..5a280ac159c75a19636b12daa15aed91d3b3699c 100755 (executable)
@@ -9,8 +9,10 @@ export DH_COMPAT = 5
 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-CFLAGS = -Wall -g
-LDFALGS = 
+CFLAGS = -Wall -g  -Wformat -Werror=format-security
+#-finline-functions
+LDFALGS =
+# -finline-functions
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0 -ggdb -rdynamic -MD -MP -D DEBUG -D VALGRIND
        EXTRA_ARGS =  --with-backtrace
@@ -23,6 +25,16 @@ ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS)))
        LDFLAGS += -pg
 endif
 
+ifneq (,$(findstring sprofiling,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -D SIZE_DEBUG
+endif
+
+ifneq (,$(findstring gcov,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -fprofile-arcs -ftest-coverage
+       LDFLAGS += -fprofile-arcs -ftest-coverage
+endif
+
+
 build: build-stamp
 build-stamp:
        dh_testdir