Roll ANGLE 99f075dad..51a1db16d.
[chromium-blink-merge.git] / third_party / libjingle / libjingle_nacl.gyp
blob6848b293cacb0d510df9935c9c42486986f8e198
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.
6   'variables': {
7     'libjingle_source': "source",
8     'webrtc_base': "../webrtc/base",
9     'webrtc_xmllite': "../webrtc/libjingle/xmllite",
10     'webrtc_p2p': "../webrtc/p2p",
11   },
12   'includes': [
13     '../../native_client/build/untrusted.gypi',
14   ],
15   'targets': [
16     {
17       'target_name': 'libjingle_nacl',
18       'type': 'none',
19       'variables': {
20         'nlib_target': 'libjingle_nacl.a',
21         'nacl_untrusted_build': 1,
22         'build_glibc': 0,
23         'build_newlib': 0,
24         'build_pnacl_newlib': 1,
25         'use_openssl': 1,
26       },
27       'dependencies': [
28         '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
29         '<(DEPTH)/native_client_sdk/native_client_sdk_untrusted.gyp:nacl_io_untrusted',
30         '<(DEPTH)/third_party/expat/expat_nacl.gyp:expat_nacl',
31         '<(DEPTH)/third_party/boringssl/boringssl_nacl.gyp:boringssl_nacl',
32         'libjingle_p2p_constants_nacl',
33       ],
34       'defines': [
35         'EXPAT_RELATIVE_PATH',
36         'FEATURE_ENABLE_SSL',
37         'GTEST_RELATIVE_PATH',
38         'HAVE_OPENSSL_SSL_H',
39         'NO_MAIN_THREAD_WRAPPING',
40         'NO_SOUND_SYSTEM',
41         'POSIX',
42         'WEBRTC_POSIX',
43         'SRTP_RELATIVE_PATH',
44         'SSL_USE_OPENSSL',
45         'USE_WEBRTC_DEV_BRANCH',
46         'timezone=_timezone',
47       ],
48       'configurations': {
49         'Debug': {
50           'defines': [
51             # TODO(sergeyu): Fix libjingle to use NDEBUG instead of
52             # _DEBUG and remove this define. See below as well.
53             '_DEBUG',
54           ],
55         }
56       },
57       'include_dirs': [
58         './<(libjingle_source)',
59         '../',
60       ],
61       'includes': ['libjingle_common.gypi', ],
62       # TODO(sergeyu): Depend on webrtc/base.gyp:rtc_base_approved?
63       'sources': [
64         '<(webrtc_base)/asyncfile.cc',
65         '<(webrtc_base)/asyncfile.h',
66         '<(webrtc_base)/asynchttprequest.cc',
67         '<(webrtc_base)/asynchttprequest.h',
68         '<(webrtc_base)/asyncpacketsocket.cc',
69         '<(webrtc_base)/asyncpacketsocket.h',
70         '<(webrtc_base)/asyncresolverinterface.cc',
71         '<(webrtc_base)/asyncresolverinterface.h',
72         '<(webrtc_base)/asyncsocket.cc',
73         '<(webrtc_base)/asyncsocket.h',
74         '<(webrtc_base)/asynctcpsocket.cc',
75         '<(webrtc_base)/asynctcpsocket.h',
76         '<(webrtc_base)/asyncudpsocket.cc',
77         '<(webrtc_base)/asyncudpsocket.h',
78         '<(webrtc_base)/autodetectproxy.cc',
79         '<(webrtc_base)/autodetectproxy.h',
80         '<(webrtc_base)/base64.cc',
81         '<(webrtc_base)/base64.h',
82         '<(webrtc_base)/basicdefs.h',
83         '<(webrtc_base)/buffer.cc',
84         '<(webrtc_base)/buffer.h',
85         '<(webrtc_base)/bytebuffer.cc',
86         '<(webrtc_base)/bytebuffer.h',
87         '<(webrtc_base)/byteorder.h',
88         '<(webrtc_base)/checks.cc',
89         '<(webrtc_base)/checks.h',
90         '<(webrtc_base)/common.cc',
91         '<(webrtc_base)/common.h',
92         '<(webrtc_base)/cpumonitor.cc',
93         '<(webrtc_base)/cpumonitor.h',
94         '<(webrtc_base)/crc32.cc',
95         '<(webrtc_base)/crc32.h',
96         '<(webrtc_base)/criticalsection.h',
97         '<(webrtc_base)/cryptstring.cc',
98         '<(webrtc_base)/cryptstring.h',
99         '<(webrtc_base)/diskcache.cc',
100         '<(webrtc_base)/diskcache.h',
101         '<(webrtc_base)/dscp.h',
102         '<(webrtc_base)/event.cc',
103         '<(webrtc_base)/event.h',
104         '<(webrtc_base)/event_tracer.cc',
105         '<(webrtc_base)/event_tracer.h',
106         '<(webrtc_base)/fileutils.cc',
107         '<(webrtc_base)/fileutils.h',
108         '<(webrtc_base)/firewallsocketserver.cc',
109         '<(webrtc_base)/firewallsocketserver.h',
110         '<(webrtc_base)/flags.cc',
111         '<(webrtc_base)/flags.h',
112         '<(webrtc_base)/helpers.cc',
113         '<(webrtc_base)/helpers.h',
114         '<(webrtc_base)/httpbase.cc',
115         '<(webrtc_base)/httpbase.h',
116         '<(webrtc_base)/httpclient.cc',
117         '<(webrtc_base)/httpclient.h',
118         '<(webrtc_base)/httpcommon-inl.h',
119         '<(webrtc_base)/httpcommon.cc',
120         '<(webrtc_base)/httpcommon.h',
121         '<(webrtc_base)/httprequest.cc',
122         '<(webrtc_base)/httprequest.h',
123         '<(webrtc_base)/ipaddress.cc',
124         '<(webrtc_base)/ipaddress.h',
125         '<(webrtc_base)/linked_ptr.h',
126         '<(webrtc_base)/logging.cc',
127         '<(webrtc_base)/logging.h',
128         '<(webrtc_base)/maccocoathreadhelper.h',
129         '<(webrtc_base)/maccocoathreadhelper.mm',
130         '<(webrtc_base)/macconversion.cc',
131         '<(webrtc_base)/macconversion.h',
132         '<(webrtc_base)/macutils.cc',
133         '<(webrtc_base)/macutils.h',
134         '<(webrtc_base)/md5.cc',
135         '<(webrtc_base)/md5.h',
136         '<(webrtc_base)/md5digest.h',
137         '<(webrtc_base)/messagedigest.cc',
138         '<(webrtc_base)/messagedigest.h',
139         '<(webrtc_base)/messagehandler.cc',
140         '<(webrtc_base)/messagehandler.h',
141         '<(webrtc_base)/messagequeue.cc',
142         '<(webrtc_base)/messagequeue.h',
143         '<(webrtc_base)/move.h',
144         '<(webrtc_base)/nethelpers.cc',
145         '<(webrtc_base)/nethelpers.h',
146         '<(webrtc_base)/network.cc',
147         '<(webrtc_base)/network.h',
148         '<(webrtc_base)/nssidentity.cc',
149         '<(webrtc_base)/nssidentity.h',
150         '<(webrtc_base)/nssstreamadapter.cc',
151         '<(webrtc_base)/nssstreamadapter.h',
152         '<(webrtc_base)/nullsocketserver.h',
153         '<(webrtc_base)/openssladapter.cc',
154         '<(webrtc_base)/openssldigest.cc',
155         '<(webrtc_base)/opensslidentity.cc',
156         '<(webrtc_base)/opensslstreamadapter.cc',
157         '<(webrtc_base)/pathutils.cc',
158         '<(webrtc_base)/pathutils.h',
159         '<(webrtc_base)/physicalsocketserver.cc',
160         '<(webrtc_base)/physicalsocketserver.h',
161         '<(webrtc_base)/proxydetect.cc',
162         '<(webrtc_base)/proxydetect.h',
163         '<(webrtc_base)/proxyinfo.cc',
164         '<(webrtc_base)/proxyinfo.h',
165         '<(webrtc_base)/ratelimiter.cc',
166         '<(webrtc_base)/ratelimiter.h',
167         '<(webrtc_base)/ratetracker.cc',
168         '<(webrtc_base)/ratetracker.h',
169         '<(webrtc_base)/schanneladapter.cc',
170         '<(webrtc_base)/schanneladapter.h',
171         '<(webrtc_base)/scoped_autorelease_pool.h',
172         '<(webrtc_base)/scoped_autorelease_pool.mm',
173         '<(webrtc_base)/scoped_ptr.h',
174         '<(webrtc_base)/sec_buffer.h',
175         '<(webrtc_base)/sha1.cc',
176         '<(webrtc_base)/sha1.h',
177         '<(webrtc_base)/sha1digest.h',
178         '<(webrtc_base)/signalthread.cc',
179         '<(webrtc_base)/signalthread.h',
180         '<(webrtc_base)/sigslot.cc',
181         '<(webrtc_base)/sigslot.h',
182         '<(webrtc_base)/sigslotrepeater.h',
183         '<(webrtc_base)/socket.h',
184         '<(webrtc_base)/socketadapters.cc',
185         '<(webrtc_base)/socketadapters.h',
186         '<(webrtc_base)/socketaddress.cc',
187         '<(webrtc_base)/socketaddress.h',
188         '<(webrtc_base)/socketaddresspair.cc',
189         '<(webrtc_base)/socketaddresspair.h',
190         '<(webrtc_base)/socketfactory.h',
191         '<(webrtc_base)/socketpool.cc',
192         '<(webrtc_base)/socketpool.h',
193         '<(webrtc_base)/socketserver.h',
194         '<(webrtc_base)/socketstream.cc',
195         '<(webrtc_base)/socketstream.h',
196         '<(webrtc_base)/ssladapter.cc',
197         '<(webrtc_base)/ssladapter.h',
198         '<(webrtc_base)/sslfingerprint.cc',
199         '<(webrtc_base)/sslfingerprint.h',
200         '<(webrtc_base)/sslidentity.cc',
201         '<(webrtc_base)/sslidentity.h',
202         '<(webrtc_base)/sslsocketfactory.cc',
203         '<(webrtc_base)/sslsocketfactory.h',
204         '<(webrtc_base)/sslstreamadapter.cc',
205         '<(webrtc_base)/sslstreamadapter.h',
206         '<(webrtc_base)/sslstreamadapterhelper.cc',
207         '<(webrtc_base)/sslstreamadapterhelper.h',
208         '<(webrtc_base)/stream.cc',
209         '<(webrtc_base)/stream.h',
210         '<(webrtc_base)/stringencode.cc',
211         '<(webrtc_base)/stringencode.h',
212         '<(webrtc_base)/stringutils.cc',
213         '<(webrtc_base)/stringutils.h',
214         '<(webrtc_base)/task.cc',
215         '<(webrtc_base)/task.h',
216         '<(webrtc_base)/taskparent.cc',
217         '<(webrtc_base)/taskparent.h',
218         '<(webrtc_base)/taskrunner.cc',
219         '<(webrtc_base)/taskrunner.h',
220         '<(webrtc_base)/template_util.h',
221         '<(webrtc_base)/thread.cc',
222         '<(webrtc_base)/thread.h',
223         '<(webrtc_base)/timeutils.cc',
224         '<(webrtc_base)/timeutils.h',
225         '<(webrtc_base)/timing.cc',
226         '<(webrtc_base)/timing.h',
227         '<(webrtc_base)/unixfilesystem.cc',
228         '<(webrtc_base)/unixfilesystem.h',
229         '<(webrtc_base)/urlencode.cc',
230         '<(webrtc_base)/urlencode.h',
231         '<(webrtc_base)/win32.cc',
232         '<(webrtc_base)/win32.h',
233         '<(webrtc_base)/win32filesystem.cc',
234         '<(webrtc_base)/win32filesystem.h',
235         '<(webrtc_base)/win32securityerrors.cc',
236         '<(webrtc_base)/win32window.cc',
237         '<(webrtc_base)/win32window.h',
238         '<(webrtc_base)/winfirewall.cc',
239         '<(webrtc_base)/winfirewall.h',
240         '<(webrtc_base)/winping.cc',
241         '<(webrtc_base)/winping.h',
242         '<(webrtc_base)/worker.cc',
243         '<(webrtc_base)/worker.h',
244         '<(webrtc_xmllite)/qname.cc',
245         '<(webrtc_xmllite)/qname.h',
246         '<(webrtc_xmllite)/xmlbuilder.cc',
247         '<(webrtc_xmllite)/xmlbuilder.h',
248         '<(webrtc_xmllite)/xmlconstants.cc',
249         '<(webrtc_xmllite)/xmlconstants.h',
250         '<(webrtc_xmllite)/xmlelement.cc',
251         '<(webrtc_xmllite)/xmlelement.h',
252         '<(webrtc_xmllite)/xmlnsstack.cc',
253         '<(webrtc_xmllite)/xmlnsstack.h',
254         '<(webrtc_xmllite)/xmlparser.cc',
255         '<(webrtc_xmllite)/xmlparser.h',
256         '<(webrtc_xmllite)/xmlprinter.cc',
257         '<(webrtc_xmllite)/xmlprinter.h',
258       ],
259       'sources!': [
260         # Compiled as part of libjingle_p2p_constants_nacl.
261         '<(webrtc_p2p)/base/constants.cc',
262         '<(webrtc_p2p)/base/constants.h',
263       ],
264       'sources/': [
265         ['exclude', '/mac[a-z]+\\.(h|cc)$'],
266         ['exclude', '/scoped_autorelease_pool\\.(h|mm)$'],
267       ],
268       'conditions': [
269         ['OS!="win"', {
270           'sources/': [
271             ['exclude', '/win[a-z0-9]+\\.(h|cc)$'],
272             ['exclude', '/schanneladapter\\.(h|cc)$'],
273           ],
274         }],
275       ],
276       'direct_dependent_settings': {
277         'include_dirs': [
278           './overrides',
279           './<(libjingle_source)',
280           '../../third_party/webrtc/overrides',
281           '../../third_party',
282           '../../third_party/webrtc',
283         ],
284         'defines': [
285           'EXPAT_RELATIVE_PATH',
286           'FEATURE_ENABLE_SSL',
287           'GTEST_RELATIVE_PATH',
288           'NO_MAIN_THREAD_WRAPPING',
289           'NO_SOUND_SYSTEM',
290           'POSIX',
291           'WEBRTC_POSIX',
292           'SRTP_RELATIVE_PATH',
293           'SSL_USE_OPENSSL',
294           'USE_WEBRTC_DEV_BRANCH',
295         ],
296       },
297       'export_dependent_settings': [
298         '<(DEPTH)/native_client_sdk/native_client_sdk_untrusted.gyp:nacl_io_untrusted',
299       ],
300     },  # end of target 'libjingle_nacl'
302     {
303       'target_name': 'libjingle_p2p_constants_nacl',
304       'type': 'none',
305       'variables': {
306         'nlib_target': 'libjingle_p2p_constants_nacl.a',
307         'build_glibc': 0,
308         'build_newlib': 1,
309         'build_pnacl_newlib': 1,
310       },
311       'configurations': {
312         'Debug': {
313           'defines': [
314             # TODO(sergeyu): Fix libjingle to use NDEBUG instead of
315             # _DEBUG and remove this define. See below as well.
316             '_DEBUG',
317           ],
318         }
319       },
320       'include_dirs': [
321         './<(libjingle_source)',
322         '../'
323       ],
324       'sources': [
325         '<(webrtc_p2p)/base/constants.cc',
326         '<(webrtc_p2p)/base/constants.h',
327       ],
328     },  # end of target 'libjingle_p2p_constants_nacl'
329   ],