File: rules

package info (click to toggle)
arm-compute-library 20.08%2Bdfsg-5
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 40,020 kB
  • sloc: cpp: 430,531; lisp: 44,077; ansic: 25,855; cs: 5,724; python: 1,030; sh: 348; makefile: 42
file content (59 lines) | stat: -rwxr-xr-x 1,803 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
DH_VERBOSE = 1

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

%:
	dh $@

ifeq ($(DEB_TARGET_ARCH),armhf)
ACL_ARCH := armv7a
else ifeq ($(DEB_TARGET_ARCH),arm64)
ACL_ARCH := arm64-v8a
endif

VERSION=$(shell dpkg-parsechangelog -S version | awk '{split($$0,a,"-"); print a[1]}')

SCONS=scons
OPTIONS := arch=$(ACL_ARCH) opencl=1 neon=1 gles_compute=0 asserts=0 debug=0 Werror=0 os=linux build=native embed_kernels=1 set_soname=1 validation_tests=0 benchmark_tests=0
# Build log should be verbose unless 'terse' is set
ifneq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
    OPTIONS += -s
endif

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    OPTIONS += -j$(NUMJOBS)
endif
# support nostrip and debug too?

override_dh_auto_build-arch:
	$(SCONS) $(OPTIONS) install_dir=install
	# Generate pkgconfig files
	for lib in arm_compute arm_compute_core arm_compute_graph; do \
	sed -e "s/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/" < debian/lib$${lib}.pc.in > debian/$${lib}.pc && \
	sed -i -e "s:@VERSION@:$(VERSION):" debian/$${lib}.pc; \
	done

override_dh_auto_build-indep:
	mkdir -p build/docs
	doxygen docs/Doxyfile && touch debian/docs.stamp

DOCDIR=debian/tmp
override_dh_auto_install-indep: debian/docs.stamp
	mkdir -p $(DOCDIR)
	rm -f build/docs/html/*.md5
	cp -a --reflink=auto build/docs/html $(DOCDIR)
	cp -a debian/ACL_logo.png $(DOCDIR)

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build
	rm -rf documentation
	rm -rf .sconf_tem/ .sconsign.dblite config.log
	rm -f debian/arm_*.pc
	rm -f debian/docs.stamp