| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 { | 4 { |
| 5 'variables': { | 5 'variables': { |
| 6 'libvpx_build_vp9%': 1, | 6 'libvpx_build_vp9%': 1, |
| 7 'libvpx_source%': 'source/libvpx', | 7 'libvpx_source%': 'source/libvpx', |
| 8 'conditions': [ | 8 'conditions': [ |
| 9 ['os_posix==1', { | 9 ['os_posix==1', { |
| 10 'asm_obj_extension': 'o', | 10 'asm_obj_extension': 'o', |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 'variables': { | 81 'variables': { |
| 82 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/third_party/libvpx', | 82 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/third_party/libvpx', |
| 83 'OS_CATEGORY%': '<(OS_CATEGORY)', | 83 'OS_CATEGORY%': '<(OS_CATEGORY)', |
| 84 'yasm_flags': [ | 84 'yasm_flags': [ |
| 85 '-D', 'CHROMIUM', | 85 '-D', 'CHROMIUM', |
| 86 '-I', 'source/config/<(OS_CATEGORY)/<(target_arch_full)', | 86 '-I', 'source/config/<(OS_CATEGORY)/<(target_arch_full)', |
| 87 '-I', 'source/config', | 87 '-I', 'source/config', |
| 88 '-I', '<(libvpx_source)', | 88 '-I', '<(libvpx_source)', |
| 89 '-I', '<(shared_generated_dir)', # Generated assembly offsets | 89 '-I', '<(shared_generated_dir)', # Generated assembly offsets |
| 90 ], | 90 ], |
| 91 'yasm_includes': [ |
| 92 '<(shared_generated_dir)/vp8_asm_enc_offsets.asm' |
| 93 ], |
| 91 }, | 94 }, |
| 92 'dependencies': [ | 95 'dependencies': [ |
| 93 'gen_asm_offsets_vp8', | 96 'gen_asm_offsets_vp8', |
| 94 ], | 97 ], |
| 95 'includes': [ | 98 'includes': [ |
| 96 '../yasm/yasm_compile.gypi' | 99 '../yasm/yasm_compile.gypi' |
| 97 ], | 100 ], |
| 98 'include_dirs': [ | 101 'include_dirs': [ |
| 99 'source/config/<(OS_CATEGORY)/<(target_arch_full)', | 102 'source/config/<(OS_CATEGORY)/<(target_arch_full)', |
| 100 'source/config', | 103 'source/config', |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 }], | 247 }], |
| 245 | 248 |
| 246 # Rule to convert .asm files to .S files. | 249 # Rule to convert .asm files to .S files. |
| 247 'rules': [ | 250 'rules': [ |
| 248 { | 251 { |
| 249 'rule_name': 'convert_asm', | 252 'rule_name': 'convert_asm', |
| 250 'extension': 'asm', | 253 'extension': 'asm', |
| 251 'inputs': [ | 254 'inputs': [ |
| 252 '<(shared_generated_dir)/<(ads2gas_script)', | 255 '<(shared_generated_dir)/<(ads2gas_script)', |
| 253 '<(shared_generated_dir)/thumb.pm', | 256 '<(shared_generated_dir)/thumb.pm', |
| 257 '<(shared_generated_dir)/vp8_asm_enc_offsets.asm', |
| 254 ], | 258 ], |
| 255 'outputs': [ | 259 'outputs': [ |
| 256 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).S', | 260 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).S', |
| 257 ], | 261 ], |
| 258 'action': [ | 262 'action': [ |
| 259 'bash', | 263 'bash', |
| 260 '-c', | 264 '-c', |
| 261 'cat <(RULE_INPUT_PATH) | perl <(shared_generated_dir)/<(ads2gas
_script) -chromium > <(shared_generated_dir)/<(RULE_INPUT_ROOT).S', | 265 'cat <(RULE_INPUT_PATH) | perl <(shared_generated_dir)/<(ads2gas
_script) -chromium > <(shared_generated_dir)/<(RULE_INPUT_ROOT).S', |
| 262 ], | 266 ], |
| 263 'process_outputs_as_sources': 1, | 267 'process_outputs_as_sources': 1, |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 # This target is a hard dependency because the generated .asm files | 453 # This target is a hard dependency because the generated .asm files |
| 450 # are needed all assembly optimized files in libvpx. | 454 # are needed all assembly optimized files in libvpx. |
| 451 'target_name': 'gen_asm_offsets_vp8', | 455 'target_name': 'gen_asm_offsets_vp8', |
| 452 'type': 'none', | 456 'type': 'none', |
| 453 'hard_dependency': 1, | 457 'hard_dependency': 1, |
| 454 'dependencies': [ | 458 'dependencies': [ |
| 455 'libvpx_asm_offsets_vp8', | 459 'libvpx_asm_offsets_vp8', |
| 456 'libvpx_obj_int_extract#host', | 460 'libvpx_obj_int_extract#host', |
| 457 ], | 461 ], |
| 458 'variables' : { | 462 'variables' : { |
| 459 'lib_intermediate_name' : '', | 463 'unpack_lib' : '', |
| 460 'output_format':'', | 464 'output_format':'', |
| 461 'output_dir': '<(shared_generated_dir)', | 465 'output_dir': '<(shared_generated_dir)', |
| 462 'conditions' : [ | 466 'conditions' : [ |
| 463 ['android_webview_build==1', { | 467 ['android_webview_build==1', { |
| 464 # pass the empty string for 3rd and 4th arguments of | 468 # pass the empty string for 3rd and 4th arguments of |
| 465 # intermediates-dir-for macro. | 469 # intermediates-dir-for macro. |
| 466 'lib_intermediate_name' : '$(abspath $(call intermediates-dir-for,ST
ATIC_LIBRARIES,libvpx_asm_offsets_vp8,,,$(gyp_var_prefix)))/libvpx_asm_offsets_v
p8.a', | 470 'unpack_lib' : '$(abspath $(call intermediates-dir-for,STATIC_LIBRAR
IES,libvpx_asm_offsets_vp8,,,$(gyp_var_prefix)))/libvpx_asm_offsets_vp8.a', |
| 467 }], | 471 }, { |
| 472 'unpack_lib' : '<(LIB_DIR)/third_party/libvpx/libvpx_asm_offsets_vp8
.a', |
| 473 },], |
| 468 ['(target_arch=="arm" or target_arch=="armv7")', { | 474 ['(target_arch=="arm" or target_arch=="armv7")', { |
| 469 'output_format': 'gas', | 475 'output_format': 'gas', |
| 470 }, { | 476 }, { |
| 471 'output_format': 'rvds', | 477 'output_format': 'rvds', |
| 472 }], | 478 }], |
| 473 ], | 479 ], |
| 474 }, | 480 }, |
| 475 'conditions': [ | 481 'conditions': [ |
| 476 ['OS=="win"', { | 482 ['OS=="win"', { |
| 477 'variables': { | 483 'variables': { |
| 478 'ninja_obj_dir': '<(PRODUCT_DIR)/obj/third_party/libvpx/<(libvpx_sou
rce)/vp8', | 484 'ninja_obj_dir': '<(PRODUCT_DIR)/obj/third_party/libvpx/<(libvpx_sou
rce)/vp8', |
| 479 }, | 485 }, |
| 480 'actions': [ | 486 'actions': [ |
| 481 { | 487 { |
| 482 'action_name': 'copy_enc_offsets_obj', | 488 'action_name': 'copy_enc_offsets_obj', |
| 483 'inputs': [ 'copy_obj.py' ], | 489 'inputs': [ '<(ninja_obj_dir)/encoder/libvpx_asm_offsets_vp8.vp8_a
sm_enc_offsets.obj' ], |
| 484 'outputs': [ '<(INTERMEDIATE_DIR)/vp8_asm_enc_offsets.obj' ], | 490 'outputs': [ '<(INTERMEDIATE_DIR)/vp8_asm_enc_offsets.obj' ], |
| 485 'action': [ | 491 'action': [ |
| 486 'python', | 492 'python', |
| 487 '<(DEPTH)/third_party/libvpx/copy_obj.py', | 493 '<(DEPTH)/third_party/libvpx/copy_obj.py', |
| 488 '-d', '<@(_outputs)', | 494 '-d', '<@(_outputs)', |
| 489 '-s', '<(PRODUCT_DIR)/obj/libvpx_asm_offsets_vp8/vp8_asm_enc_off
sets.obj', | |
| 490 '-s', '<(ninja_obj_dir)/encoder/libvpx_asm_offsets_vp8.vp8_asm_e
nc_offsets.obj', | 495 '-s', '<(ninja_obj_dir)/encoder/libvpx_asm_offsets_vp8.vp8_asm_e
nc_offsets.obj', |
| 491 '-s', '<(PRODUCT_DIR)/obj/Source/WebKit/chromium/third_party/lib
vpx/<(libvpx_source)/vp8/encoder/libvpx_asm_offsets_vp8.vp8_asm_enc_offsets.obj'
, | |
| 492 ], | 496 ], |
| 493 'process_output_as_sources': 1, | 497 'process_output_as_sources': 1, |
| 494 }, | 498 }, |
| 495 ], | 499 ], |
| 496 'sources': [ | 500 'sources': [ |
| 497 '<(INTERMEDIATE_DIR)/vp8_asm_enc_offsets.obj', | 501 '<(INTERMEDIATE_DIR)/vp8_asm_enc_offsets.obj', |
| 498 ], | 502 ], |
| 499 }, { | 503 }, { |
| 500 'variables': { | 504 'variables': { |
| 501 'unpack_lib_search_path_list': [ | 505 'unpack_lib_search_path_list': [ |
| 502 '-a', '<(PRODUCT_DIR)/libvpx_asm_offsets_vp8.a', | 506 '-a', '<(unpack_lib)', |
| 503 '-a', '<(LIB_DIR)/third_party/libvpx/libvpx_asm_offsets_vp8.a', | |
| 504 '-a', '<(LIB_DIR)/Source/WebKit/chromium/third_party/libvpx/libvpx
_asm_offsets_vp8.a', | |
| 505 '-a', '<(lib_intermediate_name)', | |
| 506 ], | 507 ], |
| 507 'unpack_lib_output_dir':'<(INTERMEDIATE_DIR)', | 508 'object_file_output_dir':'<(INTERMEDIATE_DIR)', |
| 508 'unpack_lib_name':'vp8_asm_enc_offsets.o' | 509 'object_file_to_extract':'vp8_asm_enc_offsets.o' |
| 509 }, | 510 }, |
| 510 'includes': ['unpack_lib_posix.gypi'], | 511 'includes': ['unpack_lib_posix.gypi'], |
| 511 # Need this otherwise gyp won't run the rule on them. | 512 # Need this otherwise gyp won't run the rule on them. |
| 512 'sources': [ | 513 'sources': [ |
| 513 '<(INTERMEDIATE_DIR)/vp8_asm_enc_offsets.o', | 514 '<(INTERMEDIATE_DIR)/vp8_asm_enc_offsets.o', |
| 514 ], | 515 ], |
| 515 }], | 516 }], |
| 516 ], | 517 ], |
| 517 'includes': ['obj_int_extract.gypi'], | 518 'includes': ['obj_int_extract.gypi'], |
| 518 }, | 519 }, |
| 519 { | 520 { |
| 520 # A target that takes assembly offsets library and generate the | 521 # A target that takes assembly offsets library and generate the |
| 521 # corresponding assembly files. | 522 # corresponding assembly files. |
| 522 # This target is a hard dependency because the generated .asm files | 523 # This target is a hard dependency because the generated .asm files |
| 523 # are needed all assembly optimized files in libvpx. | 524 # are needed all assembly optimized files in libvpx. |
| 524 'target_name': 'gen_asm_offsets_vpx_scale', | 525 'target_name': 'gen_asm_offsets_vpx_scale', |
| 525 'type': 'none', | 526 'type': 'none', |
| 526 'hard_dependency': 1, | 527 'hard_dependency': 1, |
| 527 'dependencies': [ | 528 'dependencies': [ |
| 528 'libvpx_asm_offsets_vpx_scale', | 529 'libvpx_asm_offsets_vpx_scale', |
| 529 'libvpx_obj_int_extract#host', | 530 'libvpx_obj_int_extract#host', |
| 530 ], | 531 ], |
| 531 'variables' : { | 532 'variables' : { |
| 532 'lib_intermediate_name' : '', | 533 'unpack_lib' : '', |
| 533 'output_format':'', | 534 'output_format':'', |
| 534 'output_dir': '<(shared_generated_dir)', | 535 'output_dir': '<(shared_generated_dir)', |
| 535 'conditions' : [ | 536 'conditions' : [ |
| 536 ['android_webview_build==1', { | 537 ['android_webview_build==1', { |
| 537 # pass the empty string for 3rd and 4th arguments of | 538 # pass the empty string for 3rd and 4th arguments of |
| 538 # intermediates-dir-for macro. | 539 # intermediates-dir-for macro. |
| 539 'lib_intermediate_name' : '$(abspath $(call intermediates-dir-for,ST
ATIC_LIBRARIES,libvpx_asm_offsets_vpx_scale,,,$(gyp_var_prefix)))/libvpx_asm_off
sets_vpx_scale.a', | 540 'unpack_lib' : '$(abspath $(call intermediates-dir-for,STATIC_LIBRAR
IES,libvpx_asm_offsets_vpx_scale,,,$(gyp_var_prefix)))/libvpx_asm_offsets_vpx_sc
ale.a', |
| 540 }], | 541 }, { |
| 542 'unpack_lib' : '<(LIB_DIR)/third_party/libvpx/libvpx_asm_offsets_vpx
_scale.a', |
| 543 },], |
| 541 ['(target_arch=="arm" or target_arch=="armv7")', { | 544 ['(target_arch=="arm" or target_arch=="armv7")', { |
| 542 'output_format': 'gas', | 545 'output_format': 'gas', |
| 543 }, { | 546 }, { |
| 544 'output_format': 'rvds', | 547 'output_format': 'rvds', |
| 545 }], | 548 }], |
| 546 ], | 549 ], |
| 547 }, | 550 }, |
| 548 'conditions': [ | 551 'conditions': [ |
| 549 ['OS=="win"', { | 552 ['OS=="win"', { |
| 550 'variables': { | 553 'variables': { |
| 551 'ninja_obj_dir': '<(PRODUCT_DIR)/obj/third_party/libvpx/<(libvpx_sou
rce)/vpx_scale', | 554 'ninja_obj_dir': '<(PRODUCT_DIR)/obj/third_party/libvpx/<(libvpx_sou
rce)/vpx_scale', |
| 552 }, | 555 }, |
| 553 'actions': [ | 556 'actions': [ |
| 554 { | 557 { |
| 555 'action_name': 'copy_enc_offsets_obj', | 558 'action_name': 'copy_enc_offsets_obj', |
| 556 'inputs': [ 'copy_obj.py' ], | 559 'inputs': [ '<(ninja_obj_dir)/encoder/libvpx_asm_offsets_vpx_scale
.vpx_scale_asm_offsets.obj' ], |
| 557 'outputs': [ '<(INTERMEDIATE_DIR)/vpx_scale_asm_offsets.obj' ], | 560 'outputs': [ '<(INTERMEDIATE_DIR)/vpx_scale_asm_offsets.obj' ], |
| 558 'action': [ | 561 'action': [ |
| 559 'python', | 562 'python', |
| 560 '<(DEPTH)/third_party/libvpx/copy_obj.py', | 563 '<(DEPTH)/third_party/libvpx/copy_obj.py', |
| 561 '-d', '<@(_outputs)', | 564 '-d', '<@(_outputs)', |
| 562 '-s', '<(PRODUCT_DIR)/obj/libvpx_asm_offsets_vpx_scale/vpx_scale
_asm_offsets.obj', | |
| 563 '-s', '<(ninja_obj_dir)/encoder/libvpx_asm_offsets_vpx_scale.vpx
_scale_asm_offsets.obj', | 565 '-s', '<(ninja_obj_dir)/encoder/libvpx_asm_offsets_vpx_scale.vpx
_scale_asm_offsets.obj', |
| 564 '-s', '<(PRODUCT_DIR)/obj/Source/WebKit/chromium/third_party/lib
vpx/<(libvpx_source)/vpx_scale/libvpx_asm_offsets_vpx_scale.vpx_scale_asm_offset
s.obj', | |
| 565 ], | 566 ], |
| 566 'process_output_as_sources': 1, | 567 'process_output_as_sources': 1, |
| 567 }, | 568 }, |
| 568 ], | 569 ], |
| 569 'sources': [ | 570 'sources': [ |
| 570 '<(INTERMEDIATE_DIR)/vpx_scale_asm_offsets.obj', | 571 '<(INTERMEDIATE_DIR)/vpx_scale_asm_offsets.obj', |
| 571 ], | 572 ], |
| 572 }, { | 573 }, { |
| 573 'variables': { | 574 'variables': { |
| 574 'unpack_lib_search_path_list': [ | 575 'unpack_lib_search_path_list': [ |
| 575 '-a', '<(PRODUCT_DIR)/libvpx_asm_offsets_vpx_scale.a', | 576 '-a', '<(unpack_lib)', |
| 576 '-a', '<(LIB_DIR)/third_party/libvpx/libvpx_asm_offsets_vpx_scale.
a', | |
| 577 '-a', '<(LIB_DIR)/Source/WebKit/chromium/third_party/libvpx/libvpx
_asm_offsets_vpx_scale.a', | |
| 578 '-a', '<(lib_intermediate_name)', | |
| 579 ], | 577 ], |
| 580 'unpack_lib_output_dir':'<(INTERMEDIATE_DIR)', | 578 'object_file_output_dir':'<(INTERMEDIATE_DIR)', |
| 581 'unpack_lib_name':'vpx_scale_asm_offsets.o' | 579 'object_file_to_extract':'vpx_scale_asm_offsets.o' |
| 582 }, | 580 }, |
| 583 'includes': ['unpack_lib_posix.gypi'], | 581 'includes': ['unpack_lib_posix.gypi'], |
| 584 # Need this otherwise gyp won't run the rule on them. | 582 # Need this otherwise gyp won't run the rule on them. |
| 585 'sources': [ | 583 'sources': [ |
| 586 '<(INTERMEDIATE_DIR)/vpx_scale_asm_offsets.o', | 584 '<(INTERMEDIATE_DIR)/vpx_scale_asm_offsets.o', |
| 587 ], | 585 ], |
| 588 }], | 586 }], |
| 589 ], | 587 ], |
| 590 'includes': ['obj_int_extract.gypi'], | 588 'includes': ['obj_int_extract.gypi'], |
| 591 }, | 589 }, |
| 592 ], | 590 ], |
| 593 } | 591 } |
| OLD | NEW |