File: rules

package info (click to toggle)
x265 2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,304 kB
  • ctags: 12,635
  • sloc: asm: 146,674; cpp: 51,262; ansic: 741; makefile: 145; sh: 60; python: 11
file content (81 lines) | stat: -rwxr-xr-x 2,100 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/architecture.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie

export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed \
	-L$(CURDIR)/x265-10bit \
	-L$(CURDIR)/x265-12bit
# see #789111
export DEB_LDFLAGS_MAINT_STRIP=-Wl,-Bsymbolic-functions
# LFS support
export DEB_CPPFLAGS_MAINT_APPEND=$(shell getconf LFS_CFLAGS)

FLAGS = -DENABLE_PIC=ON
FLAGS_OTHERBIT  = -DENABLE_CLI=OFF
FLAGS_OTHERBIT += -DENABLE_SHARED=OFF
FLAGS_OTHERBIT += -DEXPORT_C_API=OFF
FLAGS_OTHERBIT += -DHIGH_BIT_DEPTH=ON

# enable assembly builds on amd64, kfreebsd-amd64
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 kfreebsd-amd64))
FLAGS += -DENABLE_ASSEMBLY=ON
else
FLAGS += -DENABLE_ASSEMBLY=OFF
endif

%:
	dh $@ --buildsystem=cmake \
		--sourcedirectory=source \
		--builddirectory=x265-8bit

override_dh_auto_clean:
	dh_auto_clean --builddirectory=x265-10bit
	dh_auto_clean --builddirectory=x265-12bit
	dh_auto_clean
	rm -rf doc/reST/build

# -arch bits

override_dh_auto_configure-arch:
	dh_auto_configure --builddirectory=x265-10bit -- \
		$(FLAGS) $(FLAGS_OTHERBIT)
	dh_auto_configure --builddirectory=x265-12bit -- \
		$(FLAGS) $(FLAGS_OTHERBIT) \
		-DMAIN12=ON
	dh_auto_configure -- \
		$(FLAGS) $(FLAGS_8BIT) \
		-DLIB_INSTALL_DIR=lib/$(DEB_HOST_MULTIARCH) \
		-DEXTRA_LIB="x265_main10.a;x265_main12.a" \
		-DLINKED_10BIT=ON \
		-DLINKED_12BIT=ON

override_dh_auto_build-arch:
	dh_auto_build --builddirectory=x265-10bit
	dh_auto_build --builddirectory=x265-12bit
	mv x265-10bit/libx265.a x265-10bit/libx265_main10.a
	mv x265-12bit/libx265.a x265-12bit/libx265_main12.a
	dh_auto_build

override_dh_auto_install-arch:
	dh_auto_install
	ar -M <<EOF \
		CREATE debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libx265.a \
		ADDLIB x265-10bit/libx265_main10.a \
		ADDLIB x265-12bit/libx265_main12.a \
		SAVE \
		END \
EOF

# -indep bits

# no configure, test and install for indep
override_dh_auto_configure-indep override_dh_auto_test-indep override_dh_auto_install-indep:

override_dh_auto_build-indep:
	$(MAKE) -C doc/reST html

override_dh_installdocs-indep:
	dh_installdocs
	dh_sphinxdoc