Index: debian/rules |
diff --git a/debian/rules b/debian/rules |
index 9232e98b0835e74eab6161c223f0936307b05212..480e073e7127e9916fa924e400d1b431549ace2c 100755 |
--- a/debian/rules |
+++ b/debian/rules |
@@ -4,45 +4,17 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-# Uncomment this to turn on verbose mode. |
-#export DH_VERBOSE=1 |
- |
-build: build-stamp |
- dh_auto_build |
- |
-build-stamp: |
- dh_testdir |
- touch $@ |
- |
-clean: |
- dh_testdir |
- dh_testroot |
- rm -f build-stamp |
- dh_auto_clean |
- dh_clean |
- |
-install: |
- dh_testdir |
- dh_testroot |
- dh_prep |
- dh_installdirs |
- dh_install gpt usr/bin |
- dh_strip |
- |
-# Build architecture-independent files here. |
-binary-indep: install |
- dh_testdir |
- dh_testroot |
- dh_link |
- dh_strip |
- dh_compress |
- dh_fixperms |
- dh_installdeb |
- dh_shlibdeps |
- dh_gencontrol |
- dh_md5sums |
- dh_builddeb |
- |
-binary: binary-indep |
- |
-.PHONY: build clean install binary-indep binary |
+# TODO: This might become unnecessary if we start setting CC centrally. |
+DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
+DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
+ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) |
+CC := gcc |
+else |
+CC := $(DEB_HOST_GNU_TYPE)-gcc |
+endif |
+ |
+%: |
+ dh $@ |
+ |
+override_dh_auto_build: |
+ dh_auto_build -- CC=$(CC) |