X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=libcitadel%2Fdebian%2Frules;h=11d290b9cba6fa94cce44cfaefd5f5bd329b1619;hp=f2977731ade2d869358413dffb6e202ed8538182;hb=c61baece6da8cab2526f09cb9fef974507e87dc5;hpb=f0e6b0183e4739e5fe35fbc8bd116c7b219c0ab7 diff --git a/libcitadel/debian/rules b/libcitadel/debian/rules index f2977731a..11d290b9c 100755 --- a/libcitadel/debian/rules +++ b/libcitadel/debian/rules @@ -9,13 +9,16 @@ 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 else - CFLAGS += -O2 +# CFLAGS += -O2 -fPIC + CFLAGS += -O0 -ggdb -rdynamic -MD -MP -D DEBUG -D VALGRIND endif ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS))) @@ -23,12 +26,21 @@ 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 @@ -42,7 +54,7 @@ clean: dh_testroot rm -f build-stamp install*-stamp - -$(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) distclean dh_clean @@ -78,14 +90,14 @@ binary-indep: build install 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