File: rules

package info (click to toggle)
libwebm 1.0.0.29-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,080 kB
  • sloc: cpp: 32,049; sh: 455; python: 128; makefile: 28
file content (41 lines) | stat: -rwxr-xr-x 1,067 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
#!/usr/bin/make -f

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

include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export DEB_CFLAGS_MAINT_STRIP  = -O2
export DEB_CXXFLAGS_MAINT_STRIP = -O2
export DEB_CFLAGS_MAINT_APPEND  = -O3 -fPIC -pie
export DEB_CXXFLAGS_MAINT_APPEND = -O3 -fPIC -pie

# Build tests by default but honor "nocheck" setting

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	CONFIGURE_OPTS := -DENABLE_TESTS=ON
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_BUILD_TYPE=ReleaseWithDebInfo \
            -DBUILD_SHARED_LIBS=ON \
            -DENABLE_IWYU=ON \
            -DENABLE_WEBM_PARSER=ON \
            ${CONFIGURE_OPTS} \
            -DUSE_LTO=1

override_dh_auto_test:
	cd obj-$(DEB_HOST_GNU_TYPE) && \
		export LIBWEBM_TEST_DATA_PATH=../testing/testdata && \
		./mkvmuxer_tests && \
		./mkvparser_tests && \
		./vp9_header_parser_tests && \
		./vp9_level_stats_tests && \
		./webm2pes_tests && \
		./webm_parser_tests && \
		unset LIBWEBM_TEST_DATA_PATH