| @@ -173,7 +173,18 @@ INSTALL-LIBS-$(CONFIG_STATIC) += $(LIBSUBDIR)/libvpx.a · 172 unmodified lines |
| 173 | INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libvpx_g.a | 173 | INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libvpx_g.a |
| 174 | endif | 174 | endif |
| 175 | | 175 | |
| | 176 | ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_RATE_CTRL),yesyes) |
| | 177 | SIMPLE_ENCODE_SRCS := $(call enabled,CODEC_SRCS) |
| | 178 | SIMPLE_ENCODE_SRCS += $(VP9_PREFIX)simple_encode.cc |
| | 179 | SIMPLE_ENCODE_SRCS += $(VP9_PREFIX)simple_encode.h |
| | 180 | SIMPLE_ENCODE_SRCS += ivfenc.h |
| | 181 | SIMPLE_ENCODE_SRCS += ivfenc.c |
| | 182 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP9_PREFIX)simple_encode.cc |
| | 183 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP9_PREFIX)simple_encode.h |
| | 184 | endif |
| | 185 | |
| 176 | CODEC_SRCS=$(call enabled,CODEC_SRCS) | 186 | CODEC_SRCS=$(call enabled,CODEC_SRCS) |
| | 187 | |
| 177 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(CODEC_SRCS) | 188 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(CODEC_SRCS) |
| 178 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(call enabled,CODEC_EXPORTS) | 189 | INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(call enabled,CODEC_EXPORTS) |
| 179 | | 190 | |
| @@ -263,8 +274,8 @@ PROJECTS-yes += vp9rc.$(VCPROJ_SFX) · 83 unmodified lines |
| 263 | vp9rc.$(VCPROJ_SFX): vpx_config.asm | 274 | vp9rc.$(VCPROJ_SFX): vpx_config.asm |
| 264 | vp9rc.$(VCPROJ_SFX): $(RTCD) | 275 | vp9rc.$(VCPROJ_SFX): $(RTCD) |
| 265 | | 276 | |
| 266 | endif | 277 | endif # ifeq ($(CONFIG_MSVS),yes) |
| 267 | else | 278 | else # ifeq ($(CONFIG_EXTERNAL_BUILD),yes) |
| 268 | LIBVPX_OBJS=$(call objs, $(filter-out $(ASM_INCLUDES), $(CODEC_SRCS))) | 279 | LIBVPX_OBJS=$(call objs, $(filter-out $(ASM_INCLUDES), $(CODEC_SRCS))) |
| 269 | OBJS-yes += $(LIBVPX_OBJS) | 280 | OBJS-yes += $(LIBVPX_OBJS) |
| 270 | LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a | 281 | LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a |
| @@ -377,8 +388,15 @@ ifeq ($(CONFIG_VP9_ENCODER),yes) · 106 unmodified lines |
| 377 | $(BUILD_PFX)libvp9rc_g.a: $(RC_RTC_OBJS) | 388 | $(BUILD_PFX)libvp9rc_g.a: $(RC_RTC_OBJS) |
| 378 | endif | 389 | endif |
| 379 | | 390 | |
| | 391 | ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_RATE_CTRL),yesyes) |
| | 392 | SIMPLE_ENCODE_OBJS=$(call objs,$(SIMPLE_ENCODE_SRCS)) |
| | 393 | OBJS-yes += $(SIMPLE_ENCODE_OBJS) |
| | 394 | LIBS-yes += $(BUILD_PFX)libsimple_encode.a $(BUILD_PFX)libsimple_encode_g.a |
| | 395 | $(BUILD_PFX)libsimple_encode_g.a: $(SIMPLE_ENCODE_OBJS) |
| 380 | endif | 396 | endif |
| 381 | | 397 | |
| | 398 | endif # ifeq ($(CONFIG_EXTERNAL_BUILD),yes) |
| | 399 | |
| 382 | libvpx.ver: $(call enabled,CODEC_EXPORTS) | 400 | libvpx.ver: $(call enabled,CODEC_EXPORTS) |
| 383 | @echo " [CREATE] $@" | 401 | @echo " [CREATE] $@" |
| 384 | $(qexec)echo "{ global:" > $@ | 402 | $(qexec)echo "{ global:" > $@ |
| @@ -434,20 +452,39 @@ ifeq ($(CONFIG_UNIT_TESTS),yes) · 49 unmodified lines |
| 434 | LIBVPX_TEST_DATA_PATH ?= . | 452 | LIBVPX_TEST_DATA_PATH ?= . |
| 435 | | 453 | |
| 436 | include $(SRC_PATH_BARE)/test/test.mk | 454 | include $(SRC_PATH_BARE)/test/test.mk |
| 437 | LIBVPX_TEST_SRCS=$(addprefix test/,$(call enabled,LIBVPX_TEST_SRCS)) | 455 | |
| | 456 | # addprefix_clean behaves like addprefix if the target doesn't start with "../" |
| | 457 | # However, if the target starts with "../", instead of adding prefix, |
| | 458 | # it will remove "../". |
| | 459 | # Using addprefix_clean, we can avoid two different targets building the |
| | 460 | # same file, i.e. |
| | 461 | # test/../ivfenc.c.d: ivfenc.o |
| | 462 | # ivfenc.c.d: ivfenc.o |
| | 463 | # Note that the other way to solve this problem is using "realpath". |
| | 464 | # The "realpath" is supported by make 3.81 or later. |
| | 465 | addprefix_clean=$(patsubst $(1)../%,%,$(addprefix $(1), $(2))) |
| | 466 | LIBVPX_TEST_SRCS=$(call addprefix_clean,test/,$(call enabled,LIBVPX_TEST_SRCS)) |
| | 467 | |
| 438 | LIBVPX_TEST_BIN=./test_libvpx$(EXE_SFX) | 468 | LIBVPX_TEST_BIN=./test_libvpx$(EXE_SFX) |
| 439 | LIBVPX_TEST_DATA=$(addprefix $(LIBVPX_TEST_DATA_PATH)/,\ | 469 | LIBVPX_TEST_DATA=$(addprefix $(LIBVPX_TEST_DATA_PATH)/,\ |
| 440 | $(call enabled,LIBVPX_TEST_DATA)) | 470 | $(call enabled,LIBVPX_TEST_DATA)) |
| 441 | libvpx_test_data_url=https://storage.googleapis.com/downloads.webmproject.org/test_data/libvpx/$(1) | 471 | libvpx_test_data_url=https://storage.googleapis.com/downloads.webmproject.org/test_data/libvpx/$(1) |
| 442 | | 472 | |
| 443 | TEST_INTRA_PRED_SPEED_BIN=./test_intra_pred_speed$(EXE_SFX) | 473 | TEST_INTRA_PRED_SPEED_BIN=./test_intra_pred_speed$(EXE_SFX) |
| 444 | TEST_INTRA_PRED_SPEED_SRCS=$(addprefix test/,$(call enabled,TEST_INTRA_PRED_SPEED_SRCS)) | 474 | TEST_INTRA_PRED_SPEED_SRCS=$(call addprefix_clean,test/,\ |
| | 475 | $(call enabled,TEST_INTRA_PRED_SPEED_SRCS)) |
| 445 | TEST_INTRA_PRED_SPEED_OBJS := $(sort $(call objs,$(TEST_INTRA_PRED_SPEED_SRCS))) | 476 | TEST_INTRA_PRED_SPEED_OBJS := $(sort $(call objs,$(TEST_INTRA_PRED_SPEED_SRCS))) |
| 446 | | 477 | |
| 447 | RC_INTERFACE_TEST_BIN=./test_rc_interface$(EXE_SFX) | 478 | RC_INTERFACE_TEST_BIN=./test_rc_interface$(EXE_SFX) |
| 448 | RC_INTERFACE_TEST_SRCS=$(addprefix test/,$(call enabled,RC_INTERFACE_TEST_SRCS)) | 479 | RC_INTERFACE_TEST_SRCS=$(call addprefix_clean,test/,\ |
| | 480 | $(call enabled,RC_INTERFACE_TEST_SRCS)) |
| 449 | RC_INTERFACE_TEST_OBJS := $(sort $(call objs,$(RC_INTERFACE_TEST_SRCS))) | 481 | RC_INTERFACE_TEST_OBJS := $(sort $(call objs,$(RC_INTERFACE_TEST_SRCS))) |
| 450 | | 482 | |
| | 483 | SIMPLE_ENCODE_TEST_BIN=./test_simple_encode$(EXE_SFX) |
| | 484 | SIMPLE_ENCODE_TEST_SRCS=$(call addprefix_clean,test/,\ |
| | 485 | $(call enabled,SIMPLE_ENCODE_TEST_SRCS)) |
| | 486 | SIMPLE_ENCODE_TEST_OBJS := $(sort $(call objs,$(SIMPLE_ENCODE_TEST_SRCS))) |
| | 487 | |
| 451 | libvpx_test_srcs.txt: | 488 | libvpx_test_srcs.txt: |
| 452 | @echo " [CREATE] $@" | 489 | @echo " [CREATE] $@" |
| 453 | @echo $(LIBVPX_TEST_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@ | 490 | @echo $(LIBVPX_TEST_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@ |
| @@ -609,6 +646,18 @@ $(eval $(call linkerxx_template,$(RC_INTERFACE_TEST_BIN), \ · 155 unmodified lines |
| 609 | -L. -lvpx -lgtest -lvp9rc $(extralibs) -lm)) | 646 | -L. -lvpx -lgtest -lvp9rc $(extralibs) -lm)) |
| 610 | endif # RC_INTERFACE_TEST | 647 | endif # RC_INTERFACE_TEST |
| 611 | | 648 | |
| | 649 | ifneq ($(strip $(SIMPLE_ENCODE_TEST_OBJS)),) |
| | 650 | $(SIMPLE_ENCODE_TEST_OBJS) $(SIMPLE_ENCODE_TEST_OBJS:.o=.d): \ |
| | 651 | CXXFLAGS += $(GTEST_INCLUDES) |
| | 652 | OBJS-yes += $(SIMPLE_ENCODE_TEST_OBJS) |
| | 653 | BINS-yes += $(SIMPLE_ENCODE_TEST_BIN) |
| | 654 | |
| | 655 | $(SIMPLE_ENCODE_TEST_BIN): $(TEST_LIBS) libsimple_encode.a |
| | 656 | $(eval $(call linkerxx_template,$(SIMPLE_ENCODE_TEST_BIN), \ |
| | 657 | $(SIMPLE_ENCODE_TEST_OBJS) \ |
| | 658 | -L. -lsimple_encode -lvpx -lgtest $(extralibs) -lm)) |
| | 659 | endif # SIMPLE_ENCODE_TEST |
| | 660 | |
| 612 | endif # CONFIG_UNIT_TESTS | 661 | endif # CONFIG_UNIT_TESTS |
| 613 | | 662 | |
| 614 | # Install test sources only if codec source is included | 663 | # Install test sources only if codec source is included |