* StrBufExtract_token wouldn't reset its target buffer in all conditions.
[citadel.git] / libcitadel / debian / rules
index ec0451b78172cc3c7f6cab3dd0584db67e216989..4b88c184f1287fe2049b79bf77768660ae18e51c 100755 (executable)
@@ -10,19 +10,24 @@ 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 = 
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0 -ggdb -rdynamic -MD -MP -D DEBUG -D VALGRIND
 else
        CFLAGS += -O2
 endif
 
+ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -pg
+       LDFLAGS += -pg
+endif
+
 build: build-stamp
 build-stamp:
        dh_testdir
 
 # ./configure
-       CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
+       CFLAGS="$(CFLAGS)"; LDFLAGS="$(LDFLAGS)";  ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
                --prefix=/usr
 
 # Build libcitadel