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 181ifeq ($(CONFIG_EXTERNAL_BUILD),yes) 182ifeq ($(CONFIG_MSVS),yes) 183INSTALL-LIBS-yes += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/$(CODEC_LIB).lib) 184INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/$(CODEC_LIB)d.lib) 185INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/vpx.dll) 186INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/vpx.exp) 187endif 188else 189INSTALL-LIBS-$(CONFIG_STATIC) += $(LIBSUBDIR)/libvpx.a 190INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libvpx_g.a 191endif 192 193ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_RATE_CTRL),yesyes) 194 SIMPLE_ENCODE_SRCS := $(call enabled,CODEC_SRCS) 195 SIMPLE_ENCODE_SRCS += $(VP9_PREFIX)simple_encode.cc 196 SIMPLE_ENCODE_SRCS += $(VP9_PREFIX)simple_encode.h 197 SIMPLE_ENCODE_SRCS += ivfenc.h 198 SIMPLE_ENCODE_SRCS += ivfenc.c 199 INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP9_PREFIX)simple_encode.cc 200 INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP9_PREFIX)simple_encode.h 201endif 202 203CODEC_SRCS=$(call enabled,CODEC_SRCS) 204 205INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(CODEC_SRCS) 206INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(call enabled,CODEC_EXPORTS) 207 208 209# Generate a list of all enabled sources, in particular for exporting to gyp 210# based build systems. 211libvpx_srcs.txt: 212 @echo " [CREATE] $@" 213 @echo $(CODEC_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@ 214CLEAN-OBJS += libvpx_srcs.txt 215 216# Assembly files that are included, but don't define symbols themselves. 217# Filtered out to avoid Windows build warnings. 218ASM_INCLUDES := \ 219 third_party/x86inc/x86inc.asm \ 220 vpx_config.asm \ 221 vpx_ports/x86_abi_support.asm \ 222 vpx_dsp/x86/bitdepth_conversion_sse2.asm \ 223 224ifeq ($(CONFIG_EXTERNAL_BUILD),yes) 225ifeq ($(CONFIG_MSVS),yes) 226 227vpx.def: $(call enabled,CODEC_EXPORTS) 228 @echo " [CREATE] $@" 229 $(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_def.sh\ 230 --name=vpx\ 231 --out=$@ $^ 232CLEAN-OBJS += vpx.def 233 234vpx.$(VCPROJ_SFX): VCPROJ_SRCS=$(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) 235 236vpx.$(VCPROJ_SFX): $(CODEC_SRCS) vpx.def 237 @echo " [CREATE] $@" 238 $(qexec)$(GEN_VCPROJ) \ 239 $(if $(CONFIG_SHARED),--dll,--lib) \ 240 --target=$(TOOLCHAIN) \ 241 $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ 242 --name=vpx \ 243 --proj-guid=DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74 \ 244 --module-def=vpx.def \ 245 --ver=$(CONFIG_VS_VERSION) \ 246 --src-path-bare="$(SRC_PATH_BARE)" \ 247 --out=$@ $(CFLAGS) \ 248 --as=$(AS) \ 249 $(filter $(SRC_PATH_BARE)/vp8/%.c, $(VCPROJ_SRCS)) \ 250 $(filter $(SRC_PATH_BARE)/vp8/%.h, $(VCPROJ_SRCS)) \ 251 $(filter $(SRC_PATH_BARE)/vp9/%.c, $(VCPROJ_SRCS)) \ 252 $(filter $(SRC_PATH_BARE)/vp9/%.h, $(VCPROJ_SRCS)) \ 253 $(filter $(SRC_PATH_BARE)/vpx/%, $(VCPROJ_SRCS)) \ 254 $(filter $(SRC_PATH_BARE)/vpx_dsp/%, $(VCPROJ_SRCS)) \ 255 $(filter-out $(addprefix $(SRC_PATH_BARE)/, \ 256 vp8/%.c vp8/%.h vp9/%.c vp9/%.h vpx/% vpx_dsp/%), \ 257 $(VCPROJ_SRCS)) \ 258 --src-path-bare="$(SRC_PATH_BARE)" \ 259 260PROJECTS-yes += vpx.$(VCPROJ_SFX) 261 262vpx.$(VCPROJ_SFX): vpx_config.asm 263vpx.$(VCPROJ_SFX): $(RTCD) 264 265vpxrc.$(VCPROJ_SFX): \ 266 VCPROJ_SRCS=$(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) 267 268vpxrc.$(VCPROJ_SFX): $(RC_RTC_SRCS) 269 @echo " [CREATE] $@" 270 $(qexec)$(GEN_VCPROJ) \ 271 $(if $(CONFIG_SHARED),--dll,--lib) \ 272 --target=$(TOOLCHAIN) \ 273 $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ 274 --name=vpxrc \ 275 --proj-guid=C26FF952-9494-4838-9A3F-7F3D4F613385 \ 276 --ver=$(CONFIG_VS_VERSION) \ 277 --src-path-bare="$(SRC_PATH_BARE)" \ 278 --out=$@ $(CFLAGS) \ 279 --as=$(AS) \ 280 $(filter $(SRC_PATH_BARE)/vp9/%.c, $(VCPROJ_SRCS)) \ 281 $(filter $(SRC_PATH_BARE)/vp9/%.cc, $(VCPROJ_SRCS)) \ 282 $(filter $(SRC_PATH_BARE)/vp9/%.h, $(VCPROJ_SRCS)) \ 283 $(filter $(SRC_PATH_BARE)/vpx/%, $(VCPROJ_SRCS)) \ 284 $(filter $(SRC_PATH_BARE)/vpx_dsp/%, $(VCPROJ_SRCS)) \ 285 $(filter-out $(addprefix $(SRC_PATH_BARE)/, \ 286 vp8/%.c vp8/%.h vp9/%.c vp9/%.cc vp9/%.h vpx/% \ 287 vpx_dsp/%), \ 288 $(VCPROJ_SRCS)) \ 289 --src-path-bare="$(SRC_PATH_BARE)" \ 290 291PROJECTS-yes += vpxrc.$(VCPROJ_SFX) 292 293vpxrc.$(VCPROJ_SFX): vpx_config.asm 294vpxrc.$(VCPROJ_SFX): $(RTCD) 295 296endif # ifeq ($(CONFIG_MSVS),yes) 297else # ifeq ($(CONFIG_EXTERNAL_BUILD),yes) 298LIBVPX_OBJS=$(call objs, $(filter-out $(ASM_INCLUDES), $(CODEC_SRCS))) 299OBJS-yes += $(LIBVPX_OBJS) 300LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a 301$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS) 302 303# Updating version info. 304# https://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info 305# For libtool: c=<current>, a=<age>, r=<revision> 306# libtool generates .so file as .so.[c-a].a.r, while -version-info c:r:a is 307# passed to libtool. 308# 309# libvpx library file is generated as libvpx.so.<MAJOR>.<MINOR>.<PATCH> 310# MAJOR = c-a, MINOR = a, PATCH = r 311# 312# To determine SO_VERSION_{MAJOR,MINOR,PATCH}, calculate c,a,r with current 313# SO_VERSION_* then follow the rules in the link to detemine the new version 314# (c1, a1, r1) and set MAJOR to [c1-a1], MINOR to a1 and PATCH to r1 315SO_VERSION_MAJOR := 8 316SO_VERSION_MINOR := 0 317SO_VERSION_PATCH := 0 318ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS)) 319LIBVPX_SO := libvpx.$(SO_VERSION_MAJOR).dylib 320SHARED_LIB_SUF := .dylib 321EXPORT_FILE := libvpx.syms 322LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ 323 libvpx.dylib ) 324else 325ifeq ($(filter iphonesimulator%,$(TGT_OS)),$(TGT_OS)) 326LIBVPX_SO := libvpx.$(SO_VERSION_MAJOR).dylib 327SHARED_LIB_SUF := .dylib 328EXPORT_FILE := libvpx.syms 329LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, libvpx.dylib) 330else 331ifeq ($(filter os2%,$(TGT_OS)),$(TGT_OS)) 332LIBVPX_SO := libvpx$(SO_VERSION_MAJOR).dll 333SHARED_LIB_SUF := _dll.a 334EXPORT_FILE := libvpx.def 335LIBVPX_SO_SYMLINKS := 336LIBVPX_SO_IMPLIB := libvpx_dll.a 337else 338LIBVPX_SO := libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH) 339SHARED_LIB_SUF := .so 340EXPORT_FILE := libvpx.ver 341LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ 342 libvpx.so libvpx.so.$(SO_VERSION_MAJOR) \ 343 libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR)) 344endif 345endif 346endif 347 348LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBVPX_SO)\ 349 $(notdir $(LIBVPX_SO_SYMLINKS)) \ 350 $(if $(LIBVPX_SO_IMPLIB), $(BUILD_PFX)$(LIBVPX_SO_IMPLIB)) 351$(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) $(EXPORT_FILE) 352$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm 353$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(SO_VERSION_MAJOR) 354$(BUILD_PFX)$(LIBVPX_SO): EXPORTS_FILE = $(EXPORT_FILE) 355 356libvpx.def: $(call enabled,CODEC_EXPORTS) 357 @echo " [CREATE] $@" 358 $(qexec)echo LIBRARY $(LIBVPX_SO:.dll=) INITINSTANCE TERMINSTANCE > $@ 359 $(qexec)echo "DATA MULTIPLE NONSHARED" >> $@ 360 $(qexec)echo "EXPORTS" >> $@ 361 $(qexec)awk '!/vpx_svc_*/ {print "_"$$2}' $^ >>$@ 362CLEAN-OBJS += libvpx.def 363 364libvpx_dll.a: $(LIBVPX_SO) 365 @echo " [IMPLIB] $@" 366 $(qexec)emximp -o $@ $< 367CLEAN-OBJS += libvpx_dll.a 368 369define libvpx_symlink_template 370$(1): $(2) 371 @echo " [LN] $(2) $$@" 372 $(qexec)mkdir -p $$(dir $$@) 373 $(qexec)ln -sf $(2) $$@ 374endef 375 376$(eval $(call libvpx_symlink_template,\ 377 $(addprefix $(BUILD_PFX),$(notdir $(LIBVPX_SO_SYMLINKS))),\ 378 $(BUILD_PFX)$(LIBVPX_SO))) 379$(eval $(call libvpx_symlink_template,\ 380 $(addprefix $(DIST_DIR)/,$(LIBVPX_SO_SYMLINKS)),\ 381 $(LIBVPX_SO))) 382 383 384INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBVPX_SO_SYMLINKS) 385INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBVPX_SO) 386INSTALL-LIBS-$(CONFIG_SHARED) += $(if $(LIBVPX_SO_IMPLIB),$(LIBSUBDIR)/$(LIBVPX_SO_IMPLIB)) 387 388 389LIBS-yes += vpx.pc 390vpx.pc: config.mk libs.mk 391 @echo " [CREATE] $@" 392 $(qexec)echo '# pkg-config file from libvpx $(VERSION_STRING)' > $@ 393 $(qexec)echo 'prefix=$(PREFIX)' >> $@ 394 $(qexec)echo 'exec_prefix=$${prefix}' >> $@ 395 $(qexec)echo 'libdir=$${prefix}/$(LIBSUBDIR)' >> $@ 396 $(qexec)echo 'includedir=$${prefix}/include' >> $@ 397 $(qexec)echo '' >> $@ 398 $(qexec)echo 'Name: vpx' >> $@ 399 $(qexec)echo 'Description: WebM Project VPx codec implementation' >> $@ 400 $(qexec)echo 'Version: $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)' >> $@ 401 $(qexec)echo 'Requires:' >> $@ 402 $(qexec)echo 'Conflicts:' >> $@ 403 $(qexec)echo 'Libs: -L$${libdir} -lvpx -lm' >> $@ 404ifeq ($(HAVE_PTHREAD_H),yes) 405 $(qexec)echo 'Libs.private: -lm -lpthread' >> $@ 406else 407 $(qexec)echo 'Libs.private: -lm' >> $@ 408endif 409 $(qexec)echo 'Cflags: -I$${includedir}' >> $@ 410INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc 411INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc 412CLEAN-OBJS += vpx.pc 413 414ifeq ($(CONFIG_ENCODERS),yes) 415 RC_RTC_OBJS=$(call objs,$(RC_RTC_SRCS)) 416 OBJS-yes += $(RC_RTC_OBJS) 417 LIBS-yes += $(BUILD_PFX)libvpxrc.a $(BUILD_PFX)libvpxrc_g.a 418 $(BUILD_PFX)libvpxrc_g.a: $(RC_RTC_OBJS) 419endif 420 421ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_RATE_CTRL),yesyes) 422 SIMPLE_ENCODE_OBJS=$(call objs,$(SIMPLE_ENCODE_SRCS)) 423 OBJS-yes += $(SIMPLE_ENCODE_OBJS) 424 LIBS-yes += $(BUILD_PFX)libsimple_encode.a $(BUILD_PFX)libsimple_encode_g.a 425 $(BUILD_PFX)libsimple_encode_g.a: $(SIMPLE_ENCODE_OBJS) 426endif 427 428endif # ifeq ($(CONFIG_EXTERNAL_BUILD),yes) 429 430libvpx.ver: $(call enabled,CODEC_EXPORTS) 431 @echo " [CREATE] $@" 432 $(qexec)echo "{ global:" > $@ 433 $(qexec)for f in $?; do awk '{print $$2";"}' < $$f >>$@; done 434 $(qexec)echo "local: *; };" >> $@ 435CLEAN-OBJS += libvpx.ver 436 437libvpx.syms: $(call enabled,CODEC_EXPORTS) 438 @echo " [CREATE] $@" 439 $(qexec)awk '{print "_"$$2}' $^ >$@ 440CLEAN-OBJS += libvpx.syms 441 442# 443# Rule to make assembler configuration file from C configuration file 444# 445ifeq ($(VPX_ARCH_X86)$(VPX_ARCH_X86_64),yes) 446# YASM 447$(BUILD_PFX)vpx_config.asm: $(BUILD_PFX)vpx_config.h 448 @echo " [CREATE] $@" 449 @LC_ALL=C grep -E "#define [A-Z0-9_]+ [01]" $< \ 450 | awk '{print $$2 " equ " $$3}' > $@ 451else 452ADS2GAS=$(if $(filter yes,$(CONFIG_GCC)),| $(ASM_CONVERSION)) 453$(BUILD_PFX)vpx_config.asm: $(BUILD_PFX)vpx_config.h 454 @echo " [CREATE] $@" 455 @LC_ALL=C grep -E "#define [A-Z0-9_]+ [01]" $< \ 456 | awk '{print $$2 " EQU " $$3}' $(ADS2GAS) > $@ 457 @echo " END" $(ADS2GAS) >> $@ 458CLEAN-OBJS += $(BUILD_PFX)vpx_config.asm 459endif 460 461# 462# Add assembler dependencies for configuration. 463# 464$(filter %.S.o,$(OBJS-yes)): $(BUILD_PFX)vpx_config.asm 465$(filter %$(ASM).o,$(OBJS-yes)): $(BUILD_PFX)vpx_config.asm 466 467 468$(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)vpx_version.h) 469CLEAN-OBJS += $(BUILD_PFX)vpx_version.h 470 471# 472# Add include path for libwebm sources. 473# 474ifeq ($(CONFIG_WEBM_IO),yes) 475 CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/libwebm 476endif 477 478## 479## libvpx test directives 480## 481ifeq ($(CONFIG_UNIT_TESTS),yes) 482LIBVPX_TEST_DATA_PATH ?= . 483 484include $(SRC_PATH_BARE)/test/test.mk 485 486# addprefix_clean behaves like addprefix if the target doesn't start with "../" 487# However, if the target starts with "../", instead of adding prefix, 488# it will remove "../". 489# Using addprefix_clean, we can avoid two different targets building the 490# same file, i.e. 491# test/../ivfenc.c.d: ivfenc.o 492# ivfenc.c.d: ivfenc.o 493# Note that the other way to solve this problem is using "realpath". 494# The "realpath" is supported by make 3.81 or later. 495addprefix_clean=$(patsubst $(1)../%,%,$(addprefix $(1), $(2))) 496LIBVPX_TEST_SRCS=$(call addprefix_clean,test/,$(call enabled,LIBVPX_TEST_SRCS)) 497 498LIBVPX_TEST_BIN=./test_libvpx$(EXE_SFX) 499LIBVPX_TEST_DATA=$(addprefix $(LIBVPX_TEST_DATA_PATH)/,\ 500 $(call enabled,LIBVPX_TEST_DATA)) 501libvpx_test_data_url=https://storage.googleapis.com/downloads.webmproject.org/test_data/libvpx/$(1) 502 503TEST_INTRA_PRED_SPEED_BIN=./test_intra_pred_speed$(EXE_SFX) 504TEST_INTRA_PRED_SPEED_SRCS=$(call addprefix_clean,test/,\ 505 $(call enabled,TEST_INTRA_PRED_SPEED_SRCS)) 506TEST_INTRA_PRED_SPEED_OBJS := $(sort $(call objs,$(TEST_INTRA_PRED_SPEED_SRCS))) 507 508ifeq ($(CONFIG_ENCODERS),yes) 509RC_INTERFACE_TEST_BIN=./test_rc_interface$(EXE_SFX) 510RC_INTERFACE_TEST_SRCS=$(call addprefix_clean,test/,\ 511 $(call enabled,RC_INTERFACE_TEST_SRCS)) 512RC_INTERFACE_TEST_OBJS := $(sort $(call objs,$(RC_INTERFACE_TEST_SRCS))) 513endif 514 515SIMPLE_ENCODE_TEST_BIN=./test_simple_encode$(EXE_SFX) 516SIMPLE_ENCODE_TEST_SRCS=$(call addprefix_clean,test/,\ 517 $(call enabled,SIMPLE_ENCODE_TEST_SRCS)) 518SIMPLE_ENCODE_TEST_OBJS := $(sort $(call objs,$(SIMPLE_ENCODE_TEST_SRCS))) 519 520libvpx_test_srcs.txt: 521 @echo " [CREATE] $@" 522 @echo $(LIBVPX_TEST_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@ 523CLEAN-OBJS += libvpx_test_srcs.txt 524 525# Attempt to download the file using curl, retrying once if it fails for a 526# partial file (18). 527$(LIBVPX_TEST_DATA): $(SRC_PATH_BARE)/test/test-data.sha1 528 @echo " [DOWNLOAD] $@" 529 $(qexec)( \ 530 trap 'rm -f $@' INT TERM; \ 531 curl="curl -S -s --retry 1 -L -o $@ $(call libvpx_test_data_url,$(@F))"; \ 532 $$curl; ret=$$?; \ 533 case "$$ret" in \ 534 18) $$curl -C - ;; \ 535 *) exit $$ret ;; \ 536 esac \ 537 ) 538 539testdata: $(LIBVPX_TEST_DATA) 540 $(qexec)[ -x "$$(which sha1sum)" ] && sha1sum=sha1sum;\ 541 [ -x "$$(which shasum)" ] && sha1sum=shasum;\ 542 [ -x "$$(which sha1)" ] && sha1sum=sha1;\ 543 if [ -n "$${sha1sum}" ]; then\ 544 set -e;\ 545 echo "Checking test data:";\ 546 for f in $(call enabled,LIBVPX_TEST_DATA); do\ 547 grep $$f $(SRC_PATH_BARE)/test/test-data.sha1 |\ 548 (cd $(LIBVPX_TEST_DATA_PATH); $${sha1sum} -c);\ 549 done; \ 550 else\ 551 echo "Skipping test data integrity check, sha1sum not found.";\ 552 fi 553 554ifeq ($(CONFIG_EXTERNAL_BUILD),yes) 555ifeq ($(CONFIG_MSVS),yes) 556 557gtest.$(VCPROJ_SFX): $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.cc 558 @echo " [CREATE] $@" 559 $(qexec)$(GEN_VCPROJ) \ 560 --lib \ 561 --target=$(TOOLCHAIN) \ 562 $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ 563 --name=gtest \ 564 --proj-guid=EC00E1EC-AF68-4D92-A255-181690D1C9B1 \ 565 --ver=$(CONFIG_VS_VERSION) \ 566 --src-path-bare="$(SRC_PATH_BARE)" \ 567 --as=$(AS) \ 568 -D_VARIADIC_MAX=10 \ 569 --out=gtest.$(VCPROJ_SFX) $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.cc \ 570 -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" -I"$(SRC_PATH_BARE)/third_party/googletest/src" 571 572PROJECTS-$(CONFIG_MSVS) += gtest.$(VCPROJ_SFX) 573 574test_libvpx.$(VCPROJ_SFX): $(LIBVPX_TEST_SRCS) vpx.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX) 575 @echo " [CREATE] $@" 576 $(qexec)$(GEN_VCPROJ) \ 577 --exe \ 578 --target=$(TOOLCHAIN) \ 579 --name=test_libvpx \ 580 -D_VARIADIC_MAX=10 \ 581 --proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \ 582 --ver=$(CONFIG_VS_VERSION) \ 583 --src-path-bare="$(SRC_PATH_BARE)" \ 584 --as=$(AS) \ 585 $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ 586 --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \ 587 -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \ 588 $(if $(CONFIG_WEBM_IO),-I"$(SRC_PATH_BARE)/third_party/libwebm") \ 589 -L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^ 590 591PROJECTS-$(CONFIG_MSVS) += test_libvpx.$(VCPROJ_SFX) 592 593LIBVPX_TEST_BIN := $(addprefix $(TGT_OS:win64=x64)/Release/,$(notdir $(LIBVPX_TEST_BIN))) 594 595ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),) 596PROJECTS-$(CONFIG_MSVS) += test_intra_pred_speed.$(VCPROJ_SFX) 597test_intra_pred_speed.$(VCPROJ_SFX): $(TEST_INTRA_PRED_SPEED_SRCS) vpx.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX) 598 @echo " [CREATE] $@" 599 $(qexec)$(GEN_VCPROJ) \ 600 --exe \ 601 --target=$(TOOLCHAIN) \ 602 --name=test_intra_pred_speed \ 603 -D_VARIADIC_MAX=10 \ 604 --proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \ 605 --ver=$(CONFIG_VS_VERSION) \ 606 --src-path-bare="$(SRC_PATH_BARE)" \ 607 --as=$(AS) \ 608 $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ 609 --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \ 610 -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \ 611 -L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^ 612endif # TEST_INTRA_PRED_SPEED 613 614ifeq ($(CONFIG_ENCODERS),yes) 615ifneq ($(strip $(RC_INTERFACE_TEST_OBJS)),) 616PROJECTS-$(CONFIG_MSVS) += test_rc_interface.$(VCPROJ_SFX) 617test_rc_interface.$(VCPROJ_SFX): $(RC_INTERFACE_TEST_SRCS) vpx.$(VCPROJ_SFX) \ 618 vpxrc.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX) 619 @echo " [CREATE] $@" 620 $(qexec)$(GEN_VCPROJ) \ 621 --exe \ 622 --target=$(TOOLCHAIN) \ 623 --name=test_rc_interface \ 624 -D_VARIADIC_MAX=10 \ 625 --proj-guid=30458F88-1BC6-4689-B41C-50F3737AAB27 \ 626 --ver=$(CONFIG_VS_VERSION) \ 627 --as=$(AS) \ 628 --src-path-bare="$(SRC_PATH_BARE)" \ 629 $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ 630 --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \ 631 -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \ 632 -L. -l$(CODEC_LIB) -l$(RC_RTC_LIB) -l$(GTEST_LIB) $^ 633endif # RC_INTERFACE_TEST 634endif # CONFIG_VP9_ENCODER 635endif 636else 637 638include $(SRC_PATH_BARE)/third_party/googletest/gtest.mk 639GTEST_SRCS := $(addprefix third_party/googletest/src/,$(call enabled,GTEST_SRCS)) 640GTEST_OBJS=$(call objs,$(GTEST_SRCS)) 641ifeq ($(filter win%,$(TGT_OS)),$(TGT_OS)) 642# Disabling pthreads globally will cause issues on darwin and possibly elsewhere 643$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -DGTEST_HAS_PTHREAD=0 644endif 645GTEST_INCLUDES := -I$(SRC_PATH_BARE)/third_party/googletest/src 646GTEST_INCLUDES += -I$(SRC_PATH_BARE)/third_party/googletest/src/include 647$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) 648OBJS-yes += $(GTEST_OBJS) 649LIBS-yes += $(BUILD_PFX)libgtest.a $(BUILD_PFX)libgtest_g.a 650$(BUILD_PFX)libgtest_g.a: $(GTEST_OBJS) 651 652LIBVPX_TEST_OBJS=$(sort $(call objs,$(LIBVPX_TEST_SRCS))) 653$(LIBVPX_TEST_OBJS) $(LIBVPX_TEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) 654OBJS-yes += $(LIBVPX_TEST_OBJS) 655BINS-yes += $(LIBVPX_TEST_BIN) 656 657CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx) 658CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a) 659TEST_LIBS := lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a 660$(LIBVPX_TEST_BIN): $(TEST_LIBS) 661$(eval $(call linkerxx_template,$(LIBVPX_TEST_BIN), \ 662 $(LIBVPX_TEST_OBJS) \ 663 -L. -lvpx -lgtest $(extralibs) -lm)) 664 665ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),) 666$(TEST_INTRA_PRED_SPEED_OBJS) $(TEST_INTRA_PRED_SPEED_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) 667OBJS-yes += $(TEST_INTRA_PRED_SPEED_OBJS) 668BINS-yes += $(TEST_INTRA_PRED_SPEED_BIN) 669 670$(TEST_INTRA_PRED_SPEED_BIN): $(TEST_LIBS) 671$(eval $(call linkerxx_template,$(TEST_INTRA_PRED_SPEED_BIN), \ 672 $(TEST_INTRA_PRED_SPEED_OBJS) \ 673 -L. -lvpx -lgtest $(extralibs) -lm)) 674endif # TEST_INTRA_PRED_SPEED 675 676ifeq ($(CONFIG_ENCODERS),yes) 677ifneq ($(strip $(RC_INTERFACE_TEST_OBJS)),) 678$(RC_INTERFACE_TEST_OBJS) $(RC_INTERFACE_TEST_OBJS:.o=.d): \ 679 CXXFLAGS += $(GTEST_INCLUDES) 680OBJS-yes += $(RC_INTERFACE_TEST_OBJS) 681BINS-yes += $(RC_INTERFACE_TEST_BIN) 682 683$(RC_INTERFACE_TEST_BIN): $(TEST_LIBS) libvpxrc.a 684$(eval $(call linkerxx_template,$(RC_INTERFACE_TEST_BIN), \ 685 $(RC_INTERFACE_TEST_OBJS) \ 686 -L. -lvpx -lgtest -lvpxrc $(extralibs) -lm)) 687endif # RC_INTERFACE_TEST 688endif # CONFIG_ENCODERS 689 690ifneq ($(strip $(SIMPLE_ENCODE_TEST_OBJS)),) 691$(SIMPLE_ENCODE_TEST_OBJS) $(SIMPLE_ENCODE_TEST_OBJS:.o=.d): \ 692 CXXFLAGS += $(GTEST_INCLUDES) 693OBJS-yes += $(SIMPLE_ENCODE_TEST_OBJS) 694BINS-yes += $(SIMPLE_ENCODE_TEST_BIN) 695 696$(SIMPLE_ENCODE_TEST_BIN): $(TEST_LIBS) libsimple_encode.a 697$(eval $(call linkerxx_template,$(SIMPLE_ENCODE_TEST_BIN), \ 698 $(SIMPLE_ENCODE_TEST_OBJS) \ 699 -L. -lsimple_encode -lvpx -lgtest $(extralibs) -lm)) 700endif # SIMPLE_ENCODE_TEST 701 702endif # CONFIG_UNIT_TESTS 703 704# Install test sources only if codec source is included 705INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(patsubst $(SRC_PATH_BARE)/%,%,\ 706 $(shell find $(SRC_PATH_BARE)/third_party/googletest -type f)) 707INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(LIBVPX_TEST_SRCS) 708INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(TEST_INTRA_PRED_SPEED_SRCS) 709INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(RC_INTERFACE_TEST_SRCS) 710 711define test_shard_template 712test: test_shard.$(1) 713test-no-data-check: test_shard_ndc.$(1) 714test_shard.$(1) test_shard_ndc.$(1): $(LIBVPX_TEST_BIN) 715 @set -e; \ 716 export GTEST_SHARD_INDEX=$(1); \ 717 export GTEST_TOTAL_SHARDS=$(2); \ 718 $(LIBVPX_TEST_BIN) 719test_shard.$(1): testdata 720.PHONY: test_shard.$(1) test_shard_ndc.$(1) 721endef 722 723NUM_SHARDS := 10 724SHARDS := 0 1 2 3 4 5 6 7 8 9 725$(foreach s,$(SHARDS),$(eval $(call test_shard_template,$(s),$(NUM_SHARDS)))) 726 727endif 728 729## 730## documentation directives 731## 732CLEAN-OBJS += libs.doxy 733DOCS-yes += libs.doxy 734libs.doxy: $(CODEC_DOC_SRCS) 735 @echo " [CREATE] $@" 736 @rm -f $@ 737 @echo "INPUT += $^" >> $@ 738 @echo "INCLUDE_PATH += ." >> $@; 739 @echo "ENABLED_SECTIONS += $(sort $(CODEC_DOC_SECTIONS))" >> $@ 740 741## Generate rtcd.h for all objects 742ifeq ($(CONFIG_DEPENDENCY_TRACKING),yes) 743$(OBJS-yes:.o=.d): $(RTCD) 744else 745$(OBJS-yes): $(RTCD) 746endif 747 748## Update the global src list 749SRCS += $(CODEC_SRCS) $(LIBVPX_TEST_SRCS) $(GTEST_SRCS) 750SRCS += $(RC_INTERFACE_TEST_SRCS) 751 752## 753## vpxdec/vpxenc tests. 754## 755ifeq ($(CONFIG_UNIT_TESTS),yes) 756TEST_BIN_PATH = . 757ifeq ($(CONFIG_MSVS),yes) 758# MSVC will build both Debug and Release configurations of tools in a 759# sub directory named for the current target. Assume the user wants to 760# run the Release tools, and assign TEST_BIN_PATH accordingly. 761# TODO(tomfinegan): Is this adequate for ARM? 762# TODO(tomfinegan): Support running the debug versions of tools? 763TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH)) 764endif 765utiltest utiltest-no-data-check: 766 $(qexec)$(SRC_PATH_BARE)/test/vpxdec.sh \ 767 --test-data-path $(LIBVPX_TEST_DATA_PATH) \ 768 --bin-path $(TEST_BIN_PATH) 769 $(qexec)$(SRC_PATH_BARE)/test/vpxenc.sh \ 770 --test-data-path $(LIBVPX_TEST_DATA_PATH) \ 771 --bin-path $(TEST_BIN_PATH) 772utiltest: testdata 773else 774utiltest utiltest-no-data-check: 775 @echo Unit tests must be enabled to make the utiltest target. 776endif 777 778## 779## Example tests. 780## 781ifeq ($(CONFIG_UNIT_TESTS),yes) 782# All non-MSVC targets output example targets in a sub dir named examples. 783EXAMPLES_BIN_PATH = examples 784ifeq ($(CONFIG_MSVS),yes) 785# MSVC will build both Debug and Release configurations of the examples in a 786# sub directory named for the current target. Assume the user wants to 787# run the Release tools, and assign EXAMPLES_BIN_PATH accordingly. 788# TODO(tomfinegan): Is this adequate for ARM? 789# TODO(tomfinegan): Support running the debug versions of tools? 790EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release 791endif 792exampletest exampletest-no-data-check: examples 793 $(qexec)$(SRC_PATH_BARE)/test/examples.sh \ 794 --test-data-path $(LIBVPX_TEST_DATA_PATH) \ 795 --bin-path $(EXAMPLES_BIN_PATH) 796exampletest: testdata 797else 798exampletest exampletest-no-data-check: 799 @echo Unit tests must be enabled to make the exampletest target. 800endif 801