File: rules

package info (click to toggle)
box64 0.3.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 22,576 kB
  • sloc: ansic: 333,323; python: 2,695; asm: 1,014; makefile: 266; sh: 83; cpp: 45
file content (39 lines) | stat: -rwxr-xr-x 1,238 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
#!/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:
	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

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