1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # Rule to extract integer values for each symbol from an object file.
6 # The output file name is the input file name with extension replaced with
8 # The following gyp variables must be set before including this gypi:
9 # output_format, the output format of integer value.
10 # output_dir, the full path where the output file should be created.
14 # 'sources': ['a.o', 'b.o'],
16 # 'output_format': 'cheader',
17 # 'output_dir': 'output',
19 # 'includes': ['obj_int_extract.gypi'],
21 # This extracts the symbol from a.o and b.o, and outputs them to a.h and b.h
22 # in output directory.
27 'asm_obj_extension': 'o',
30 'asm_obj_extension': 'obj',
32 ['output_format=="cheader"', {
33 'output_extension': 'h',
35 'output_extension': 'asm',
41 'rule_name': 'obj_int_extract',
42 'extension': '<(asm_obj_extension)',
44 '<(PRODUCT_DIR)/libvpx_obj_int_extract',
48 '<(output_dir)/<(RULE_INPUT_ROOT).<(output_extension)',
52 '<(DEPTH)/third_party/libvpx/obj_int_extract.py',
53 '-e', '<(PRODUCT_DIR)/libvpx_obj_int_extract',
54 '-f', '<(output_format)',
55 '-b', '<(RULE_INPUT_PATH)',
56 '-o', '<(output_dir)/<(RULE_INPUT_ROOT).<(output_extension)',
58 'message': 'Generate assembly offsets <(RULE_INPUT_PATH)',