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
else
- CFLAGS += -O2
+# CFLAGS += -O2 -fPIC
+ CFLAGS += -O0 -ggdb -rdynamic -MD -MP -D DEBUG -D VALGRIND
endif
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
-# ./configure
- CFLAGS="$(CFLAGS)"; LDFLAGS="$(LDFLAGS)"; ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
+ export CFLAGS="$(CFLAGS)"; export LDFLAGS="$(LDFLAGS)"; ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
$(EXTRA_ARGS) \
--prefix=/usr
dh_testroot
rm -f build-stamp install*-stamp
- -$(MAKE) distclean
+ [ ! -f Makefile ] || $(MAKE) distclean
dh_clean
binary-arch: build install
dh_testdir -a
dh_testroot -a
-# dh_installdocs -plibcitadel1
- dh_installchangelogs -plibcitadel
+ dh_installchangelogs -a -plibcitadel4
+ dh_installdocs -a
dh_install -a --sourcedir=debian/tmp
dh_link -a
- dh_strip -a --dbg-package=libcitadel1-dbg
+ dh_strip -a --dbg-package=libcitadel4-dbg
dh_compress -a
dh_fixperms -a
- dh_makeshlibs -a -V 'libcitadel1'
+ dh_makeshlibs -a -V
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a