Index: src/platform/monitor_reconfig/debian/rules |
diff --git a/src/platform/monitor_reconfig/debian/rules b/src/platform/monitor_reconfig/debian/rules |
index 3d75217b0715743f070d73ae4fb839b1a3ea75e7..f6beb2705f42d4c984c96ef3743476335860d387 100755 |
--- a/src/platform/monitor_reconfig/debian/rules |
+++ b/src/platform/monitor_reconfig/debian/rules |
@@ -1,9 +1,21 @@ |
#!/usr/bin/make -f |
# -*- makefile -*- |
+%: |
+ dh $@ |
# Uncomment this to turn on verbose mode. |
#export DH_VERBOSE=1 |
+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 |
+CXX := g++ |
+else |
+CC := $(DEB_HOST_GNU_TYPE)-gcc |
tedbo
2010/01/05 18:34:20
I'm curious why we don't have the builder set CC,
cjwatson
2010/01/06 17:35:44
We could, although it was relatively low-win to at
|
+CXX := $(DEB_HOST_GNU_TYPE)-g++ |
+endif |
+ |
CFLAGS = -Wall -g |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
@@ -12,43 +24,5 @@ else |
CFLAGS += -O2 |
endif |
-build: build-stamp |
-build-stamp: |
- dh_testdir |
- $(MAKE) |
- touch $@ |
- |
-clean: |
- dh_testdir |
- dh_testroot |
- rm -f build-stamp |
- $(MAKE) clean |
- dh_clean |
- |
-install: build |
- dh_testdir |
- dh_testroot |
- dh_clean -k |
- dh_installdirs |
- $(MAKE) DESTDIR=$(CURDIR)/debian/chromeos-monitor-reconfig install |
- |
- |
-binary-indep: |
- |
- |
-# Build architecture-dependent files here. |
-binary-arch: build 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-arch |
-.PHONY: build clean binary-indep binary-arch binary install |
+override_dh_auto_build: |
+ $(MAKE) CC=$(CC) CXX=$(CXX) CFLAGS="$(CFLAGS)" |