File: rules

package info (click to toggle)
dumpet 2.1-4
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 152 kB
  • sloc: ansic: 908; makefile: 76
file content (22 lines) | stat: -rwxr-xr-x 614 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /usr/bin/make -f
%:
	dh $@

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))
CROSS :=
else
CROSS := \
	CC=$(DEB_HOST_GNU_TYPE)-gcc \
	PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config
endif

cflags := $(shell dpkg-buildflags --get CPPFLAGS)
cflags += $(shell dpkg-buildflags --get CFLAGS)
cflags += -Wall -Werror -D_FILE_OFFSET_BITS=64
ldflags := $(shell dpkg-buildflags --get LDFLAGS)

override_dh_auto_build:
	dh_auto_build -- $(CROSS) CFLAGS='$(cflags)' LFLAGS='$(ldflags)'