From: Wilfried Göesgens Date: Sat, 8 Sep 2007 09:23:40 +0000 (+0000) Subject: * allow the debian build to enable profiling and backtrace independantly. X-Git-Tag: v7.86~3085 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=bc5603a39e943f823c4b1711931ba6e135b0824a;p=citadel.git * allow the debian build to enable profiling and backtrace independantly. --- diff --git a/citadel/debian/rules b/citadel/debian/rules index a3dfde6e9..c0ca8031c 100755 --- a/citadel/debian/rules +++ b/citadel/debian/rules @@ -10,12 +10,16 @@ DEB_DESTDIR = $(CURDIR)/debian/tmp CFLAGS = -Wall -g + +EXTRA_ARGS= +PROFILE_ARGS= +#to enable debugging: export DEB_BUILD_OPTIONS="debug profiling" +ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS))) + PROFILE_ARGS= --with-gprof +endif ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 -ggdb -rdynamic -D_GNU_SOURCE -MD -MP - LDFLAGS += -pg - SERVER_LDFLAGS += -lm -# SERVER_LDFLAGS += -pg - EXTRA_ARGS = --with-profiling --with-backtrace + EXTRA_ARGS = --with-backtrace else CFLAGS += -O2 endif @@ -40,7 +44,7 @@ configure-stamp: --with-ldap \ --with-libical \ --with-libsieve \ - --enable-debug $(EXTRA_ARGS) + --enable-debug $(EXTRA_ARGS) $(PROFILE_ARGS) touch configure-stamp