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
|