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
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