File: rules

package info (click to toggle)
libvpx 1.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 18,792 kB
  • sloc: ansic: 198,207; cpp: 89,663; asm: 21,040; sh: 4,661; python: 2,722; perl: 1,868; makefile: 438
file content (120 lines) | stat: -rwxr-xr-x 3,159 bytes parent folder | download | duplicates (3)
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_CFLAGS_MAINT_APPEND = -Wall
DEB_CXXFLAGS_MAINT_APPEND = -Wall

DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_CPU  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

configure_flags += \
  --prefix=/usr \
  --enable-pic \
  --enable-shared \
  --disable-install-bins \
  --disable-install-srcs \
  --size-limit=16384x16384 \
  --enable-postproc \
  --enable-multi-res-encoding \
  --enable-temporal-denoising \
  --enable-vp9-temporal-denoising \
  --enable-vp9-postproc

ifeq ($(DEB_HOST_ARCH_CPU),arm)
configure_flags_neon := $(configure_flags) --target=armv7-linux-gcc
BUILD_NEON=Yes
endif

ifeq ($(DEB_HOST_ARCH), arm64)
configure_flags += --target=arm64-linux-gcc
else
ifeq ($(DEB_HOST_ARCH), armel)
configure_flags += --target=generic-gnu --enable-small
else
ifeq ($(DEB_HOST_ARCH), armhf)
# now armhf is ARMv7, but ARMv7 in vpx means NEON, which is not mandatory on armhf
# thus we use generic-gnu
configure_flags += --target=generic-gnu --enable-small
else
ifeq ($(DEB_HOST_ARCH), amd64)
configure_flags += --target=x86_64-linux-gcc
else
ifeq ($(DEB_HOST_ARCH), kfreebsd-amd64)
configure_flags += --target=x86_64-linux-gcc
else
ifeq ($(DEB_HOST_ARCH), i386)
configure_flags += --target=x86-linux-gcc
else
ifeq ($(DEB_HOST_ARCH), kfreebsd-i386)
configure_flags += --target=x86-linux-gcc
else
ifeq ($(DEB_HOST_ARCH), hurd-i386)
configure_flags += --target=x86-linux-gcc
else
ifeq ($(DEB_HOST_ARCH), mips)
configure_flags += --target=generic-gnu
# Disable MIPS assembly for now, it requires DSP R2
DEB_CFLAGS_MAINT_APPEND += -DLIBYUV_DISABLE_MIPS=1
DEB_CXXFLAGS_MAINT_APPEND += -DLIBYUV_DISABLE_MIPS=1
else
ifeq ($(DEB_HOST_ARCH), mipsel)
configure_flags += --target=generic-gnu
# Disable MIPS assembly for now, it requires DSP R2
DEB_CFLAGS_MAINT_APPEND += -DLIBYUV_DISABLE_MIPS=1
DEB_CXXFLAGS_MAINT_APPEND += -DLIBYUV_DISABLE_MIPS=1
else
configure_flags += --target=generic-gnu
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CROSS=$(DEB_HOST_GNU_TYPE)-
export CROSS
endif

builddir := $(CURDIR)/builddir

export DEB_CFLAGS_MAINT_APPEND
export DEB_CXXFLAGS_MAINT_APPEND

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(builddir) $(builddir)-neon

override_dh_auto_configure:
	mkdir -p $(builddir) ; \
	cd $(builddir) ; \
	${CURDIR}/configure $(configure_flags)
ifeq ($(BUILD_NEON), Yes)
	mkdir -p $(builddir)-neon ; \
	cd $(builddir)-neon ; \
	${CURDIR}/configure $(configure_flags_neon)
endif

override_dh_auto_build:
	dh_auto_build --builddirectory=$(builddir) -- verbose=yes dist
ifeq ($(BUILD_NEON), Yes)
	dh_auto_build --builddirectory=$(builddir)-neon -- verbose=yes dist
endif
	# don't use stripped library...
	cp -v $(builddir)/libvpx_g.a \
		$(builddir)/vpx-vp8-*/lib/libvpx.a

override_dh_installdocs:
	dh_installdocs
	dh_installdocs -A README AUTHORS