Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / cython / cython_compiler.gypi
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.
4
5 {
6   'variables': {
7     'python_flags': '<(DEPTH)/third_party/cython/python_flags.py',
8   },
9   'conditions': [
10     ['OS=="mac"', {
11       'variables': {
12         'module_prefix': '',
13         'module_suffix': '.so',
14       },
15     }, {
16       'variables': {
17         'module_prefix': '<(SHARED_LIB_PREFIX)',
18         'module_suffix': '<(SHARED_LIB_SUFFIX)',
19       },
20     }],
21   ],
22   'type': 'loadable_module',
23   'rules': [
24     {
25       'rule_name': '<(_target_name)_cython_compiler',
26       'extension': 'pyx',
27       'variables': {
28         'cython_compiler': '<(DEPTH)/third_party/cython/src/cython.py',
29       },
30       'inputs': [
31         '<(cython_compiler)',
32       ],
33       'outputs': [
34         '<(SHARED_INTERMEDIATE_DIR)/cython/<(python_base_module)/<(RULE_INPUT_ROOT).cc',
35       ],
36       'action': [
37         'python', '<(cython_compiler)',
38         '--cplus',
39         '-I<(DEPTH)',
40         '-o', '<@(_outputs)',
41         '<(RULE_INPUT_PATH)',
42       ],
43       'message': 'Generating C++ source from <(RULE_INPUT_PATH)',
44       'process_outputs_as_sources': 1,
45     }
46   ],
47   'include_dirs': [
48     '<!@(python <(python_flags) --includes)',
49     '<(DEPTH)',
50   ],
51   'libraries': [
52     '<!@(python <(python_flags) --libraries)',
53   ],
54   'cflags': [
55     '-Wno-unused-function',
56   ],
57   'xcode_settings': {
58     'WARNING_CFLAGS': [ '-Wno-unused-function' ],
59   },
60   'library_dirs': [
61     '<!@(python <(python_flags) --library_dirs)',
62   ],
63   'hard_dependency': 1,
64 }