# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'libvpx_src_dir%': 'source/libvpx', 'conditions': [ ['os_posix==1', { 'asm_obj_extension': 'o', }], ['OS=="win"', { 'asm_obj_extension': 'obj', }], ['target_arch=="arm" and arm_neon==1', { 'target_arch_full': 'arm-neon', }, { 'target_arch_full': '<(target_arch)', }], # Conversion to libvpx arch names. ['target_arch=="arm" and arm_neon==1', { 'libvpx_arch': 'armv7', }], ['target_arch=="arm" and arm_neon==0', { 'libvpx_arch': 'armv6', }], ['target_arch=="ia32"', { 'libvpx_arch': 'x86', }], ['target_arch=="x64"', { 'libvpx_arch': 'x86_64', }], ['os_posix == 1 and OS != "mac" and OS != "android"', { 'OS_CATEGORY%': 'linux', }, { 'OS_CATEGORY%': '<(OS)', }], ], # Location of the intermediate output. 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libvpx', }, 'conditions': [ ['OS == "android"', { 'targets': [ { 'target_name': 'libvpx_arm_neon', 'type': 'static_library', 'dependencies': [ 'gen_asm_offsets', ], 'includes': [ 'libvpx_asm_conversion.gypi', 'libvpx_src_neon.gypi', ], 'cflags': [ # We need to explicitly tell the GCC assembler to look for # .include directive files from the place where they're # generated to. '-Wa,-I,' ' <(shared_generated_dir)/<(RULE_INPUT_ROOT).S', ], 'process_outputs_as_sources': 1, 'message': 'Convert libvpx asm file for ARM <(RULE_INPUT_PATH).', }, ], 'variables': { # Location of the assembly conversion script. 'ads2gas_script': 'ads2gas.pl', 'ads2gas_script_path': '<(libvpx_src_dir)/build/make/<(ads2gas_script)', }, 'cflags': [ # We need to explicitly tell the GCC assembler to look for # .include directive files from the place where they're # generated to. '-Wa,-I, <(shared_generated_dir)/<(RULE_INPUT_ROOT).c', ], 'process_outputs_as_sources': 1, 'message': 'Generate libvpx example code <(RULE_INPUT_PATH).', }, ], 'sources': [ '<(libvpx_src_dir)/examples/simple_encoder.txt', ] }, { 'target_name': 'simple_decoder', 'type': 'executable', 'dependencies': [ 'libvpx', ], # Copy the script to the output folder so that we can use it with # absolute path. 'copies': [{ 'destination': '<(shared_generated_dir)/simple_decoder', 'files': [ '<(libvpx_src_dir)/examples/gen_example_code.sh', ], }], # Rule to convert .txt files to .c files. 'rules': [ { 'rule_name': 'generate_example', 'extension': 'txt', 'inputs': [ '<(shared_generated_dir)/simple_decoder/gen_example_code.sh', ], 'outputs': [ '<(shared_generated_dir)/<(RULE_INPUT_ROOT).c', ], 'action': [ 'bash', '-c', '<(shared_generated_dir)/simple_decoder/gen_example_code.sh <(RULE_INPUT_PATH) > <(shared_generated_dir)/<(RULE_INPUT_ROOT).c', ], 'process_outputs_as_sources': 1, 'message': 'Generate libvpx example code <(RULE_INPUT_PATH).', }, ], 'sources': [ '<(libvpx_src_dir)/examples/simple_decoder.txt', ] }, ], } # Local Variables: # tab-width:2 # indent-tabs-mode:nil # End: # vim: set expandtab tabstop=2 shiftwidth=2: