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