File: rules

package info (click to toggle)
xsimd 14.0.0-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,264 kB
  • sloc: cpp: 41,590; sh: 547; makefile: 190; python: 117
file content (49 lines) | stat: -rwxr-xr-x 1,045 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8

BUILD_OPTIONS += -DENABLE_XTL_COMPLEX=ON

# Turn on unit testing only if
# - The architecture is officially supported
# - The nocheck flag is not specified
OFFICIALLY_SUPPORTED := amd64 arm64 armhf i386
ifeq (,$(filter $(DEB_HOST_ARCH),$(OFFICIALLY_SUPPORTED)))
  BUILD_OPTIONS += -DBUILD_TESTS=OFF
else ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
  BUILD_OPTIONS += -DBUILD_TESTS=OFF
else
  BUILD_OPTIONS += -DBUILD_TESTS=ON
endif

ifeq ($(DEB_HOST_ARCH),armhf)
  export DEB_CXXFLAGS_MAINT_APPEND = -march=armv7-a+fp
endif

include /usr/share/dpkg/default.mk

%:
	dh $@ --with sphinxdoc

override_dh_auto_configure:
	uname -a
ifeq ($(DEB_HOST_ARCH_OS),linux)
	lscpu
else
	cat /proc/cpuinfo
endif
	dh_auto_configure -- $(BUILD_OPTIONS)

override_dh_auto_build:
	dh_auto_build
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	$(MAKE) -C docs html
endif

override_dh_auto_clean:
	dh_auto_clean
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	$(MAKE) -C docs clean
	rm -rf docs/xml
endif