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 'use_system_libvpx%': 0, | 6 'use_system_libvpx%': 0, |
7 'libvpx_build_vp9%': 1, | 7 'libvpx_build_vp9%': 1, |
8 'libvpx_source%': 'source/libvpx', | 8 'libvpx_source%': 'source/libvpx', |
9 }, | 9 }, |
10 'target_defaults': { | 10 'target_defaults': { |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 'source/config/<(OS_CATEGORY)/<(target_arch_full)', | 329 'source/config/<(OS_CATEGORY)/<(target_arch_full)', |
330 'source/config', | 330 'source/config', |
331 '<(libvpx_source)', | 331 '<(libvpx_source)', |
332 ], | 332 ], |
333 'sources': [ | 333 'sources': [ |
334 '<(libvpx_source)/build/make/obj_int_extract.c', | 334 '<(libvpx_source)/build/make/obj_int_extract.c', |
335 ] | 335 ] |
336 }, | 336 }, |
337 { | 337 { |
338 # A library that contains assembly offsets needed. | 338 # A library that contains assembly offsets needed. |
339 'target_name': 'libvpx_asm_offsets', | 339 'target_name': 'libvpx_asm_offsets_vp8', |
340 'type': 'static_library', | 340 'type': 'static_library', |
341 'hard_dependency': 1, | 341 'hard_dependency': 1, |
342 'include_dirs': [ | 342 'include_dirs': [ |
343 'source/config/<(OS_CATEGORY)/<(target_arch_full)', | 343 'source/config/<(OS_CATEGORY)/<(target_arch_full)', |
344 'source/config', | 344 'source/config', |
345 '<(libvpx_source)', | 345 '<(libvpx_source)', |
346 ], | 346 ], |
347 'conditions': [ | 347 'conditions': [ |
348 ['asan==1', { | 348 ['asan==1', { |
349 'cflags!': [ '-fsanitize=address' ], | 349 'cflags!': [ '-fsanitize=address' ], |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 }, | 407 }, |
408 { | 408 { |
409 # A target that takes assembly offsets library and generate the | 409 # A target that takes assembly offsets library and generate the |
410 # corresponding assembly files. | 410 # corresponding assembly files. |
411 # This target is a hard dependency because the generated .asm files | 411 # This target is a hard dependency because the generated .asm files |
412 # are needed all assembly optimized files in libvpx. | 412 # are needed all assembly optimized files in libvpx. |
413 'target_name': 'gen_asm_offsets_vp8', | 413 'target_name': 'gen_asm_offsets_vp8', |
414 'type': 'none', | 414 'type': 'none', |
415 'hard_dependency': 1, | 415 'hard_dependency': 1, |
416 'dependencies': [ | 416 'dependencies': [ |
417 'libvpx_asm_offsets', | 417 'libvpx_asm_offsets_vp8', |
418 'libvpx_obj_int_extract#host', | 418 'libvpx_obj_int_extract#host', |
419 ], | 419 ], |
420 'conditions': [ | 420 'conditions': [ |
421 ['OS=="win"', { | 421 ['OS=="win"', { |
422 'variables': { | 422 'variables': { |
423 'ninja_obj_dir': '<(PRODUCT_DIR)/obj/third_party/libvpx/<(libvpx
_source)/vp8', | 423 'ninja_obj_dir': '<(PRODUCT_DIR)/obj/third_party/libvpx/<(libvpx
_source)/vp8', |
424 }, | 424 }, |
425 'actions': [ | 425 'actions': [ |
426 { | 426 { |
427 'action_name': 'copy_enc_offsets_obj', | 427 'action_name': 'copy_enc_offsets_obj', |
428 'inputs': [ 'copy_obj.sh' ], | 428 'inputs': [ 'copy_obj.sh' ], |
429 'outputs': [ '<(INTERMEDIATE_DIR)/asm_enc_offsets.obj' ], | 429 'outputs': [ '<(INTERMEDIATE_DIR)/vp8_asm_enc_offsets.obj' ], |
430 'action': [ | 430 'action': [ |
431 '<(DEPTH)/third_party/libvpx/copy_obj.sh', | 431 '<(DEPTH)/third_party/libvpx/copy_obj.sh', |
432 '-d', '<@(_outputs)', | 432 '-d', '<@(_outputs)', |
433 '-s', '<(PRODUCT_DIR)/obj/libvpx_asm_offsets/asm_enc_offsets
.obj', | 433 '-s', '<(PRODUCT_DIR)/obj/libvpx_asm_offsets_vp8/vp8_asm_enc
_offsets.obj', |
434 '-s', '<(ninja_obj_dir)/encoder/libvpx_asm_offsets.asm_enc_o
ffsets.obj', | 434 '-s', '<(ninja_obj_dir)/encoder/libvpx_asm_offsets_vp8.vp8_a
sm_enc_offsets.obj', |
435 '-s', '<(PRODUCT_DIR)/obj/Source/WebKit/chromium/third_party
/libvpx/<(libvpx_source)/vp8/encoder/libvpx_asm_offsets.asm_enc_offsets.obj', | 435 '-s', '<(PRODUCT_DIR)/obj/Source/WebKit/chromium/third_party
/libvpx/<(libvpx_source)/vp8/encoder/libvpx_asm_offsets_vp8.vp8_asm_enc_offsets.
obj', |
436 ], | 436 ], |
437 'process_output_as_sources': 1, | 437 'process_output_as_sources': 1, |
438 'msvs_cygwin_shell': 1, | 438 'msvs_cygwin_shell': 1, |
439 }, | 439 }, |
440 ], | 440 ], |
441 'sources': [ | 441 'sources': [ |
442 '<(INTERMEDIATE_DIR)/asm_enc_offsets.obj', | 442 '<(INTERMEDIATE_DIR)/vp8_asm_enc_offsets.obj', |
443 ], | 443 ], |
444 }, { | 444 }, { |
445 'actions': [ | 445 'actions': [ |
446 { | 446 { |
447 # Take archived .a file and unpack it unto .o files. | 447 # Take archived .a file and unpack it unto .o files. |
448 'action_name': 'unpack_lib_posix', | 448 'action_name': 'unpack_lib_posix', |
449 'inputs': [ | 449 'inputs': [ |
450 'unpack_lib_posix.sh', | 450 'unpack_lib_posix.sh', |
451 ], | 451 ], |
452 'outputs': [ | 452 'outputs': [ |
453 '<(INTERMEDIATE_DIR)/asm_enc_offsets.o', | 453 '<(INTERMEDIATE_DIR)/vp8_asm_enc_offsets.o', |
454 ], | 454 ], |
455 'action': [ | 455 'action': [ |
456 '<(DEPTH)/third_party/libvpx/unpack_lib_posix.sh', | 456 '<(DEPTH)/third_party/libvpx/unpack_lib_posix.sh', |
457 '-d', '<(INTERMEDIATE_DIR)', | 457 '-d', '<(INTERMEDIATE_DIR)', |
458 '-a', '<(PRODUCT_DIR)/libvpx_asm_offsets.a', | 458 '-a', '<(PRODUCT_DIR)/libvpx_asm_offsets_vp8.a', |
459 '-a', '<(LIB_DIR)/third_party/libvpx/libvpx_asm_offsets.a', | 459 '-a', '<(LIB_DIR)/third_party/libvpx/libvpx_asm_offsets_vp8.
a', |
460 '-a', '<(LIB_DIR)/Source/WebKit/chromium/third_party/libvpx/
libvpx_asm_offsets.a', | 460 '-a', '<(LIB_DIR)/Source/WebKit/chromium/third_party/libvpx/
libvpx_asm_offsets_vp8.a', |
461 '-f', 'asm_enc_offsets.o', | 461 '-f', 'vp8_asm_enc_offsets.o', |
462 ], | 462 ], |
463 'process_output_as_sources': 1, | 463 'process_output_as_sources': 1, |
464 'msvs_cygwin_shell': 1, | 464 'msvs_cygwin_shell': 1, |
465 }, | 465 }, |
466 ], | 466 ], |
467 # Need this otherwise gyp won't run the rule on them. | 467 # Need this otherwise gyp won't run the rule on them. |
468 'sources': [ | 468 'sources': [ |
469 '<(INTERMEDIATE_DIR)/asm_enc_offsets.o', | 469 '<(INTERMEDIATE_DIR)/vp8_asm_enc_offsets.o', |
470 ], | 470 ], |
471 }], | 471 }], |
472 ], | 472 ], |
473 'rules': [ | 473 'rules': [ |
474 { | 474 { |
475 # Rule to extract integer values for each symbol from an object fi
le. | 475 # Rule to extract integer values for each symbol from an object fi
le. |
476 'rule_name': 'obj_int_extract', | 476 'rule_name': 'obj_int_extract', |
477 'extension': '<(asm_obj_extension)', | 477 'extension': '<(asm_obj_extension)', |
478 'inputs': [ | 478 'inputs': [ |
479 '<(PRODUCT_DIR)/libvpx_obj_int_extract', | 479 '<(PRODUCT_DIR)/libvpx_obj_int_extract', |
480 'obj_int_extract.sh', | 480 'obj_int_extract.sh', |
481 ], | 481 ], |
482 'outputs': [ | 482 'outputs': [ |
483 '<(shared_generated_dir)/vp8_<(RULE_INPUT_ROOT).asm', | 483 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).asm', |
484 ], | 484 ], |
485 'variables': { | 485 'variables': { |
486 'conditions': [ | 486 'conditions': [ |
487 ['target_arch=="arm"', { | 487 ['target_arch=="arm"', { |
488 'asm_format': 'gas', | 488 'asm_format': 'gas', |
489 }, { | 489 }, { |
490 'asm_format': 'rvds', | 490 'asm_format': 'rvds', |
491 }], | 491 }], |
492 ], | 492 ], |
493 }, | 493 }, |
494 'action': [ | 494 'action': [ |
495 '<(DEPTH)/third_party/libvpx/obj_int_extract.sh', | 495 '<(DEPTH)/third_party/libvpx/obj_int_extract.sh', |
496 '-e', '<(PRODUCT_DIR)/libvpx_obj_int_extract', | 496 '-e', '<(PRODUCT_DIR)/libvpx_obj_int_extract', |
497 '-f', '<(asm_format)', | 497 '-f', '<(asm_format)', |
498 '-b', '<(RULE_INPUT_PATH)', | 498 '-b', '<(RULE_INPUT_PATH)', |
499 '-o', '<(shared_generated_dir)/vp8_<(RULE_INPUT_ROOT).asm', | 499 '-o', '<(shared_generated_dir)/<(RULE_INPUT_ROOT).asm', |
500 ], | 500 ], |
501 'message': 'Generate assembly offsets <(RULE_INPUT_PATH).', | 501 'message': 'Generate assembly offsets <(RULE_INPUT_PATH).', |
502 'msvs_cygwin_shell': 1, | 502 'msvs_cygwin_shell': 1, |
503 }, | 503 }, |
504 ], | 504 ], |
505 }, | 505 }, |
506 { | 506 { |
507 # A target that takes assembly offsets library and generate the | 507 # A target that takes assembly offsets library and generate the |
508 # corresponding assembly files. | 508 # corresponding assembly files. |
509 # This target is a hard dependency because the generated .asm files | 509 # This target is a hard dependency because the generated .asm files |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 ], | 808 ], |
809 'libraries': [ | 809 'libraries': [ |
810 '<!@(pkg-config --libs-only-l vpx)', | 810 '<!@(pkg-config --libs-only-l vpx)', |
811 ], | 811 ], |
812 }, | 812 }, |
813 }, | 813 }, |
814 ], | 814 ], |
815 }], | 815 }], |
816 ], | 816 ], |
817 } | 817 } |
OLD | NEW |