File: rules

package info (click to toggle)
box64 0.3.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,880 kB
  • sloc: ansic: 373,273; python: 2,845; asm: 1,201; makefile: 267; sh: 112; cpp: 45
file content (41 lines) | stat: -rwxr-xr-x 1,348 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# for DEB_HOST_ARCH
include /usr/share/dpkg/architecture.mk
# for DEB_VERSION_UPSTREAM
include /usr/share/dpkg/pkg-info.mk

%:
	dh $@ --buildsystem=cmake+ninja

ifeq ($(DEB_HOST_ARCH),amd64)
PLATFORMS=NOALIGN
else ifeq ($(DEB_HOST_ARCH),arm64)
PLATFORMS=ARM_DYNAREC RPI4ARM64 RK3588
else ifeq ($(DEB_HOST_ARCH),ppc64el)
PLATFORMS=PPC64LE
else ifeq ($(DEB_HOST_ARCH),riscv64)
PLATFORMS=RV64
endif

override_dh_auto_configure:
	set -exu; for p in $(PLATFORMS); do dh_auto_configure --builddirectory=build.$${p} -- -D$${p}=1 -DNOGIT=1 -DNO_LIB_INSTALL=1 -DBOX32=1 -DBOX32_BINFMT=1; done

override_dh_auto_build:
	# build docs/USAGE.md and docs/box64.pod
	env --chdir=docs/gen python3 ./gen.py
	pod2man --center "Manual" --release "box64 $(DEB_VERSION_UPSTREAM)" docs/box64.pod > docs/box64.1
	mkdir -p src/wrapped/generated
	set -exu; for p in $(PLATFORMS); do dh_auto_build --builddirectory=build.$${p}; done

override_dh_auto_install:
	set -exu; for p in $(PLATFORMS); do dh_auto_install --builddirectory=build.$${p} --destdir=debian/tmp.$${p}; done

override_dh_auto_clean:
	set -exu; for p in $(PLATFORMS); do dh_auto_clean --builddirectory=build.$${p}; done
	rm -f docs/box64.1 docs/USAGE.md docs/box64.pod

# https://github.com/ptitSeb/box64/issues/648
override_dh_auto_test: