Use the host compiler for build tool c-ify.
[darkstat-debian] / debian / rules
index f01ccfd..e63e77a 100755 (executable)
@@ -3,20 +3,28 @@
 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
+# CFLAGS += -Wall -g
+# 
+
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+-include /usr/share/dpkg/buildtools.mk
+CC_FOR_BUILD ?= cc
 
 configure: configure-stamp
 configure-stamp: 
        dh_testdir
        cp /usr/share/misc/config.sub /usr/share/misc/config.guess .
-       CFLAGS="$(CFLAGS)" LDFLAGS="$(INSTALL_PROGRAM)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --with-chroot-dir=/var/lib/darkstat
+       CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --disable-silent-rules
        touch $@
 
 build: configure-stamp build-stamp
+build-arch: build
+build-indep: build 
 
 build-stamp: configure-stamp
        dh_testdir
-       $(MAKE)
+       $(MAKE) HOSTCC=$(CC_FOR_BUILD)
        touch $@
 
 clean: