File: rules

package info (click to toggle)
opensurgsim 0.7.0-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 23,744 kB
  • sloc: cpp: 135,363; ansic: 4,206; python: 3,934; makefile: 38
file content (48 lines) | stat: -rwxr-xr-x 1,207 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=-format,+bindnow
export GOOGLEMOCK_DIR = /usr/src/googletest/googlemock

ifneq (,$(filter $(DEB_HOST_ARCH), i386))
    export DEB_CXXFLAGS_MAINT_APPEND += -ffloat-store
endif

ifneq (,$(filter $(DEB_HOST_ARCH), mipsel mips64el))
    export DEB_CXXFLAGS_MAINT_APPEND += -g1
endif

%:
	dh $@

ifeq (,$(filter $(DEB_HOST_ARCH),i386 arm64 armel armhf mipsel powerpc ppc64el ppc64))
    EIGEN_ALIGNMENT=ON
else
    EIGEN_ALIGNMENT=OFF
endif

ifeq ($(DEB_TARGET_ARCH_OS),linux)
    BUILD_DEVICE_MULTIAXIS=ON
else
    BUILD_DEVICE_MULTIAXIS=OFF
endif

override_dh_auto_configure:
	dh_auto_configure -- \
	-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \
	-DCMAKE_INSTALL_PREFIX:PATH=/usr \
	-DBUILD_DEVICE_MULTIAXIS:BOOL=$(BUILD_DEVICE_MULTIAXIS) \
	-DBUILD_DOCUMENTATION:BOOL=ON \
	-DBUILD_EXAMPLES:BOOL=OFF \
	-DBUILD_SHARED_LIBS:BOOL=ON \
	-DBUILD_TESTING_EIGEN:BOOL=ON \
	-DCTEST_CUSTOM_TESTS_IGNORE="MultiAxisDeviceTest" \
	-DEIGEN_ALIGNMENT=$(EIGEN_ALIGNMENT) \
	-DUSE_SYSTEM_YAMLCPP:BOOL=ON

override_dh_install:
	dh_install --exclude=gmock --exclude=gtest

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test
endif