1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree.
9 # This file is meant to be included into a target to provide an action
10 # to generate C header files. These headers include definitions
11 # that can be used in ARM assembly files.
13 # To use this, create a gyp target with the following form:
15 # 'target_name': 'my_asm_headers_lib',
16 # 'type': 'static_library',
21 # 'includes': ['path/to/this/gypi/file'],
24 # The headers are guaranteed to be generated before any
25 # source files, even within this target, are compiled.
27 # The 'asm_header_dir' variable specifies the path suffix that output
28 # files are generated under.
30 # TODO(kma): port this block from Android into other build systems.
33 'out_dir': '<(SHARED_INTERMEDIATE_DIR)/<(asm_header_dir)',
34 'process_outputs_as_sources': 1,
36 # We only support Android and iOS.
39 '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)',
40 'compiler_options': '-I<(webrtc_root)/.. -I<@(android_ndk_include) -S',
41 'pattern_to_detect': 'offset_',
44 'compiler_to_use': 'clang',
46 '-arch armv7 -I<(webrtc_root)/.. -isysroot $(SDKROOT) -S',
47 'pattern_to_detect': '_offset_',
53 'rule_name': 'generate_asm_header',
56 'generate_asm_header.py',
59 '<(out_dir)/<(RULE_INPUT_ROOT).h',
63 '<(webrtc_root)/build/generate_asm_header.py',
64 '--compiler=<(compiler_to_use)',
65 '--options=<(compiler_options)',
66 '--pattern=<(pattern_to_detect)',
70 'message': 'Generating assembly header files',
71 'process_outputs_as_sources': 1,
74 'direct_dependent_settings': {
75 'include_dirs': ['<(out_dir)',],
77 # This target exports a hard dependency because it generates header files.