• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1##
2##  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3##
4##  Use of this source code is governed by a BSD-style license
5##  that can be found in the LICENSE file in the root of the source
6##  tree. An additional intellectual property rights grant can be found
7##  in the file PATENTS.  All contributing project authors may
8##  be found in the AUTHORS file in the root of the source tree.
9##
10
11
12# ARM assembly files are written in RVCT-style. We use some make magic to
13# filter those files to allow GCC compilation
14ifeq ($(VPX_ARCH_ARM),yes)
15  ASM:=$(if $(filter yes,$(CONFIG_GCC)$(CONFIG_MSVS)),.asm.S,.asm)
16else
17  ASM:=.asm
18endif
19
20#
21# Rule to generate runtime cpu detection files
22#
23define rtcd_h_template
24$$(BUILD_PFX)$(1).h: $$(SRC_PATH_BARE)/$(2)
25	@echo "    [CREATE] $$@"
26	$$(qexec)$$(SRC_PATH_BARE)/build/make/rtcd.pl --arch=$$(TGT_ISA) \
27          --sym=$(1) \
28          --config=$$(CONFIG_DIR)$$(target)-$$(TOOLCHAIN).mk \
29          $$(RTCD_OPTIONS) $$^ > $$@
30CLEAN-OBJS += $$(BUILD_PFX)$(1).h
31RTCD += $$(BUILD_PFX)$(1).h
32endef
33
34CODEC_SRCS-yes += CHANGELOG
35CODEC_SRCS-yes += libs.mk
36
37include $(SRC_PATH_BARE)/vpx/vpx_codec.mk
38CODEC_SRCS-yes += $(addprefix vpx/,$(call enabled,API_SRCS))
39CODEC_DOC_SRCS += $(addprefix vpx/,$(call enabled,API_DOC_SRCS))
40
41include $(SRC_PATH_BARE)/vpx_mem/vpx_mem.mk
42CODEC_SRCS-yes += $(addprefix vpx_mem/,$(call enabled,MEM_SRCS))
43
44include $(SRC_PATH_BARE)/vpx_scale/vpx_scale.mk
45CODEC_SRCS-yes += $(addprefix vpx_scale/,$(call enabled,SCALE_SRCS))
46
47include $(SRC_PATH_BARE)/vpx_ports/vpx_ports.mk
48CODEC_SRCS-yes += $(addprefix vpx_ports/,$(call enabled,PORTS_SRCS))
49
50include $(SRC_PATH_BARE)/vpx_dsp/vpx_dsp.mk
51CODEC_SRCS-yes += $(addprefix vpx_dsp/,$(call enabled,DSP_SRCS))
52
53include $(SRC_PATH_BARE)/vpx_util/vpx_util.mk
54CODEC_SRCS-yes += $(addprefix vpx_util/,$(call enabled,UTIL_SRCS))
55
56ifeq ($(CONFIG_VP8),yes)
57  VP8_PREFIX=vp8/
58  include $(SRC_PATH_BARE)/$(VP8_PREFIX)vp8_common.mk
59endif
60
61ifeq ($(CONFIG_VP8_ENCODER),yes)
62  include $(SRC_PATH_BARE)/$(VP8_PREFIX)vp8cx.mk
63  CODEC_SRCS-yes += $(addprefix $(VP8_PREFIX),$(call enabled,VP8_CX_SRCS))
64  CODEC_EXPORTS-yes += $(addprefix $(VP8_PREFIX),$(VP8_CX_EXPORTS))
65  INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8cx.h
66  INSTALL-LIBS-yes += include/vpx/vpx_ext_ratectrl.h
67  INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP8_PREFIX)/%
68  CODEC_DOC_SECTIONS += vp8 vp8_encoder
69endif
70
71ifeq ($(CONFIG_VP8_DECODER),yes)
72  include $(SRC_PATH_BARE)/$(VP8_PREFIX)vp8dx.mk
73  CODEC_SRCS-yes += $(addprefix $(VP8_PREFIX),$(call enabled,VP8_DX_SRCS))
74  CODEC_EXPORTS-yes += $(addprefix $(VP8_PREFIX),$(VP8_DX_EXPORTS))
75  INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8dx.h
76  INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP8_PREFIX)/%
77  CODEC_DOC_SECTIONS += vp8 vp8_decoder
78endif
79
80ifeq ($(CONFIG_VP9),yes)
81  VP9_PREFIX=vp9/
82  include $(SRC_PATH_BARE)/$(VP9_PREFIX)vp9_common.mk
83endif
84
85ifeq ($(CONFIG_VP9_ENCODER),yes)
86  VP9_PREFIX=vp9/
87  include $(SRC_PATH_BARE)/$(VP9_PREFIX)vp9cx.mk
88  CODEC_SRCS-yes += $(addprefix $(VP9_PREFIX),$(call enabled,VP9_CX_SRCS))
89  CODEC_EXPORTS-yes += $(addprefix $(VP9_PREFIX),$(VP9_CX_EXPORTS))
90  CODEC_SRCS-yes += $(VP9_PREFIX)vp9cx.mk vpx/vp8.h vpx/vp8cx.h
91  CODEC_SRCS-yes += vpx/vpx_ext_ratectrl.h
92  INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8cx.h
93  INSTALL-LIBS-yes += include/vpx/vpx_ext_ratectrl.h
94  INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP9_PREFIX)/%
95  CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8cx.h vpx/vpx_ext_ratectrl.h
96  CODEC_DOC_SECTIONS += vp9 vp9_encoder
97endif
98
99RC_RTC_SRCS := vpx/vp8.h vpx/vp8cx.h
100RC_RTC_SRCS += vpx/vpx_ext_ratectrl.h
101RC_RTC_SRCS += vpx/internal/vpx_ratectrl_rtc.h
102ifeq ($(CONFIG_VP9_ENCODER),yes)
103  VP9_PREFIX=vp9/
104  RC_RTC_SRCS += $(addprefix $(VP9_PREFIX),$(call enabled,VP9_CX_SRCS))
105  RC_RTC_SRCS += $(VP9_PREFIX)vp9cx.mk
106  RC_RTC_SRCS += $(VP9_PREFIX)ratectrl_rtc.cc
107  RC_RTC_SRCS += $(VP9_PREFIX)ratectrl_rtc.h
108  INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP9_PREFIX)ratectrl_rtc.cc
109  INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP9_PREFIX)ratectrl_rtc.h
110endif
111ifeq ($(CONFIG_VP8_ENCODER),yes)
112  VP8_PREFIX=vp8/
113  RC_RTC_SRCS += $(addprefix $(VP8_PREFIX),$(call enabled,VP8_CX_SRCS))
114  RC_RTC_SRCS += $(VP8_PREFIX)vp8_ratectrl_rtc.cc
115  RC_RTC_SRCS += $(VP8_PREFIX)vp8_ratectrl_rtc.h
116  INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP8_PREFIX)vp8_ratectrl_rtc.cc
117  INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP8_PREFIX)vp8_ratectrl_rtc.h
118endif
119
120ifeq ($(CONFIG_VP9_DECODER),yes)
121  VP9_PREFIX=vp9/
122  include $(SRC_PATH_BARE)/$(VP9_PREFIX)vp9dx.mk
123  CODEC_SRCS-yes += $(addprefix $(VP9_PREFIX),$(call enabled,VP9_DX_SRCS))
124  CODEC_EXPORTS-yes += $(addprefix $(VP9_PREFIX),$(VP9_DX_EXPORTS))
125  CODEC_SRCS-yes += $(VP9_PREFIX)vp9dx.mk vpx/vp8.h vpx/vp8dx.h
126  INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8dx.h
127  INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP9_PREFIX)/%
128  CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8dx.h
129  CODEC_DOC_SECTIONS += vp9 vp9_decoder
130endif
131
132ifeq ($(CONFIG_ENCODERS),yes)
133  CODEC_DOC_SECTIONS += encoder
134endif
135ifeq ($(CONFIG_DECODERS),yes)
136  CODEC_DOC_SECTIONS += decoder
137endif
138
139ifeq ($(CONFIG_MSVS),yes)
140CODEC_LIB=$(if $(CONFIG_STATIC_MSVCRT),vpxmt,vpxmd)
141GTEST_LIB=$(if $(CONFIG_STATIC_MSVCRT),gtestmt,gtestmd)
142RC_RTC_LIB=$(if $(CONFIG_STATIC_MSVCRT),vpxrcmt,vpxrcmd)
143# This variable uses deferred expansion intentionally, since the results of
144# $(wildcard) may change during the course of the Make.
145VS_PLATFORMS = $(foreach d,$(wildcard */Release/$(CODEC_LIB).lib),$(word 1,$(subst /, ,$(d))))
146endif
147
148# The following pairs define a mapping of locations in the distribution
149# tree to locations in the source/build trees.
150INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/vpx/%
151INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/vpx_ports/%
152INSTALL_MAPS += $(LIBSUBDIR)/%     %
153INSTALL_MAPS += src/%     $(SRC_PATH_BARE)/%
154ifeq ($(CONFIG_MSVS),yes)
155INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/%  $(p)/Release/%)
156INSTALL_MAPS += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/%  $(p)/Debug/%)
157endif
158
159CODEC_SRCS-yes += build/make/version.sh
160CODEC_SRCS-yes += build/make/rtcd.pl
161CODEC_SRCS-yes += vpx_ports/emmintrin_compat.h
162CODEC_SRCS-yes += vpx_ports/mem_ops.h
163CODEC_SRCS-yes += vpx_ports/mem_ops_aligned.h
164CODEC_SRCS-yes += vpx_ports/vpx_once.h
165CODEC_SRCS-yes += $(BUILD_PFX)vpx_config.c
166INSTALL-SRCS-no += $(BUILD_PFX)vpx_config.c
167ifeq ($(VPX_ARCH_X86)$(VPX_ARCH_X86_64),yes)
168INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += third_party/x86inc/x86inc.asm
169INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += vpx_dsp/x86/bitdepth_conversion_sse2.asm
170endif
171CODEC_EXPORTS-yes += vpx/exports_com
172CODEC_EXPORTS-$(CONFIG_ENCODERS) += vpx/exports_enc
173CODEC_EXPORTS-$(CONFIG_DECODERS) += vpx/exports_dec
174
175INSTALL-LIBS-yes += include/vpx/vpx_codec.h
176INSTALL-LIBS-yes += include/vpx/vpx_frame_buffer.h
177INSTALL-LIBS-yes += include/vpx/vpx_image.h
178INSTALL-LIBS-yes += include/vpx/vpx_integer.h
179INSTALL-LIBS-$(CONFIG_DECODERS) += include/vpx/vpx_decoder.h
180INSTALL-LIBS-$(CONFIG_ENCODERS) += include/vpx/vpx_encoder.h
181INSTALL-LIBS-$(CONFIG_ENCODERS) += include/vpx/vpx_tpl.h
182ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
183ifeq ($(CONFIG_MSVS),yes)
184INSTALL-LIBS-yes                  += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/$(CODEC_LIB).lib)
185INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/$(CODEC_LIB)d.lib)
186INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/vpx.dll)
187INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/vpx.exp)
188endif
189else
190INSTALL-LIBS-$(CONFIG_STATIC) += $(LIBSUBDIR)/libvpx.a
191INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libvpx_g.a
192endif
193
194ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_RATE_CTRL),yesyes)
195  SIMPLE_ENCODE_SRCS := $(call enabled,CODEC_SRCS)
196  SIMPLE_ENCODE_SRCS += $(VP9_PREFIX)simple_encode.cc
197  SIMPLE_ENCODE_SRCS += $(VP9_PREFIX)simple_encode.h
198  SIMPLE_ENCODE_SRCS += ivfenc.h
199  SIMPLE_ENCODE_SRCS += ivfenc.c
200  INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP9_PREFIX)simple_encode.cc
201  INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP9_PREFIX)simple_encode.h
202endif
203
204CODEC_SRCS=$(call enabled,CODEC_SRCS)
205
206INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(CODEC_SRCS)
207INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(call enabled,CODEC_EXPORTS)
208
209
210# Generate a list of all enabled sources, in particular for exporting to gyp
211# based build systems.
212libvpx_srcs.txt:
213	@echo "    [CREATE] $@"
214	@echo $(CODEC_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@
215CLEAN-OBJS += libvpx_srcs.txt
216
217# Assembly files that are included, but don't define symbols themselves.
218# Filtered out to avoid Windows build warnings.
219ASM_INCLUDES := \
220    third_party/x86inc/x86inc.asm \
221    vpx_config.asm \
222    vpx_ports/x86_abi_support.asm \
223    vpx_dsp/x86/bitdepth_conversion_sse2.asm \
224
225ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
226ifeq ($(CONFIG_MSVS),yes)
227
228vpx.def: $(call enabled,CODEC_EXPORTS)
229	@echo "    [CREATE] $@"
230	$(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_def.sh\
231            --name=vpx\
232            --out=$@ $^
233CLEAN-OBJS += vpx.def
234
235vpx.$(VCPROJ_SFX): VCPROJ_SRCS=$(filter-out $(addprefix %, $(ASM_INCLUDES)), $^)
236
237vpx.$(VCPROJ_SFX): $(CODEC_SRCS) vpx.def
238	@echo "    [CREATE] $@"
239	$(qexec)$(GEN_VCPROJ) \
240            $(if $(CONFIG_SHARED),--dll,--lib) \
241            --target=$(TOOLCHAIN) \
242            $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
243            --name=vpx \
244            --proj-guid=DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74 \
245            --module-def=vpx.def \
246            --ver=$(CONFIG_VS_VERSION) \
247            --src-path-bare="$(SRC_PATH_BARE)" \
248            --out=$@ $(CFLAGS) \
249            --as=$(AS) \
250            $(filter $(SRC_PATH_BARE)/vp8/%.c, $(VCPROJ_SRCS)) \
251            $(filter $(SRC_PATH_BARE)/vp8/%.h, $(VCPROJ_SRCS)) \
252            $(filter $(SRC_PATH_BARE)/vp9/%.c, $(VCPROJ_SRCS)) \
253            $(filter $(SRC_PATH_BARE)/vp9/%.h, $(VCPROJ_SRCS)) \
254            $(filter $(SRC_PATH_BARE)/vpx/%, $(VCPROJ_SRCS)) \
255            $(filter $(SRC_PATH_BARE)/vpx_dsp/%, $(VCPROJ_SRCS)) \
256            $(filter-out $(addprefix $(SRC_PATH_BARE)/, \
257                           vp8/%.c vp8/%.h vp9/%.c vp9/%.h vpx/% vpx_dsp/%), \
258              $(VCPROJ_SRCS)) \
259            --src-path-bare="$(SRC_PATH_BARE)" \
260
261PROJECTS-yes += vpx.$(VCPROJ_SFX)
262
263vpx.$(VCPROJ_SFX): vpx_config.asm
264vpx.$(VCPROJ_SFX): $(RTCD)
265
266vpxrc.$(VCPROJ_SFX): \
267    VCPROJ_SRCS=$(filter-out $(addprefix %, $(ASM_INCLUDES)), $^)
268
269vpxrc.$(VCPROJ_SFX): $(RC_RTC_SRCS)
270	@echo "    [CREATE] $@"
271	$(qexec)$(GEN_VCPROJ) \
272            $(if $(CONFIG_SHARED),--dll,--lib) \
273            --target=$(TOOLCHAIN) \
274            $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
275            --name=vpxrc \
276            --proj-guid=C26FF952-9494-4838-9A3F-7F3D4F613385 \
277            --ver=$(CONFIG_VS_VERSION) \
278            --src-path-bare="$(SRC_PATH_BARE)" \
279            --out=$@ $(CFLAGS) \
280            --as=$(AS) \
281            $(filter $(SRC_PATH_BARE)/vp9/%.c, $(VCPROJ_SRCS)) \
282            $(filter $(SRC_PATH_BARE)/vp9/%.cc, $(VCPROJ_SRCS)) \
283            $(filter $(SRC_PATH_BARE)/vp9/%.h, $(VCPROJ_SRCS)) \
284            $(filter $(SRC_PATH_BARE)/vpx/%, $(VCPROJ_SRCS)) \
285            $(filter $(SRC_PATH_BARE)/vpx_dsp/%, $(VCPROJ_SRCS)) \
286            $(filter-out $(addprefix $(SRC_PATH_BARE)/, \
287                           vp8/%.c vp8/%.h vp9/%.c vp9/%.cc vp9/%.h vpx/% \
288                           vpx_dsp/%), \
289              $(VCPROJ_SRCS)) \
290            --src-path-bare="$(SRC_PATH_BARE)" \
291
292PROJECTS-yes += vpxrc.$(VCPROJ_SFX)
293
294vpxrc.$(VCPROJ_SFX): vpx_config.asm
295vpxrc.$(VCPROJ_SFX): $(RTCD)
296
297endif # ifeq ($(CONFIG_MSVS),yes)
298else # ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
299LIBVPX_OBJS=$(call objs, $(filter-out $(ASM_INCLUDES), $(CODEC_SRCS)))
300OBJS-yes += $(LIBVPX_OBJS)
301LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a
302$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
303
304# Updating version info.
305# https://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
306# For libtool: c=<current>, a=<age>, r=<revision>
307# libtool generates .so file as .so.[c-a].a.r, while -version-info c:r:a is
308# passed to libtool.
309#
310# libvpx library file is generated as libvpx.so.<MAJOR>.<MINOR>.<PATCH>
311# MAJOR = c-a, MINOR = a, PATCH = r
312#
313# To determine SO_VERSION_{MAJOR,MINOR,PATCH}, calculate c,a,r with current
314# SO_VERSION_* then follow the rules in the link to detemine the new version
315# (c1, a1, r1) and set MAJOR to [c1-a1], MINOR to a1 and PATCH to r1
316SO_VERSION_MAJOR := 9
317SO_VERSION_MINOR := 0
318SO_VERSION_PATCH := 1
319ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS))
320LIBVPX_SO               := libvpx.$(SO_VERSION_MAJOR).dylib
321SHARED_LIB_SUF          := .dylib
322EXPORT_FILE             := libvpx.syms
323LIBVPX_SO_SYMLINKS      := $(addprefix $(LIBSUBDIR)/, \
324                             libvpx.dylib  )
325else
326ifeq ($(filter iphonesimulator%,$(TGT_OS)),$(TGT_OS))
327LIBVPX_SO               := libvpx.$(SO_VERSION_MAJOR).dylib
328SHARED_LIB_SUF          := .dylib
329EXPORT_FILE             := libvpx.syms
330LIBVPX_SO_SYMLINKS      := $(addprefix $(LIBSUBDIR)/, libvpx.dylib)
331else
332ifeq ($(filter os2%,$(TGT_OS)),$(TGT_OS))
333LIBVPX_SO               := libvpx$(SO_VERSION_MAJOR).dll
334SHARED_LIB_SUF          := _dll.a
335EXPORT_FILE             := libvpx.def
336LIBVPX_SO_SYMLINKS      :=
337LIBVPX_SO_IMPLIB        := libvpx_dll.a
338else
339LIBVPX_SO               := libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH)
340SHARED_LIB_SUF          := .so
341EXPORT_FILE             := libvpx.ver
342LIBVPX_SO_SYMLINKS      := $(addprefix $(LIBSUBDIR)/, \
343                             libvpx.so libvpx.so.$(SO_VERSION_MAJOR) \
344                             libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR))
345endif
346endif
347endif
348
349LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBVPX_SO)\
350                           $(notdir $(LIBVPX_SO_SYMLINKS)) \
351                           $(if $(LIBVPX_SO_IMPLIB), $(BUILD_PFX)$(LIBVPX_SO_IMPLIB))
352$(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) $(EXPORT_FILE)
353$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm
354$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(SO_VERSION_MAJOR)
355$(BUILD_PFX)$(LIBVPX_SO): EXPORTS_FILE = $(EXPORT_FILE)
356
357libvpx.def: $(call enabled,CODEC_EXPORTS)
358	@echo "    [CREATE] $@"
359	$(qexec)echo LIBRARY $(LIBVPX_SO:.dll=) INITINSTANCE TERMINSTANCE > $@
360	$(qexec)echo "DATA MULTIPLE NONSHARED" >> $@
361	$(qexec)echo "EXPORTS" >> $@
362	$(qexec)awk '!/vpx_svc_*/ {print "_"$$2}' $^ >>$@
363CLEAN-OBJS += libvpx.def
364
365libvpx_dll.a: $(LIBVPX_SO)
366	@echo "    [IMPLIB] $@"
367	$(qexec)emximp -o $@ $<
368CLEAN-OBJS += libvpx_dll.a
369
370define libvpx_symlink_template
371$(1): $(2)
372	@echo "    [LN]     $(2) $$@"
373	$(qexec)mkdir -p $$(dir $$@)
374	$(qexec)ln -sf $(2) $$@
375endef
376
377$(eval $(call libvpx_symlink_template,\
378    $(addprefix $(BUILD_PFX),$(notdir $(LIBVPX_SO_SYMLINKS))),\
379    $(BUILD_PFX)$(LIBVPX_SO)))
380$(eval $(call libvpx_symlink_template,\
381    $(addprefix $(DIST_DIR)/,$(LIBVPX_SO_SYMLINKS)),\
382    $(LIBVPX_SO)))
383
384
385INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBVPX_SO_SYMLINKS)
386INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBVPX_SO)
387INSTALL-LIBS-$(CONFIG_SHARED) += $(if $(LIBVPX_SO_IMPLIB),$(LIBSUBDIR)/$(LIBVPX_SO_IMPLIB))
388
389
390LIBS-yes += vpx.pc
391vpx.pc: config.mk libs.mk
392	@echo "    [CREATE] $@"
393	$(qexec)echo '# pkg-config file from libvpx $(VERSION_STRING)' > $@
394	$(qexec)echo 'prefix=$(PREFIX)' >> $@
395	$(qexec)echo 'exec_prefix=$${prefix}' >> $@
396	$(qexec)echo 'libdir=$${prefix}/$(LIBSUBDIR)' >> $@
397	$(qexec)echo 'includedir=$${prefix}/include' >> $@
398	$(qexec)echo '' >> $@
399	$(qexec)echo 'Name: vpx' >> $@
400	$(qexec)echo 'Description: WebM Project VPx codec implementation' >> $@
401	$(qexec)echo 'Version: $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)' >> $@
402	$(qexec)echo 'Requires:' >> $@
403	$(qexec)echo 'Conflicts:' >> $@
404	$(qexec)echo 'Libs: -L$${libdir} -lvpx -lm' >> $@
405ifeq ($(HAVE_PTHREAD_H),yes)
406	$(qexec)echo 'Libs.private: -lm -lpthread' >> $@
407else
408	$(qexec)echo 'Libs.private: -lm' >> $@
409endif
410	$(qexec)echo 'Cflags: -I$${includedir}' >> $@
411INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc
412INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc
413CLEAN-OBJS += vpx.pc
414
415ifeq ($(CONFIG_ENCODERS),yes)
416  RC_RTC_OBJS=$(call objs,$(RC_RTC_SRCS))
417  OBJS-yes += $(RC_RTC_OBJS)
418  LIBS-yes += $(BUILD_PFX)libvpxrc.a $(BUILD_PFX)libvpxrc_g.a
419  $(BUILD_PFX)libvpxrc_g.a: $(RC_RTC_OBJS)
420endif
421
422ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_RATE_CTRL),yesyes)
423  SIMPLE_ENCODE_OBJS=$(call objs,$(SIMPLE_ENCODE_SRCS))
424  OBJS-yes += $(SIMPLE_ENCODE_OBJS)
425  LIBS-yes += $(BUILD_PFX)libsimple_encode.a $(BUILD_PFX)libsimple_encode_g.a
426  $(BUILD_PFX)libsimple_encode_g.a: $(SIMPLE_ENCODE_OBJS)
427endif
428
429endif # ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
430
431libvpx.ver: $(call enabled,CODEC_EXPORTS)
432	@echo "    [CREATE] $@"
433	$(qexec)echo "{ global:" > $@
434	$(qexec)for f in $?; do awk '{print $$2";"}' < $$f >>$@; done
435	$(qexec)echo "local: *; };" >> $@
436CLEAN-OBJS += libvpx.ver
437
438libvpx.syms: $(call enabled,CODEC_EXPORTS)
439	@echo "    [CREATE] $@"
440	$(qexec)awk '{print "_"$$2}' $^ >$@
441CLEAN-OBJS += libvpx.syms
442
443#
444# Rule to make assembler configuration file from C configuration file
445#
446ifeq ($(VPX_ARCH_X86)$(VPX_ARCH_X86_64),yes)
447# YASM
448$(BUILD_PFX)vpx_config.asm: $(BUILD_PFX)vpx_config.h
449	@echo "    [CREATE] $@"
450	@LC_ALL=C grep -E "#define [A-Z0-9_]+ [01]" $< \
451	    | awk '{print $$2 " equ " $$3}' > $@
452else
453ADS2GAS=$(if $(filter yes,$(CONFIG_GCC)),| $(ASM_CONVERSION))
454$(BUILD_PFX)vpx_config.asm: $(BUILD_PFX)vpx_config.h
455	@echo "    [CREATE] $@"
456	@LC_ALL=C grep -E "#define [A-Z0-9_]+ [01]" $< \
457	    | awk '{print $$2 " EQU " $$3}' $(ADS2GAS) > $@
458	@echo "        END" $(ADS2GAS) >> $@
459CLEAN-OBJS += $(BUILD_PFX)vpx_config.asm
460endif
461
462#
463# Add assembler dependencies for configuration.
464#
465$(filter %.S.o,$(OBJS-yes)):     $(BUILD_PFX)vpx_config.asm
466$(filter %$(ASM).o,$(OBJS-yes)): $(BUILD_PFX)vpx_config.asm
467
468
469$(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)vpx_version.h)
470CLEAN-OBJS += $(BUILD_PFX)vpx_version.h
471
472#
473# Add include path for libwebm sources.
474#
475ifeq ($(CONFIG_WEBM_IO),yes)
476  CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/libwebm
477endif
478
479##
480## libvpx test directives
481##
482ifeq ($(CONFIG_UNIT_TESTS),yes)
483LIBVPX_TEST_DATA_PATH ?= .
484
485include $(SRC_PATH_BARE)/test/test.mk
486
487# addprefix_clean behaves like addprefix if the target doesn't start with "../"
488# However, if the target starts with "../", instead of adding prefix,
489# it will remove "../".
490# Using addprefix_clean, we can avoid two different targets building the
491# same file, i.e.
492# test/../ivfenc.c.d: ivfenc.o
493# ivfenc.c.d: ivfenc.o
494# Note that the other way to solve this problem is using "realpath".
495# The "realpath" is supported by make 3.81 or later.
496addprefix_clean=$(patsubst $(1)../%,%,$(addprefix $(1), $(2)))
497LIBVPX_TEST_SRCS=$(call addprefix_clean,test/,$(call enabled,LIBVPX_TEST_SRCS))
498
499LIBVPX_TEST_BIN=./test_libvpx$(EXE_SFX)
500LIBVPX_TEST_DATA=$(addprefix $(LIBVPX_TEST_DATA_PATH)/,\
501                     $(call enabled,LIBVPX_TEST_DATA))
502libvpx_test_data_url=https://storage.googleapis.com/downloads.webmproject.org/test_data/libvpx/$(1)
503
504TEST_INTRA_PRED_SPEED_BIN=./test_intra_pred_speed$(EXE_SFX)
505TEST_INTRA_PRED_SPEED_SRCS=$(call addprefix_clean,test/,\
506                           $(call enabled,TEST_INTRA_PRED_SPEED_SRCS))
507TEST_INTRA_PRED_SPEED_OBJS := $(sort $(call objs,$(TEST_INTRA_PRED_SPEED_SRCS)))
508
509ifeq ($(CONFIG_ENCODERS),yes)
510RC_INTERFACE_TEST_BIN=./test_rc_interface$(EXE_SFX)
511RC_INTERFACE_TEST_SRCS=$(call addprefix_clean,test/,\
512                       $(call enabled,RC_INTERFACE_TEST_SRCS))
513RC_INTERFACE_TEST_OBJS := $(sort $(call objs,$(RC_INTERFACE_TEST_SRCS)))
514endif
515
516SIMPLE_ENCODE_TEST_BIN=./test_simple_encode$(EXE_SFX)
517SIMPLE_ENCODE_TEST_SRCS=$(call addprefix_clean,test/,\
518                        $(call enabled,SIMPLE_ENCODE_TEST_SRCS))
519SIMPLE_ENCODE_TEST_OBJS := $(sort $(call objs,$(SIMPLE_ENCODE_TEST_SRCS)))
520
521libvpx_test_srcs.txt:
522	@echo "    [CREATE] $@"
523	@echo $(LIBVPX_TEST_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@
524CLEAN-OBJS += libvpx_test_srcs.txt
525
526# Attempt to download the file using curl, retrying once if it fails for a
527# partial file (18).
528$(LIBVPX_TEST_DATA): $(SRC_PATH_BARE)/test/test-data.sha1
529	@echo "    [DOWNLOAD] $@"
530	$(qexec)( \
531	  trap 'rm -f $@' INT TERM; \
532	  curl="curl -S -s --retry 1 -L -o $@ $(call libvpx_test_data_url,$(@F))"; \
533	  $$curl; ret=$$?; \
534	  case "$$ret" in \
535	    18) $$curl -C - ;; \
536	    *) exit $$ret ;; \
537	  esac \
538	)
539
540testdata: $(LIBVPX_TEST_DATA)
541	$(qexec)[ -x "$$(which sha1sum)" ] && sha1sum=sha1sum;\
542          [ -x "$$(which shasum)" ] && sha1sum=shasum;\
543          [ -x "$$(which sha1)" ] && sha1sum=sha1;\
544          if [ -n "$${sha1sum}" ]; then\
545            set -e;\
546            echo "Checking test data:";\
547            for f in $(call enabled,LIBVPX_TEST_DATA); do\
548                grep $$f $(SRC_PATH_BARE)/test/test-data.sha1 |\
549                    (cd "$(LIBVPX_TEST_DATA_PATH)"; $${sha1sum} -c);\
550            done; \
551        else\
552            echo "Skipping test data integrity check, sha1sum not found.";\
553        fi
554
555ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
556ifeq ($(CONFIG_MSVS),yes)
557
558gtest.$(VCPROJ_SFX): $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.cc
559	@echo "    [CREATE] $@"
560	$(qexec)$(GEN_VCPROJ) \
561            --lib \
562            --target=$(TOOLCHAIN) \
563            $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
564            --name=gtest \
565            --proj-guid=EC00E1EC-AF68-4D92-A255-181690D1C9B1 \
566            --ver=$(CONFIG_VS_VERSION) \
567            --src-path-bare="$(SRC_PATH_BARE)" \
568            --as=$(AS) \
569            -D_VARIADIC_MAX=10 \
570            --out=gtest.$(VCPROJ_SFX) $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.cc \
571            -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" -I"$(SRC_PATH_BARE)/third_party/googletest/src"
572
573PROJECTS-$(CONFIG_MSVS) += gtest.$(VCPROJ_SFX)
574
575test_libvpx.$(VCPROJ_SFX): $(LIBVPX_TEST_SRCS) vpx.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX)
576	@echo "    [CREATE] $@"
577	$(qexec)$(GEN_VCPROJ) \
578            --exe \
579            --target=$(TOOLCHAIN) \
580            --name=test_libvpx \
581            -D_VARIADIC_MAX=10 \
582            --proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \
583            --ver=$(CONFIG_VS_VERSION) \
584            --src-path-bare="$(SRC_PATH_BARE)" \
585            --as=$(AS) \
586            $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
587            --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \
588            -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \
589            $(if $(CONFIG_WEBM_IO),-I"$(SRC_PATH_BARE)/third_party/libwebm") \
590            -L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^
591
592PROJECTS-$(CONFIG_MSVS) += test_libvpx.$(VCPROJ_SFX)
593
594LIBVPX_TEST_BIN := $(addprefix $(TGT_OS:win64=x64)/Release/,$(notdir $(LIBVPX_TEST_BIN)))
595
596ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),)
597PROJECTS-$(CONFIG_MSVS) += test_intra_pred_speed.$(VCPROJ_SFX)
598test_intra_pred_speed.$(VCPROJ_SFX): $(TEST_INTRA_PRED_SPEED_SRCS) vpx.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX)
599	@echo "    [CREATE] $@"
600	$(qexec)$(GEN_VCPROJ) \
601            --exe \
602            --target=$(TOOLCHAIN) \
603            --name=test_intra_pred_speed \
604            -D_VARIADIC_MAX=10 \
605            --proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \
606            --ver=$(CONFIG_VS_VERSION) \
607            --src-path-bare="$(SRC_PATH_BARE)" \
608            --as=$(AS) \
609            $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
610            --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \
611            -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \
612            -L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^
613endif  # TEST_INTRA_PRED_SPEED
614
615ifeq ($(CONFIG_ENCODERS),yes)
616ifneq ($(strip $(RC_INTERFACE_TEST_OBJS)),)
617PROJECTS-$(CONFIG_MSVS) += test_rc_interface.$(VCPROJ_SFX)
618test_rc_interface.$(VCPROJ_SFX): $(RC_INTERFACE_TEST_SRCS) vpx.$(VCPROJ_SFX) \
619	vpxrc.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX)
620	@echo "    [CREATE] $@"
621	$(qexec)$(GEN_VCPROJ) \
622            --exe \
623            --target=$(TOOLCHAIN) \
624            --name=test_rc_interface \
625            -D_VARIADIC_MAX=10 \
626            --proj-guid=30458F88-1BC6-4689-B41C-50F3737AAB27 \
627            --ver=$(CONFIG_VS_VERSION) \
628            --as=$(AS) \
629            --src-path-bare="$(SRC_PATH_BARE)" \
630            $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
631            --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \
632            -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \
633            -L. -l$(CODEC_LIB) -l$(RC_RTC_LIB) -l$(GTEST_LIB) $^
634endif  # RC_INTERFACE_TEST
635endif  # CONFIG_ENCODERS
636endif  # CONFIG_MSVS
637else
638
639include $(SRC_PATH_BARE)/third_party/googletest/gtest.mk
640GTEST_SRCS := $(addprefix third_party/googletest/src/,$(call enabled,GTEST_SRCS))
641GTEST_OBJS=$(call objs,$(GTEST_SRCS))
642ifeq ($(filter win%,$(TGT_OS)),$(TGT_OS))
643# Disabling pthreads globally will cause issues on darwin and possibly elsewhere
644$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -DGTEST_HAS_PTHREAD=0
645endif
646GTEST_INCLUDES := -I$(SRC_PATH_BARE)/third_party/googletest/src
647GTEST_INCLUDES += -I$(SRC_PATH_BARE)/third_party/googletest/src/include
648$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES)
649OBJS-yes += $(GTEST_OBJS)
650LIBS-yes += $(BUILD_PFX)libgtest.a $(BUILD_PFX)libgtest_g.a
651$(BUILD_PFX)libgtest_g.a: $(GTEST_OBJS)
652
653LIBVPX_TEST_OBJS=$(sort $(call objs,$(LIBVPX_TEST_SRCS)))
654$(LIBVPX_TEST_OBJS) $(LIBVPX_TEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES)
655OBJS-yes += $(LIBVPX_TEST_OBJS)
656BINS-yes += $(LIBVPX_TEST_BIN)
657
658CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx)
659CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a)
660TEST_LIBS := lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a
661$(LIBVPX_TEST_BIN): $(TEST_LIBS)
662$(eval $(call linkerxx_template,$(LIBVPX_TEST_BIN), \
663              $(LIBVPX_TEST_OBJS) \
664              -L. -lvpx -lgtest $(extralibs) -lm))
665
666ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),)
667$(TEST_INTRA_PRED_SPEED_OBJS) $(TEST_INTRA_PRED_SPEED_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES)
668OBJS-yes += $(TEST_INTRA_PRED_SPEED_OBJS)
669BINS-yes += $(TEST_INTRA_PRED_SPEED_BIN)
670
671$(TEST_INTRA_PRED_SPEED_BIN): $(TEST_LIBS)
672$(eval $(call linkerxx_template,$(TEST_INTRA_PRED_SPEED_BIN), \
673              $(TEST_INTRA_PRED_SPEED_OBJS) \
674              -L. -lvpx -lgtest $(extralibs) -lm))
675endif  # TEST_INTRA_PRED_SPEED
676
677ifeq ($(CONFIG_ENCODERS),yes)
678ifneq ($(strip $(RC_INTERFACE_TEST_OBJS)),)
679$(RC_INTERFACE_TEST_OBJS) $(RC_INTERFACE_TEST_OBJS:.o=.d): \
680  CXXFLAGS += $(GTEST_INCLUDES)
681OBJS-yes += $(RC_INTERFACE_TEST_OBJS)
682BINS-yes += $(RC_INTERFACE_TEST_BIN)
683
684$(RC_INTERFACE_TEST_BIN): $(TEST_LIBS) libvpxrc.a
685$(eval $(call linkerxx_template,$(RC_INTERFACE_TEST_BIN), \
686              $(RC_INTERFACE_TEST_OBJS) \
687              -L. -lvpx -lgtest -lvpxrc $(extralibs) -lm))
688endif  # RC_INTERFACE_TEST
689endif  # CONFIG_ENCODERS
690
691ifneq ($(strip $(SIMPLE_ENCODE_TEST_OBJS)),)
692$(SIMPLE_ENCODE_TEST_OBJS) $(SIMPLE_ENCODE_TEST_OBJS:.o=.d): \
693  CXXFLAGS += $(GTEST_INCLUDES)
694OBJS-yes += $(SIMPLE_ENCODE_TEST_OBJS)
695BINS-yes += $(SIMPLE_ENCODE_TEST_BIN)
696
697$(SIMPLE_ENCODE_TEST_BIN): $(TEST_LIBS) libsimple_encode.a
698$(eval $(call linkerxx_template,$(SIMPLE_ENCODE_TEST_BIN), \
699              $(SIMPLE_ENCODE_TEST_OBJS) \
700              -L. -lsimple_encode -lvpx -lgtest $(extralibs) -lm))
701endif  # SIMPLE_ENCODE_TEST
702
703endif  # CONFIG_EXTERNAL_BUILD
704
705# Install test sources only if codec source is included
706INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(patsubst $(SRC_PATH_BARE)/%,%,\
707    $(shell find $(SRC_PATH_BARE)/third_party/googletest -type f))
708INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(LIBVPX_TEST_SRCS)
709INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(TEST_INTRA_PRED_SPEED_SRCS)
710INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(RC_INTERFACE_TEST_SRCS)
711
712define test_shard_template
713test: test_shard.$(1)
714test-no-data-check: test_shard_ndc.$(1)
715test_shard.$(1) test_shard_ndc.$(1): $(LIBVPX_TEST_BIN)
716	@set -e; \
717	 export GTEST_SHARD_INDEX=$(1); \
718	 export GTEST_TOTAL_SHARDS=$(2); \
719	 $(LIBVPX_TEST_BIN)
720test_shard.$(1): testdata
721.PHONY: test_shard.$(1) test_shard_ndc.$(1)
722endef
723
724NUM_SHARDS := 10
725SHARDS := 0 1 2 3 4 5 6 7 8 9
726$(foreach s,$(SHARDS),$(eval $(call test_shard_template,$(s),$(NUM_SHARDS))))
727
728endif  # CONFIG_UNIT_TESTS
729
730##
731## documentation directives
732##
733CLEAN-OBJS += libs.doxy
734DOCS-yes += libs.doxy
735libs.doxy: $(CODEC_DOC_SRCS)
736	@echo "    [CREATE] $@"
737	@rm -f $@
738	@echo "INPUT += $^" >> $@
739	@echo "INCLUDE_PATH += ." >> $@;
740	@echo "ENABLED_SECTIONS += $(sort $(CODEC_DOC_SECTIONS))" >> $@
741
742## Generate rtcd.h for all objects
743ifeq ($(CONFIG_DEPENDENCY_TRACKING),yes)
744$(OBJS-yes:.o=.d): $(RTCD)
745else
746$(OBJS-yes): $(RTCD)
747endif
748
749## Update the global src list
750SRCS += $(CODEC_SRCS) $(LIBVPX_TEST_SRCS) $(GTEST_SRCS)
751SRCS += $(RC_INTERFACE_TEST_SRCS)
752
753##
754## vpxdec/vpxenc tests.
755##
756ifeq ($(CONFIG_UNIT_TESTS),yes)
757TEST_BIN_PATH = .
758ifeq ($(CONFIG_MSVS),yes)
759# MSVC will build both Debug and Release configurations of tools in a
760# sub directory named for the current target. Assume the user wants to
761# run the Release tools, and assign TEST_BIN_PATH accordingly.
762# TODO(tomfinegan): Is this adequate for ARM?
763# TODO(tomfinegan): Support running the debug versions of tools?
764TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH))
765endif
766utiltest utiltest-no-data-check:
767	$(qexec)$(SRC_PATH_BARE)/test/vpxdec.sh \
768		--test-data-path "$(LIBVPX_TEST_DATA_PATH)" \
769		--bin-path $(TEST_BIN_PATH)
770	$(qexec)$(SRC_PATH_BARE)/test/vpxenc.sh \
771		--test-data-path "$(LIBVPX_TEST_DATA_PATH)" \
772		--bin-path $(TEST_BIN_PATH)
773utiltest: testdata
774else
775utiltest utiltest-no-data-check:
776	@echo Unit tests must be enabled to make the utiltest target.
777endif
778
779##
780## Example tests.
781##
782ifeq ($(CONFIG_UNIT_TESTS),yes)
783# All non-MSVC targets output example targets in a sub dir named examples.
784EXAMPLES_BIN_PATH = examples
785ifeq ($(CONFIG_MSVS),yes)
786# MSVC will build both Debug and Release configurations of the examples in a
787# sub directory named for the current target. Assume the user wants to
788# run the Release tools, and assign EXAMPLES_BIN_PATH accordingly.
789# TODO(tomfinegan): Is this adequate for ARM?
790# TODO(tomfinegan): Support running the debug versions of tools?
791EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release
792endif
793exampletest exampletest-no-data-check: examples
794	$(qexec)$(SRC_PATH_BARE)/test/examples.sh \
795		--test-data-path "$(LIBVPX_TEST_DATA_PATH)" \
796		--bin-path $(EXAMPLES_BIN_PATH)
797exampletest: testdata
798else
799exampletest exampletest-no-data-check:
800	@echo Unit tests must be enabled to make the exampletest target.
801endif
802