File: rules

package info (click to toggle)
visp 3.7.0-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 166,332 kB
  • sloc: cpp: 392,705; ansic: 224,448; xml: 23,444; python: 13,701; java: 4,792; sh: 206; objc: 145; makefile: 60
file content (81 lines) | stat: -rwxr-xr-x 2,361 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
74
75
76
77
78
79
80
81
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk

# Hardening flags.
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

BUILDDIR = obj-$(DEB_HOST_MULTIARCH)

# Retrieve environment information.
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)

# Linux-specific stuff (dc1394, v4l, ois only available on linux)
ifeq ($(DEB_HOST_ARCH_OS),linux)
  CMAKE_ARCH_FLAGS = -DUSE_DC1394=ON -DUSE_V4L2=ON -DUSE_OIS=ON
else
  CMAKE_ARCH_FLAGS = -DUSE_DC1394=OFF -DUSE_V4L2=OFF -DUSE_OIS=OFF
endif

# Comply with Debian architectures baseline
# https://wiki.debian.org/ArchitectureSpecificsMemo#Architecture_baselines
# Enable only SSE2 since SSE3 is not guaranteed
CMAKE_ARCH_FLAGS += -DENABLE_SSE2=ON
CMAKE_ARCH_FLAGS += -DENABLE_SSE3=OFF
CMAKE_ARCH_FLAGS += -DENABLE_SSSE3=OFF

# On armel, since 3.4.0-3 build returns the following error
# "ABORT: Received TERM signal"
# Disable parallel build (make -j1) to reduce memory usage
ifeq ($(DEB_HOST_ARCH_OS),armel)
  export DEB_BUILD_MAINT_OPTIONS="parallel=1"
endif

# CMake flags
CMAKE_FLAGS = \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_VERBOSE_MAKEFILE=ON \
	-DCMAKE_C_FLAGS_RELEASE="$(CFLAGS)" \
	-DCMAKE_CXX_FLAGS_RELEASE="$(CXXFLAGS)" \
	-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="$(LDFLAGS)" \
	-DCMAKE_EXE_LINKER_FLAGS_RELEASE="$(LDFLAGS)" \
	-DCMAKE_INSTALL_LIBDIR="lib" \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_SKIP_RPATH=ON \
	-DENABLE_MULTIARCH=ON \
	-DENABLE_VISP_NAMESPACE=ON \
	-DUSE_SOQT=OFF \
	-DBUILD_JAVA=OFF \
	$(CMAKE_ARCH_FLAGS)

%:
	dh $@ --buildsystem=cmake

override_dh_clean:
	dh_clean -O--buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- $(CMAKE_FLAGS)

override_dh_auto_build-indep:
	dh_auto_build -- visp_doc # Generate Doxygen HTML documentation.

override_dh_installdocs:
	dh_installdocs -X.md5

# Due to numerical imprecision, some tests are failing on ia64.
# This is not a critical issue so we let the testing fail on this
# architecture for now.
# See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=723803
ifeq ($(DEB_HOST_ARCH),ia64)
  DH_AUTOTEST_CAN_FAIL=true
else
  DH_AUTOTEST_CAN_FAIL=false
endif

override_dh_auto_test-indep:

override_dh_auto_test-arch:
	-LD_LIBRARY_PATH=$(shell realpath $(BUILDDIR))/lib dh_auto_test || ${DH_AUTOTEST_CAN_FAIL}