2011-11-24 13:49:22 +01:00
|
|
|
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
2011-07-09 23:16:30 +02:00
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
2011-11-24 13:49:22 +01:00
|
|
|
|
|
|
|
# This file is based upon the libvpx.gyp file in the Chromium source code,
|
|
|
|
# but with the following targets removed: simple_encoder, simple_decoder,
|
|
|
|
# libvpx_include, libvpx_lib.
|
|
|
|
# http://src.chromium.org/svn/trunk/deps/third_party/libvpx/libvpx.gyp
|
2011-07-09 23:16:30 +02:00
|
|
|
{
|
2011-11-24 13:49:22 +01:00
|
|
|
'variables': {
|
|
|
|
'conditions': [
|
|
|
|
['os_posix==1', {
|
|
|
|
'asm_obj_extension': 'o',
|
|
|
|
}],
|
|
|
|
['OS=="win"', {
|
|
|
|
'asm_obj_extension': 'obj',
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'conditions': [
|
|
|
|
[ '(OS=="linux" or OS=="mac" or OS=="win") and target_arch!="arm"', {
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
# This libvpx target contains both encoder and decoder.
|
|
|
|
# Encoder is configured to be realtime only.
|
|
|
|
'target_name': 'libvpx',
|
|
|
|
'type': 'static_library',
|
2011-08-18 10:27:26 +02:00
|
|
|
'variables': {
|
2011-11-24 13:49:22 +01:00
|
|
|
'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/third_party/libvpx',
|
|
|
|
'yasm_flags': [
|
|
|
|
'-I', 'source/config/<(OS)/<(target_arch)',
|
|
|
|
'-I', 'source/libvpx',
|
2011-07-09 23:16:30 +02:00
|
|
|
],
|
|
|
|
},
|
2011-08-18 10:27:26 +02:00
|
|
|
'includes': [
|
2011-11-24 13:49:22 +01:00
|
|
|
'../yasm/yasm_compile.gypi'
|
2011-08-18 10:27:26 +02:00
|
|
|
],
|
2011-11-24 13:49:22 +01:00
|
|
|
'include_dirs': [
|
|
|
|
'source/config/<(OS)/<(target_arch)',
|
|
|
|
'source/libvpx',
|
|
|
|
'source/libvpx/vp8/common',
|
|
|
|
'source/libvpx/vp8/decoder',
|
|
|
|
'source/libvpx/vp8/encoder',
|
|
|
|
],
|
|
|
|
'direct_dependent_settings': {
|
|
|
|
'include_dirs': [
|
|
|
|
'source/libvpx',
|
2011-07-09 23:16:30 +02:00
|
|
|
],
|
2011-08-18 10:27:26 +02:00
|
|
|
},
|
2011-11-24 13:49:22 +01:00
|
|
|
'conditions': [
|
|
|
|
[ 'target_arch=="ia32"', {
|
|
|
|
'includes': [
|
|
|
|
'libvpx_srcs_x86.gypi',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
[ 'target_arch=="x64"', {
|
|
|
|
'includes': [
|
|
|
|
'libvpx_srcs_x86_64.gypi',
|
|
|
|
],
|
|
|
|
}],
|
2011-08-18 10:27:26 +02:00
|
|
|
],
|
2011-11-24 13:49:22 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
# 'libvpx' target for Chrome OS ARM builds.
|
|
|
|
[ 'target_arch=="arm" ', {
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
# This libvpx target contains both encoder and decoder.
|
|
|
|
# Encoder is configured to be realtime only.
|
|
|
|
'target_name': 'libvpx',
|
|
|
|
'type': 'static_library',
|
|
|
|
|
|
|
|
# Copy the script to the output folder so that we can use it with
|
|
|
|
# absolute path.
|
|
|
|
'copies': [{
|
|
|
|
'destination': '<(shared_generated_dir)',
|
|
|
|
'files': [
|
|
|
|
'<(ads2gas_script_path)',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
|
|
|
|
# Rule to convert .asm files to .S files.
|
|
|
|
'rules': [
|
|
|
|
{
|
|
|
|
'rule_name': 'convert_asm',
|
|
|
|
'extension': 'asm',
|
|
|
|
'inputs': [ '<(shared_generated_dir)/<(ads2gas_script)', ],
|
|
|
|
'outputs': [
|
|
|
|
'<(shared_generated_dir)/<(RULE_INPUT_ROOT).S',
|
|
|
|
],
|
|
|
|
'action': [
|
|
|
|
'bash',
|
|
|
|
'-c',
|
|
|
|
'cat <(RULE_INPUT_PATH) | perl <(shared_generated_dir)/<(ads2gas_script) > <(shared_generated_dir)/<(RULE_INPUT_ROOT).S',
|
|
|
|
],
|
|
|
|
'process_outputs_as_sources': 1,
|
|
|
|
'message': 'Convert libvpx asm file for ARM <(RULE_INPUT_PATH).',
|
|
|
|
},
|
2011-08-18 10:27:26 +02:00
|
|
|
],
|
2011-11-24 13:49:22 +01:00
|
|
|
|
2011-08-18 10:27:26 +02:00
|
|
|
'variables': {
|
2011-11-24 13:49:22 +01:00
|
|
|
# Location of the assembly conversion script.
|
|
|
|
'ads2gas_script': 'ads2gas.pl',
|
|
|
|
'ads2gas_script_path': 'source/libvpx/build/make/<(ads2gas_script)',
|
|
|
|
|
|
|
|
# Location of the intermediate output.
|
|
|
|
'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libvpx',
|
|
|
|
|
|
|
|
# Conditions to generate arm-neon as an target.
|
2011-08-18 10:27:26 +02:00
|
|
|
'conditions': [
|
2011-11-24 13:49:22 +01:00
|
|
|
['target_arch=="arm" and arm_neon==1', {
|
|
|
|
'target_arch_full': 'arm-neon',
|
|
|
|
}, {
|
|
|
|
'target_arch_full': '<(target_arch)',
|
|
|
|
}],
|
|
|
|
['OS=="android"', {
|
|
|
|
'_OS': 'linux',
|
|
|
|
}, {
|
|
|
|
'_OS': '<(OS)',
|
|
|
|
}],
|
2011-07-09 23:16:30 +02:00
|
|
|
],
|
|
|
|
},
|
2011-11-24 13:49:22 +01:00
|
|
|
'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,third_party/libvpx/source/config/<(_OS)/<(target_arch_full)',
|
2011-07-09 23:16:30 +02:00
|
|
|
],
|
2011-11-24 13:49:22 +01:00
|
|
|
'include_dirs': [
|
|
|
|
'source/config/<(_OS)/<(target_arch_full)',
|
|
|
|
'source/libvpx',
|
2011-07-09 23:16:30 +02:00
|
|
|
],
|
2011-11-24 13:49:22 +01:00
|
|
|
'direct_dependent_settings': {
|
|
|
|
'include_dirs': [
|
|
|
|
'source/libvpx',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'conditions': [
|
|
|
|
# Libvpx optimizations for ARMv6 or ARMv7 without NEON.
|
|
|
|
['arm_neon==0', {
|
|
|
|
'includes': [
|
|
|
|
'libvpx_srcs_arm.gypi',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
# Libvpx optimizations for ARMv7 with NEON.
|
|
|
|
['arm_neon==1', {
|
|
|
|
'includes': [
|
|
|
|
'libvpx_srcs_arm_neon.gypi',
|
|
|
|
],
|
|
|
|
}],
|
2011-07-09 23:16:30 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2011-11-24 13:49:22 +01:00
|
|
|
}],
|
|
|
|
],
|
2011-07-09 23:16:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# Local Variables:
|
|
|
|
# tab-width:2
|
|
|
|
# indent-tabs-mode:nil
|
|
|
|
# End:
|
|
|
|
# vim: set expandtab tabstop=2 shiftwidth=2:
|