File: rules

package info (click to toggle)
lz4 1.9.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,084 kB
  • sloc: ansic: 13,887; makefile: 1,030; python: 696; cpp: 173; sh: 110
file content (42 lines) | stat: -rwxr-xr-x 978 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

CPPFLAGS:= $(shell dpkg-buildflags --get CPPFLAGS) -DLZ4F_PUBLISH_STATIC_FUNCTIONS
CFLAGS:= $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:= $(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:= $(shell dpkg-buildflags --get LDFLAGS)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
PREFIX:= /usr

ifeq ($(origin CC),default)
CC := $(DEB_HOST_GNU_TYPE)-gcc
endif

export CFLAGS
export CPPFLAGS
export LDFLAGS
export PREFIX

disable_test=0
ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
disable_test=1
endif

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- CC=$(CC) V=1

override_dh_auto_install:
	dh_auto_install -- \
		CC=$(CC) \
		DESTDIR=$$(pwd)/debian/tmp \
		LIBDIR=$(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_auto_test:
ifeq "$(disable_test)" "0"
	make test
endif