Revert 114539 - Move content::MakeSharedMemorySegmentViaIPC into its own file
[chromium-blink-merge.git] / chrome / nacl.gypi
blob0ab96d4aedbb07edee1cd577d46e91a49794421c
1 # Copyright (c) 2011 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.
6   'include': [
7     '../native_client/build/untrusted.gypi',
8   ],
9   'target_defaults': {
10     'variables': {
11       'nacl_target': 0,
12     },
13     'target_conditions': [
14       # This part is shared between the targets defined below. Only files and
15       # settings relevant for building the Win64 target should be added here.
16       ['nacl_target==1', {
17         'include_dirs': [
18           '<(INTERMEDIATE_DIR)',
19         ],
20         'defines': [
21           'NACL_BLOCK_SHIFT=5',
22           'NACL_BLOCK_SIZE=32',
23           '<@(nacl_defines)',
24         ],
25         'sources': [
26           # .cc, .h, and .mm files under nacl that are used on all
27           # platforms, including both 32-bit and 64-bit Windows.
28           # Test files are also not included.
29           'nacl/nacl_main.cc',
30           'nacl/nacl_main_platform_delegate.h',
31           'nacl/nacl_main_platform_delegate_linux.cc',
32           'nacl/nacl_main_platform_delegate_mac.mm',
33           'nacl/nacl_main_platform_delegate_win.cc',
34           'nacl/nacl_listener.cc',
35           'nacl/nacl_listener.h',
36         ],
37         # TODO(gregoryd): consider switching NaCl to use Chrome OS defines
38         'conditions': [
39           ['OS=="win"', {
40             'defines': [
41               '__STDC_LIMIT_MACROS=1',
42             ],
43             'include_dirs': [
44               '<(DEPTH)/third_party/wtl/include',
45             ],
46           },],
47           ['OS=="linux"', {
48             'defines': [
49               '__STDC_LIMIT_MACROS=1',
50             ],
51             'sources': [
52               'app/nacl_fork_delegate_linux.cc',
53               'app/nacl_fork_delegate_linux.h',
54             ],
55           },],
56         ],
57       }],
58     ],
59   },
60   'conditions': [
61     ['disable_nacl!=1', {
62       'targets': [
63         {
64           'target_name': 'nacl',
65           'type': 'static_library',
66           'variables': {
67             'nacl_target': 1,
68           },
69           'dependencies': [
70             'chrome_resources.gyp:chrome_resources',
71             'chrome_resources.gyp:chrome_strings',
72             'common',
73             '../webkit/support/webkit_support.gyp:glue',
74             '../ppapi/native_client/src/trusted/plugin/plugin.gyp:ppGoogleNaClPluginChrome',
75             '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel',
76             '../native_client/src/trusted/platform_qualify/platform_qualify.gyp:platform_qual_lib',
77           ],
78           'conditions': [
79             ['disable_nacl_untrusted==0', {
80               'dependencies': [
81                 '../ppapi/native_client/native_client.gyp:nacl_irt',
82               ],
83             }],
84           ],
85           'direct_dependent_settings': {
86             'defines': [
87               'NACL_BLOCK_SHIFT=5',
88               'NACL_BLOCK_SIZE=32',
89               '<@(nacl_defines)',
90             ],
91           },
92         },
93       ],
94       'conditions': [
95         ['OS=="win"', {
96           'targets': [
97             {
98               'target_name': 'nacl_win64',
99               'type': 'static_library',
100               'variables': {
101                 'nacl_target': 1,
102               },
103               'dependencies': [
104                 '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel64',
105                 '../native_client/src/trusted/platform_qualify/platform_qualify.gyp:platform_qual_lib64',
106               ],
107               'sources': [
108                 'common/nacl_cmd_line.cc',
109                 'common/nacl_messages.cc',
110                 'nacl/nacl_broker_listener.cc',
111                 'nacl/nacl_broker_listener.h',
112               ],
113               'include_dirs': [
114                 '..',
115               ],
116               'defines': [
117                 '<@(nacl_win64_defines)',
118                 'COMPILE_CONTENT_STATICALLY',
119               ],
120               'configurations': {
121                 'Common_Base': {
122                   'msvs_target_platform': 'x64',
123                 },
124               },
125               'direct_dependent_settings': {
126                 'defines': [
127                   'NACL_BLOCK_SHIFT=5',
128                   'NACL_BLOCK_SIZE=32',
129                   '<@(nacl_defines)',
130                 ],
131               },
132             },
133           ],
134         }],
135         ['OS=="linux" and coverage==0', {
136           'targets': [
137             {
138               'target_name': 'nacl_helper',
139               'type': 'executable',
140               'include_dirs': [
141                 '..',
142               ],
143               'dependencies': [
144                 'nacl',
145               ],
146               'sources': [
147                 'nacl/nacl_helper_linux.cc',
148               ],
149               'conditions': [
150                 ['toolkit_uses_gtk == 1', {
151                   'dependencies': [
152                     '../build/linux/system.gyp:gtk',
153                   ],
154                 }],
155                 ['use_glib == 1', {
156                   'dependencies': [
157                     '../build/linux/system.gyp:glib',
158                   ],
159                 }],
160                 ['os_posix == 1 and OS != "mac"', {
161                   'conditions': [
162                     ['linux_use_tcmalloc==1', {
163                       'dependencies': [
164                         '../base/allocator/allocator.gyp:allocator',
165                       ],
166                     }],
167                   ],
168                 }],
169               ],
170               'cflags': ['-fPIE'],
171               'link_settings': {
172                 'ldflags': ['-pie'],
173               },
174             },
175           ],
176         }],
177       ],
178     }, {  # else (disable_nacl==1)
179       'targets': [
180         {
181           'target_name': 'nacl',
182           'type': 'none',
183           'sources': [],
184         },
185       ],
186       'conditions': [
187         ['OS=="win"', {
188           'targets': [
189             {
190               'target_name': 'nacl_win64',
191               'type': 'none',
192               'sources': [],
193             },
194           ],
195         }],
196       ],
197     }],
198   ],