X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fdebian%2Frules;h=cd0a58efb6ba21143fa8755eec7df37de41fbf46;hb=3dd282daca51256fe10f464a9397625d67e96489;hp=34ce33f21998b0d501292e8d5b3df6888f05ef3b;hpb=648743a0675e248924797b252338adf0847632df;p=citadel.git diff --git a/webcit/debian/rules b/webcit/debian/rules index 34ce33f21..cd0a58efb 100755 --- a/webcit/debian/rules +++ b/webcit/debian/rules @@ -17,14 +17,19 @@ DESTDIR=$(CURDIR)/debian/citadel-webcit EXTRA_ARGS= PROFILE_ARGS= -#to enable debugging: export DEB_BUILD_OPTIONS="debug profiling compression urldebug" +COMPILER= +CFLAGS= +#to enable debugging: export DEB_BUILD_OPTIONS="debug profiling compression urldebug iodbg clang" +ifneq (,$(findstring clang,$(DEB_BUILD_OPTIONS))) + COMPILER="clang" +endif ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS))) PROFILE_ARGS= --with-gprof + LDFLAGS += -pg endif ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -ggdb -rdynamic -MD -MP -D TECH_PREVIEW -pedantic - LDFLAGS += -pg + CFLAGS += -O0 -ggdb -rdynamic -MD -MP -D TECH_PREVIEW -pedantic -Wformat-nonliteral EXTRA_ARGS = --with-backtrace else CFLAGS += -O2 @@ -33,6 +38,11 @@ ifneq (,$(findstring urldebug,$(DEB_BUILD_OPTIONS))) CFLAGS += -D DEBUG_URLSTRINGS endif +ifneq (,$(findstring iodbg,$(DEB_BUILD_OPTIONS))) + CFLAGS += -D SERV_TRACE +endif + + configure: patch configure-stamp configure-stamp: dh_testdir @@ -42,18 +52,16 @@ endif ifneq "$(wildcard /usr/share/misc/config.guess)" "" cp -f /usr/share/misc/config.guess config.guess endif - CFLAGS="$(CFLAGS)" ./configure \ + export CC=$(COMPILER); export CFLAGS=" -Wformat -Werror=format-security $(CFLAGS)"; ./configure \ --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr/sbin/ \ --with-wwwdir=/usr/share/citadel-webcit \ --with-localedir=/usr/share/ \ - --with-editordir=/usr/share/tinymce/www \ + --with-editordir=/usr/share/tinymce/www/ \ --with-rundir=/var/run/citadel \ - --with-ical --with-db --with-ldap \ --with-ssldir=/etc/ssl/webcit/ \ - --with-ssl --with-libiconf \ - --with-newt --with-included-gettext \ + --with-ssl \ --with-datadir=/var/run/citadel \ --enable-debug $(EXTRA_ARGS) $(PROFILE_ARGS)