start working on a way do do CLANG compilation.
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 1 Sep 2011 17:07:06 +0000 (17:07 +0000)
committerWilfried Goesgens <dothebart@citadel.org>
Thu, 1 Sep 2011 17:07:06 +0000 (17:07 +0000)
citadel/debian/rules

index 5c51eb473f202bc1d74720eb58abf7b9790ba5f9..a28907b67351e99aa685a5b077be315ffb79e4b7 100755 (executable)
@@ -13,10 +13,13 @@ DEB_DESTDIR = $(CURDIR)/debian/tmp
 
 CFLAGS = -Wall -g
 
-
+COMPILER=
 EXTRA_ARGS=
 PROFILE_ARGS=
-#to enable debugging: export DEB_BUILD_OPTIONS="debug profiling threadoff rss gcov"
+#to enable debugging: export DEB_BUILD_OPTIONS="debug profiling threadoff rss gcov clang"
+ifneq (,$(findstring clang,$(DEB_BUILD_OPTIONS)))
+        COMPILER="clang" 
+endif
 ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS)))
        PROFILE_ARGS= --with-gprof
 endif
@@ -57,7 +60,7 @@ configure: configure-stamp
 configure-stamp:
        dh_testdir
 
-       LDFLAGS="$(LDFLAGS)"; CFLAGS="$(CFLAGS)" ./configure \
+       CC=$(COMPILER); LDFLAGS="$(LDFLAGS)"; CFLAGS="$(CFLAGS)" ./configure \
                --prefix=/var/lib/citadel/ \
                --with-datadir=/var/lib/citadel/ \
                --with-helpdir=/usr/share/citadel-server/ \