File: rules

package info (click to toggle)
anna 1.44%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 756 kB
  • sloc: ansic: 827; makefile: 39
file content (23 lines) | stat: -rwxr-xr-x 542 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /usr/bin/make -f

export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CC := gcc
STRIP := strip
else
CC := $(DEB_HOST_GNU_TYPE)-gcc
STRIP := $(DEB_HOST_GNU_TYPE)-strip
endif

%:
	dh $@

override_dh_auto_build:
# Make small unless we are building a debug package.
ifeq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
	$(MAKE) small CC=$(CC) STRIP=$(STRIP)
else
	$(MAKE) DEBUG=1 CC=$(CC)
endif