* allow the debian build to enable profiling and backtrace independantly.
authorWilfried Göesgens <willi@citadel.org>
Sat, 8 Sep 2007 09:23:40 +0000 (09:23 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 8 Sep 2007 09:23:40 +0000 (09:23 +0000)
citadel/debian/rules

index a3dfde6e9210a7f6d5a363a64f2844aa4cfcc398..c0ca8031ced686c11f5ed43d536e1bc607eec81e 100755 (executable)
@@ -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