summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/libvpx/obj_int_extract.gypi
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/libvpx/obj_int_extract.gypi')
-rw-r--r--chromium/third_party/libvpx/obj_int_extract.gypi61
1 files changed, 61 insertions, 0 deletions
diff --git a/chromium/third_party/libvpx/obj_int_extract.gypi b/chromium/third_party/libvpx/obj_int_extract.gypi
new file mode 100644
index 00000000000..b5961e2d1b7
--- /dev/null
+++ b/chromium/third_party/libvpx/obj_int_extract.gypi
@@ -0,0 +1,61 @@
+# Copyright 2014 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.
+
+# Rule to extract integer values for each symbol from an object file.
+# The output file name is the input file name with extension replaced with
+# asm or h.
+# The following gyp variables must be set before including this gypi:
+# output_format, the output format of integer value.
+# output_dir, the full path where the output file should be created.
+#
+# For example:
+#
+# 'sources': ['a.o', 'b.o'],
+# 'variables': {
+# 'output_format': 'cheader',
+# 'output_dir': 'output',
+# },
+# 'includes': ['obj_int_extract.gypi'],
+#
+# This extracts the symbol from a.o and b.o, and outputs them to a.h and b.h
+# in output directory.
+{
+ 'variables': {
+ 'conditions': [
+ ['os_posix==1', {
+ 'asm_obj_extension': 'o',
+ }],
+ ['OS=="win"', {
+ 'asm_obj_extension': 'obj',
+ }],
+ ['output_format=="cheader"', {
+ 'output_extension': 'h',
+ }, {
+ 'output_extension': 'asm',
+ }],
+ ],
+ },
+ 'rules': [
+ {
+ 'rule_name': 'obj_int_extract',
+ 'extension': '<(asm_obj_extension)',
+ 'inputs': [
+ '<(PRODUCT_DIR)/libvpx_obj_int_extract',
+ 'obj_int_extract.py',
+ ],
+ 'outputs': [
+ '<(output_dir)/<(RULE_INPUT_ROOT).<(output_extension)',
+ ],
+ 'action': [
+ 'python',
+ '<(DEPTH)/third_party/libvpx/obj_int_extract.py',
+ '-e', '<(PRODUCT_DIR)/libvpx_obj_int_extract',
+ '-f', '<(output_format)',
+ '-b', '<(RULE_INPUT_PATH)',
+ '-o', '<(output_dir)/<(RULE_INPUT_ROOT).<(output_extension)',
+ ],
+ 'message': 'Generate assembly offsets <(RULE_INPUT_PATH)',
+ },
+ ],
+}