File: rules

package info (click to toggle)
arrayfire 3.3.2+dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, stretch
  • size: 109,016 kB
  • sloc: cpp: 127,909; lisp: 6,878; python: 3,923; ansic: 1,051; sh: 347; makefile: 338; xml: 175
file content (73 lines) | stat: -rwxr-xr-x 2,311 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE = 1

# Hardening flags.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_CXXFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

DEB_HOST_ARCH_CPU := $(shell dpkg-architecture --query DEB_HOST_ARCH_CPU)
DEB_HOST_MULTIARCH := $(shell dpkg-architecture --query DEB_HOST_MULTIARCH)

# Build without AltiVec support on ppc64el.
ifeq ($(DEB_HOST_ARCH_CPU),ppc64el)
DEB_CFLAGS_MAINT_APPEND += -mno-altivec
DEB_CXXFLAGS_MAINT_APPEND += -mno-altivec
endif

# CMake options common to -arch and -indep builds.
BUILD_OPTIONS = \
	-DAF_INSTALL_CMAKE_DIR=lib/$(DEB_HOST_MULTIARCH)/cmake/ArrayFire \
	-DAF_INSTALL_DOC_DIR=share/doc/libarrayfire-doc \
	-DAF_INSTALL_EXAMPLE_DIR=share/doc/libarrayfire-doc/examples \
	-DAF_INSTALL_LIB_DIR=lib/$(DEB_HOST_MULTIARCH) \
	-DBUILD_CPU=ON \
	-DBUILD_CPU_ASYNC=OFF \
	-DBUILD_CUDA=OFF \
	-DBUILD_EXAMPLES=OFF \
	-DBUILD_GRAPHICS=OFF \
	-DBUILD_NONFREE=OFF \
	-DBUILD_OPENCL=ON \
	-DBUILD_UNIFIED=ON \
	-DUSE_SYSTEM_CLBLAS=ON \
	-DUSE_SYSTEM_CLFFT=ON \
	-DWITH_COVERAGE=OFF

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
BUILD_OPTIONS += -DBUILD_TEST=ON
else
BUILD_OPTIONS += -DBUILD_TEST=OFF
endif

%:
	dh $@ --parallel

override_dh_auto_configure-arch:
	dh_auto_configure -- $(BUILD_OPTIONS) -DBUILD_DOCS=OFF

override_dh_auto_configure-indep:
	dh_auto_configure -- $(BUILD_OPTIONS) -DBUILD_DOCS=ON

# NOTE: Testcases labelled dense or large are currently disabled to lower the
# workload on the builders. Remove the exclusion regexes to enable them.
# NOTE: The testsuite for the unified backend is performed for the CPU backend
# only.
# NOTE: The imageio testcase fails on some architectures. It has been
# temporarily disabled whilst upstream is working on a fix.
override_dh_auto_test:
	dh_auto_test -- ARGS+="-R cpu -E 'large|dense|imageio'"
	LD_LIBRARY_PATH=$(shell find $(CURDIR) -type f -name "libafcpu.so*" -exec dirname {} \;) \
		dh_auto_test -- ARGS+="-R unified"

override_dh_install-indep:
	dh_install --indep -X LICENSE

override_dh_installchangelogs:
	dh_installchangelogs docs/pages/release_notes.md

override_dh_compress:
	dh_compress --exclude=examples --exclude=html