File: rules

package info (click to toggle)
skiboot 6.7.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 35,060 kB
  • sloc: ansic: 214,818; sh: 11,529; python: 3,418; cpp: 3,135; makefile: 1,773; perl: 1,479; asm: 1,445; tcl: 1,147; pascal: 107
file content (44 lines) | stat: -rwxr-xr-x 1,677 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
# Disable PIE flag has it makes opal-prd segfault
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
# Also force no-pie for Ubuntu 16.10 where gcc's defaults have been set to
# build Position Independent Executables (PIE) on amd64 and ppc64le (gcc was
# configured this way for s390x in Ubuntu 16.04 LTS).
export DEB_LDFLAGS_MAINT_APPEND = -no-pie


%:
	dh $@

override_dh_auto_build-arch:
ifneq (,$(filter $(DEB_TARGET_ARCH), ppc64 ppc64el))
	OPAL_PRD_VERSION=opal-prd-$(DEB_VERSION_UPSTREAM) make V=1 -C external/opal-prd/
endif
	GARD_VERSION=gard-$(DEB_VERSION_UPSTREAM) make V=1 -C external/gard/
	PFLASH_VERSION=pflash-$(DEB_VERSION_UPSTREAM) make V=1 -C external/pflash
	XSCOM_VERSION=xcom-$(DEB_VERSION_UPSTREAM) make V=1 -C external/xscom-utils

override_dh_auto_install-arch:
ifneq (,$(filter $(DEB_TARGET_ARCH), ppc64 ppc64el))
	make -C external/opal-prd/ prefix=/usr DESTDIR=../../debian/tmp/ install
endif
	make -C external/gard/ prefix=/usr DESTDIR=../../debian/tmp/ install
	make -C external/pflash/ prefix=/usr DESTDIR=../../debian/tmp/ install
	make -C external/xscom-utils/ prefix=/usr DESTDIR=../../debian/tmp/ install

override_dh_auto_clean:
	make -C external/opal-prd/ distclean
	make -C external/gard/ distclean
	make -C external/pflash/ distclean
	make -C external/xscom-utils/ distclean
	dh_auto_clean

override_dh_auto_test-arch:
	# We only run test for the directories we build utils from and where tests exists
	# gard tests : no support for FSP based build systems
	[ -d /proc/device-tree/fsps ] || make -C external/gard/ check