| OLD | NEW |
| 1 #!/usr/bin/make -f | 1 #!/usr/bin/make -f |
| 2 # -*- makefile -*- | 2 # -*- makefile -*- |
| 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # Uncomment this to turn on verbose mode. | 7 # TODO: This might become unnecessary if we start setting CC centrally. |
| 8 #export DH_VERBOSE=1 | 8 DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
| 9 DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
| 10 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) |
| 11 CC := gcc |
| 12 else |
| 13 CC := $(DEB_HOST_GNU_TYPE)-gcc |
| 14 endif |
| 9 | 15 |
| 10 build: build-stamp | 16 %: |
| 11 » dh_auto_build | 17 » dh $@ |
| 12 | 18 |
| 13 build-stamp: | 19 override_dh_auto_build: |
| 14 » dh_testdir | 20 » dh_auto_build -- CC=$(CC) |
| 15 » touch $@ | |
| 16 | |
| 17 clean: | |
| 18 » dh_testdir | |
| 19 » dh_testroot | |
| 20 » rm -f build-stamp | |
| 21 » dh_auto_clean | |
| 22 » dh_clean | |
| 23 | |
| 24 install: | |
| 25 » dh_testdir | |
| 26 » dh_testroot | |
| 27 » dh_prep | |
| 28 » dh_installdirs | |
| 29 » dh_install gpt usr/bin | |
| 30 » dh_strip | |
| 31 | |
| 32 # Build architecture-independent files here. | |
| 33 binary-indep: install | |
| 34 » dh_testdir | |
| 35 » dh_testroot | |
| 36 » dh_link | |
| 37 » dh_strip | |
| 38 » dh_compress | |
| 39 » dh_fixperms | |
| 40 » dh_installdeb | |
| 41 » dh_shlibdeps | |
| 42 » dh_gencontrol | |
| 43 » dh_md5sums | |
| 44 » dh_builddeb | |
| 45 | |
| 46 binary: binary-indep | |
| 47 | |
| 48 .PHONY: build clean install binary-indep binary | |
| OLD | NEW |