chiark / gitweb /
Finalise 4.4.0
[chiark-utils.git] / debian / rules
index d1ec8159e94953606bd694d5de08dc8a3925b1e5..35d00fe56d3b90872ac4b0cc84fa1701dc89fb2f 100755 (executable)
@@ -13,9 +13,16 @@ cwd= $(shell pwd)
 d=     $(cwd)/debian
 t=     $d/tmp
 
+makebuildargs := OPTIMISE= DEBUG= \
+ CMDLINE_CFLAGS="$(shell dpkg-buildflags --get CFLAGS)" \
+ CMDLINE_CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" \
+ CMDLINE_LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)"
+
 build:
        $(checkdir)
-       set -e; for s in $(subdirs_build_arch); do $(MAKE) -C $$s all; done
+       set -e; for s in $(subdirs_build_arch); do \
+               $(MAKE) -C $$s all $(makebuildargs); \
+       done
        touch build
 
 build-indep: build
@@ -84,8 +91,7 @@ binary-prep:
                mv really.8 $t/chiark-really/usr/share/man/man8/
        rm      $t/chiark-utils-bin/usr/sbin/trivsoundd \
                $t/chiark-utils-bin/usr/share/man/man8/trivsoundd.8
-       rmdir   $t/chiark-utils-bin/usr/sbin \
-               $t/chiark-utils-bin/usr/share/man/man8
+       rmdir   $t/chiark-utils-bin/usr/sbin
        #
        gzip -9f $t/*/usr/share/man/man*/*