Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: source/libvpx/libs.mk

Issue 1217053002: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/libvpx/examples/vpx_temporal_svc_encoder.c ('k') | source/libvpx/rate_hist.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ## 1 ##
2 ## Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 ## Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 ## 3 ##
4 ## Use of this source code is governed by a BSD-style license 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 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 6 ## tree. An additional intellectual property rights grant can be found
7 ## in the file PATENTS. All contributing project authors may 7 ## in the file PATENTS. All contributing project authors may
8 ## be found in the AUTHORS file in the root of the source tree. 8 ## be found in the AUTHORS file in the root of the source tree.
9 ## 9 ##
10 10
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 366
367 include $(SRC_PATH_BARE)/test/test.mk 367 include $(SRC_PATH_BARE)/test/test.mk
368 LIBVPX_TEST_SRCS=$(addprefix test/,$(call enabled,LIBVPX_TEST_SRCS)) 368 LIBVPX_TEST_SRCS=$(addprefix test/,$(call enabled,LIBVPX_TEST_SRCS))
369 LIBVPX_TEST_BIN=./test_libvpx$(EXE_SFX) 369 LIBVPX_TEST_BIN=./test_libvpx$(EXE_SFX)
370 LIBVPX_TEST_DATA=$(addprefix $(LIBVPX_TEST_DATA_PATH)/,\ 370 LIBVPX_TEST_DATA=$(addprefix $(LIBVPX_TEST_DATA_PATH)/,\
371 $(call enabled,LIBVPX_TEST_DATA)) 371 $(call enabled,LIBVPX_TEST_DATA))
372 libvpx_test_data_url=http://downloads.webmproject.org/test_data/libvpx/$(1) 372 libvpx_test_data_url=http://downloads.webmproject.org/test_data/libvpx/$(1)
373 373
374 TEST_INTRA_PRED_SPEED_BIN=./test_intra_pred_speed$(EXE_SFX) 374 TEST_INTRA_PRED_SPEED_BIN=./test_intra_pred_speed$(EXE_SFX)
375 TEST_INTRA_PRED_SPEED_SRCS=$(addprefix test/,$(call enabled,TEST_INTRA_PRED_SPEE D_SRCS)) 375 TEST_INTRA_PRED_SPEED_SRCS=$(addprefix test/,$(call enabled,TEST_INTRA_PRED_SPEE D_SRCS))
376 TEST_INTRA_PRED_SPEED_OBJS := $(sort $(call objs,$(TEST_INTRA_PRED_SPEED_SRCS)))
376 377
377 libvpx_test_srcs.txt: 378 libvpx_test_srcs.txt:
378 @echo " [CREATE] $@" 379 @echo " [CREATE] $@"
379 @echo $(LIBVPX_TEST_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@ 380 @echo $(LIBVPX_TEST_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@
380 CLEAN-OBJS += libvpx_test_srcs.txt 381 CLEAN-OBJS += libvpx_test_srcs.txt
381 382
382 $(LIBVPX_TEST_DATA): $(SRC_PATH_BARE)/test/test-data.sha1 383 $(LIBVPX_TEST_DATA): $(SRC_PATH_BARE)/test/test-data.sha1
383 @echo " [DOWNLOAD] $@" 384 @echo " [DOWNLOAD] $@"
384 $(qexec)trap 'rm -f $@' INT TERM &&\ 385 $(qexec)trap 'rm -f $@' INT TERM &&\
385 curl -L -o $@ $(call libvpx_test_data_url,$(@F)) 386 curl -L -o $@ $(call libvpx_test_data_url,$(@F))
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 BINS-yes += $(LIBVPX_TEST_BIN) 480 BINS-yes += $(LIBVPX_TEST_BIN)
480 481
481 CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx) 482 CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx)
482 CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a) 483 CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a)
483 TEST_LIBS := lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a 484 TEST_LIBS := lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a
484 $(LIBVPX_TEST_BIN): $(TEST_LIBS) 485 $(LIBVPX_TEST_BIN): $(TEST_LIBS)
485 $(eval $(call linkerxx_template,$(LIBVPX_TEST_BIN), \ 486 $(eval $(call linkerxx_template,$(LIBVPX_TEST_BIN), \
486 $(LIBVPX_TEST_OBJS) \ 487 $(LIBVPX_TEST_OBJS) \
487 -L. -lvpx -lgtest $(extralibs) -lm)) 488 -L. -lvpx -lgtest $(extralibs) -lm))
488 489
489 TEST_INTRA_PRED_SPEED_OBJS := $(sort $(call objs,$(TEST_INTRA_PRED_SPEED_SRCS)))
490 ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),) 490 ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),)
491 $(TEST_INTRA_PRED_SPEED_OBJS) $(TEST_INTRA_PRED_SPEED_OBJS:.o=.d): CXXFLAGS += $ (GTEST_INCLUDES) 491 $(TEST_INTRA_PRED_SPEED_OBJS) $(TEST_INTRA_PRED_SPEED_OBJS:.o=.d): CXXFLAGS += $ (GTEST_INCLUDES)
492 OBJS-yes += $(TEST_INTRA_PRED_SPEED_OBJS) 492 OBJS-yes += $(TEST_INTRA_PRED_SPEED_OBJS)
493 BINS-yes += $(TEST_INTRA_PRED_SPEED_BIN) 493 BINS-yes += $(TEST_INTRA_PRED_SPEED_BIN)
494 494
495 $(TEST_INTRA_PRED_SPEED_BIN): $(TEST_LIBS) 495 $(TEST_INTRA_PRED_SPEED_BIN): $(TEST_LIBS)
496 $(eval $(call linkerxx_template,$(TEST_INTRA_PRED_SPEED_BIN), \ 496 $(eval $(call linkerxx_template,$(TEST_INTRA_PRED_SPEED_BIN), \
497 $(TEST_INTRA_PRED_SPEED_OBJS) \ 497 $(TEST_INTRA_PRED_SPEED_OBJS) \
498 -L. -lvpx -lgtest $(extralibs) -lm)) 498 -L. -lvpx -lgtest $(extralibs) -lm))
499 endif # TEST_INTRA_PRED_SPEED 499 endif # TEST_INTRA_PRED_SPEED
500 500
501 endif # CONFIG_UNIT_TESTS 501 endif # CONFIG_UNIT_TESTS
502 502
503 # Install test sources only if codec source is included 503 # Install test sources only if codec source is included
504 INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(patsubst $(SRC_PATH_BARE)/%,%,\ 504 INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(patsubst $(SRC_PATH_BARE)/%,%,\
505 $(shell find $(SRC_PATH_BARE)/third_party/googletest -type f)) 505 $(shell find $(SRC_PATH_BARE)/third_party/googletest -type f))
506 INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(LIBVPX_TEST_SRCS) 506 INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(LIBVPX_TEST_SRCS)
507 INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(TEST_INTRA_PRED_SPEED_SRCS) 507 INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(TEST_INTRA_PRED_SPEED_SRCS)
508 508
509 define test_shard_template 509 define test_shard_template
510 test:: test_shard.$(1) 510 test:: test_shard.$(1)
511 test_shard.$(1): $(LIBVPX_TEST_BIN) testdata 511 test-no-data-check:: test_shard_ndc.$(1)
512 test_shard.$(1) test_shard_ndc.$(1): $(LIBVPX_TEST_BIN)
512 @set -e; \ 513 @set -e; \
513 export GTEST_SHARD_INDEX=$(1); \ 514 export GTEST_SHARD_INDEX=$(1); \
514 export GTEST_TOTAL_SHARDS=$(2); \ 515 export GTEST_TOTAL_SHARDS=$(2); \
515 $(LIBVPX_TEST_BIN) 516 $(LIBVPX_TEST_BIN)
517 test_shard.$(1): testdata
516 .PHONY: test_shard.$(1) 518 .PHONY: test_shard.$(1)
517 endef 519 endef
518 520
519 NUM_SHARDS := 10 521 NUM_SHARDS := 10
520 SHARDS := 0 1 2 3 4 5 6 7 8 9 522 SHARDS := 0 1 2 3 4 5 6 7 8 9
521 $(foreach s,$(SHARDS),$(eval $(call test_shard_template,$(s),$(NUM_SHARDS)))) 523 $(foreach s,$(SHARDS),$(eval $(call test_shard_template,$(s),$(NUM_SHARDS))))
522 524
523 endif 525 endif
524 526
525 ## 527 ##
(...skipping 24 matching lines...) Expand all
550 ifeq ($(CONFIG_UNIT_TESTS),yes) 552 ifeq ($(CONFIG_UNIT_TESTS),yes)
551 TEST_BIN_PATH = . 553 TEST_BIN_PATH = .
552 ifeq ($(CONFIG_MSVS),yes) 554 ifeq ($(CONFIG_MSVS),yes)
553 # MSVC will build both Debug and Release configurations of tools in a 555 # MSVC will build both Debug and Release configurations of tools in a
554 # sub directory named for the current target. Assume the user wants to 556 # sub directory named for the current target. Assume the user wants to
555 # run the Release tools, and assign TEST_BIN_PATH accordingly. 557 # run the Release tools, and assign TEST_BIN_PATH accordingly.
556 # TODO(tomfinegan): Is this adequate for ARM? 558 # TODO(tomfinegan): Is this adequate for ARM?
557 # TODO(tomfinegan): Support running the debug versions of tools? 559 # TODO(tomfinegan): Support running the debug versions of tools?
558 TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH)) 560 TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH))
559 endif 561 endif
560 utiltest: testdata 562 utiltest utiltest-no-data-check:
561 $(qexec)$(SRC_PATH_BARE)/test/vpxdec.sh \ 563 $(qexec)$(SRC_PATH_BARE)/test/vpxdec.sh \
562 --test-data-path $(LIBVPX_TEST_DATA_PATH) \ 564 --test-data-path $(LIBVPX_TEST_DATA_PATH) \
563 --bin-path $(TEST_BIN_PATH) 565 --bin-path $(TEST_BIN_PATH)
564 $(qexec)$(SRC_PATH_BARE)/test/vpxenc.sh \ 566 $(qexec)$(SRC_PATH_BARE)/test/vpxenc.sh \
565 --test-data-path $(LIBVPX_TEST_DATA_PATH) \ 567 --test-data-path $(LIBVPX_TEST_DATA_PATH) \
566 --bin-path $(TEST_BIN_PATH) 568 --bin-path $(TEST_BIN_PATH)
569 utiltest: testdata
567 else 570 else
568 utiltest: 571 utiltest utiltest-no-data-check:
569 @echo Unit tests must be enabled to make the utiltest target. 572 @echo Unit tests must be enabled to make the utiltest target.
570 endif 573 endif
571 574
572 ## 575 ##
573 ## Example tests. 576 ## Example tests.
574 ## 577 ##
575 ifeq ($(CONFIG_UNIT_TESTS),yes) 578 ifeq ($(CONFIG_UNIT_TESTS),yes)
576 # All non-MSVC targets output example targets in a sub dir named examples. 579 # All non-MSVC targets output example targets in a sub dir named examples.
577 EXAMPLES_BIN_PATH = examples 580 EXAMPLES_BIN_PATH = examples
578 ifeq ($(CONFIG_MSVS),yes) 581 ifeq ($(CONFIG_MSVS),yes)
579 # MSVC will build both Debug and Release configurations of the examples in a 582 # MSVC will build both Debug and Release configurations of the examples in a
580 # sub directory named for the current target. Assume the user wants to 583 # sub directory named for the current target. Assume the user wants to
581 # run the Release tools, and assign EXAMPLES_BIN_PATH accordingly. 584 # run the Release tools, and assign EXAMPLES_BIN_PATH accordingly.
582 # TODO(tomfinegan): Is this adequate for ARM? 585 # TODO(tomfinegan): Is this adequate for ARM?
583 # TODO(tomfinegan): Support running the debug versions of tools? 586 # TODO(tomfinegan): Support running the debug versions of tools?
584 EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release 587 EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release
585 endif 588 endif
586 exampletest: examples testdata 589 exampletest exampletest-no-data-check: examples
587 $(qexec)$(SRC_PATH_BARE)/test/examples.sh \ 590 $(qexec)$(SRC_PATH_BARE)/test/examples.sh \
588 --test-data-path $(LIBVPX_TEST_DATA_PATH) \ 591 --test-data-path $(LIBVPX_TEST_DATA_PATH) \
589 --bin-path $(EXAMPLES_BIN_PATH) 592 --bin-path $(EXAMPLES_BIN_PATH)
593 exampletest: testdata
590 else 594 else
591 exampletest: 595 exampletest exampletest-no-data-check:
592 @echo Unit tests must be enabled to make the exampletest target. 596 @echo Unit tests must be enabled to make the exampletest target.
593 endif 597 endif
OLDNEW
« no previous file with comments | « source/libvpx/examples/vpx_temporal_svc_encoder.c ('k') | source/libvpx/rate_hist.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698