1 # Copyright 2015 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 # This target is included in both 'net' and 'net_small'.
7 'type': '<(component)',
8 'variables': { 'enable_wexit_time_destructors': 1, },
10 '../base/base.gyp:base',
11 '../base/base.gyp:base_prefs',
12 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
13 '../crypto/crypto.gyp:crypto',
14 '../sdch/sdch.gyp:sdch',
15 '../third_party/zlib/zlib.gyp:zlib',
16 'net_derived_sources',
20 '<@(net_nacl_common_sources)',
21 '<@(net_non_nacl_sources)',
26 'export_dependent_settings': [
27 '../base/base.gyp:base',
32 'base/network_change_notifier_linux.cc',
33 'base/network_change_notifier_linux.h',
34 'base/network_change_notifier_netlink_linux.cc',
35 'base/network_change_notifier_netlink_linux.h',
36 'proxy/proxy_config_service_linux.cc',
37 'proxy/proxy_config_service_linux.h',
47 '/usr/include/kerberosV'
50 ['linux_link_kerberos==1', {
53 '<!@(krb5-config --libs gssapi)',
56 }, { # linux_link_kerberos==0
62 }, { # use_kerberos == 0
64 'http/http_auth_gssapi_posix.cc',
65 'http/http_auth_gssapi_posix.h',
66 'http/http_auth_handler_negotiate.cc',
67 'http/http_auth_handler_negotiate.h',
70 ['posix_avoid_mmap==1', {
74 'direct_dependent_settings': {
80 'disk_cache/blockfile/mapped_file_posix.cc',
84 'disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc',
87 ['disable_file_support==1', {
88 # TODO(mmenke): Should probably get rid of the dependency on
89 # net_resources in this case (It's used in net_util, to format
90 # directory listings. Also used outside of net/).
92 'base/directory_lister.cc',
93 'base/directory_lister.h',
94 'url_request/file_protocol_handler.cc',
95 'url_request/file_protocol_handler.h',
96 'url_request/url_request_file_dir_job.cc',
97 'url_request/url_request_file_dir_job.h',
98 'url_request/url_request_file_job.cc',
99 'url_request/url_request_file_job.h',
102 ['disable_ftp_support==1', {
104 ['exclude', '^ftp/'],
107 'url_request/ftp_protocol_handler.cc',
108 'url_request/ftp_protocol_handler.h',
109 'url_request/url_request_ftp_job.cc',
110 'url_request/url_request_ftp_job.h',
113 ['enable_built_in_dns==1', {
115 'ENABLE_BUILT_IN_DNS',
119 'dns/address_sorter_posix.cc',
120 'dns/address_sorter_posix.h',
126 'base/crypto_module_nss.cc',
127 'base/keygen_handler_nss.cc',
130 'cert/cert_database_nss.cc',
131 'cert/cert_verify_proc_nss.cc',
132 'cert/cert_verify_proc_nss.h',
133 'cert/ct_log_verifier_nss.cc',
134 'cert/ct_objects_extractor_nss.cc',
135 'cert/jwk_serializer_nss.cc',
136 'cert/nss_cert_database.cc',
137 'cert/nss_cert_database.h',
138 'cert/nss_cert_database_chromeos.cc',
139 'cert/nss_cert_database_chromeos.h',
140 'cert/nss_profile_filter_chromeos.cc',
141 'cert/nss_profile_filter_chromeos.h',
142 'cert/scoped_nss_types.h',
143 'cert/sha256_legacy_support_nss_win.cc',
144 'cert/test_root_certs_nss.cc',
145 'cert/x509_certificate_nss.cc',
146 'cert/x509_util_nss.cc',
147 'cert/x509_util_nss.h',
150 'quic/crypto/aead_base_decrypter_nss.cc',
151 'quic/crypto/aead_base_encrypter_nss.cc',
152 'quic/crypto/aes_128_gcm_12_decrypter_nss.cc',
153 'quic/crypto/aes_128_gcm_12_encrypter_nss.cc',
154 'quic/crypto/chacha20_poly1305_decrypter_nss.cc',
155 'quic/crypto/chacha20_poly1305_encrypter_nss.cc',
156 'quic/crypto/channel_id_nss.cc',
157 'quic/crypto/p256_key_exchange_nss.cc',
158 'socket/nss_ssl_util.cc',
159 'socket/nss_ssl_util.h',
160 'socket/ssl_client_socket_nss.cc',
161 'socket/ssl_client_socket_nss.h',
162 'socket/ssl_server_socket_nss.cc',
163 'socket/ssl_server_socket_nss.h',
164 'third_party/mozilla_security_manager/nsKeygenHandler.cpp',
165 'third_party/mozilla_security_manager/nsKeygenHandler.h',
166 'third_party/mozilla_security_manager/nsNSSCertificateDB.cpp',
167 'third_party/mozilla_security_manager/nsNSSCertificateDB.h',
168 'third_party/mozilla_security_manager/nsPKCS12Blob.cpp',
169 'third_party/mozilla_security_manager/nsPKCS12Blob.h',
172 '../third_party/boringssl/boringssl.gyp:boringssl',
175 { # else !use_openssl: remove the unneeded files and depend on NSS.
177 'base/crypto_module_openssl.cc',
178 'cert/ct_log_verifier_openssl.cc',
179 'cert/ct_objects_extractor_openssl.cc',
180 'cert/jwk_serializer_openssl.cc',
181 'cert/sha256_legacy_support_openssl_win.cc',
182 'cert/x509_util_openssl.cc',
183 'cert/x509_util_openssl.h',
184 'quic/crypto/aead_base_decrypter_openssl.cc',
185 'quic/crypto/aead_base_encrypter_openssl.cc',
186 'quic/crypto/aes_128_gcm_12_decrypter_openssl.cc',
187 'quic/crypto/aes_128_gcm_12_encrypter_openssl.cc',
188 'quic/crypto/chacha20_poly1305_decrypter_openssl.cc',
189 'quic/crypto/chacha20_poly1305_encrypter_openssl.cc',
190 'quic/crypto/channel_id_openssl.cc',
191 'quic/crypto/p256_key_exchange_openssl.cc',
192 'quic/crypto/scoped_evp_aead_ctx.cc',
193 'quic/crypto/scoped_evp_aead_ctx.h',
194 'socket/ssl_client_socket_openssl.cc',
195 'socket/ssl_client_socket_openssl.h',
196 'socket/ssl_server_socket_openssl.cc',
197 'socket/ssl_server_socket_openssl.h',
198 'socket/ssl_session_cache_openssl.cc',
199 'socket/ssl_session_cache_openssl.h',
200 'ssl/openssl_platform_key.h',
201 'ssl/openssl_platform_key_mac.cc',
202 'ssl/openssl_platform_key_win.cc',
203 'ssl/openssl_ssl_util.cc',
204 'ssl/openssl_ssl_util.h',
207 # Pull in the bundled or system NSS as appropriate.
208 [ 'desktop_linux == 1 or chromeos == 1', {
210 '../build/linux/system.gyp:ssl',
214 '../third_party/nss/nss.gyp:nspr',
215 '../third_party/nss/nss.gyp:nss',
216 'third_party/nss/ssl.gyp:libssl',
222 [ 'use_openssl_certs == 0', {
224 'base/keygen_handler_openssl.cc',
225 'base/openssl_private_key_store.h',
226 'base/openssl_private_key_store_android.cc',
227 'base/openssl_private_key_store_memory.cc',
228 'cert/cert_database_openssl.cc',
229 'cert/cert_verify_proc_openssl.cc',
230 'cert/cert_verify_proc_openssl.h',
231 'cert/test_root_certs_openssl.cc',
232 'cert/x509_certificate_openssl.cc',
233 'ssl/openssl_client_key_store.cc',
234 'ssl/openssl_client_key_store.h',
239 '../build/linux/system.gyp:gconf',
240 '../build/linux/system.gyp:gio',
243 [ 'desktop_linux == 1 or chromeos == 1', {
247 'base/network_change_notifier_linux.cc',
248 'base/network_change_notifier_netlink_linux.cc',
249 'proxy/proxy_config_service_linux.cc',
253 '../build/linux/system.gyp:libresolv',
265 { # else: OS is not in the above list
267 'base/crypto_module_nss.cc',
268 'base/keygen_handler_nss.cc',
269 'cert/cert_database_nss.cc',
270 'cert/nss_cert_database.cc',
271 'cert/nss_cert_database.h',
272 'cert/test_root_certs_nss.cc',
273 'cert/x509_certificate_nss.cc',
276 'third_party/mozilla_security_manager/nsKeygenHandler.cpp',
277 'third_party/mozilla_security_manager/nsKeygenHandler.h',
278 'third_party/mozilla_security_manager/nsNSSCertificateDB.cpp',
279 'third_party/mozilla_security_manager/nsNSSCertificateDB.h',
280 'third_party/mozilla_security_manager/nsPKCS12Blob.cpp',
281 'third_party/mozilla_security_manager/nsPKCS12Blob.h',
287 'cert/cert_verify_proc_nss.cc',
288 'cert/cert_verify_proc_nss.h',
289 'ssl/client_cert_store_chromeos.cc',
290 'ssl/client_cert_store_chromeos.h',
291 'ssl/client_cert_store_nss.cc',
292 'ssl/client_cert_store_nss.h',
295 [ 'enable_websockets != 1', {
297 ['exclude', '^websockets/'],
300 [ 'enable_mdns != 1', {
304 'dns/mdns_client.cc',
306 'dns/mdns_client_impl.cc',
307 'dns/mdns_client_impl.h',
308 'dns/record_parsed.cc',
309 'dns/record_parsed.h',
310 'dns/record_rdata.cc',
311 'dns/record_rdata.h',
316 'http/http_auth_handler_ntlm_portable.cc',
317 'socket/socket_libevent.cc',
318 'socket/socket_libevent.h',
319 'socket/tcp_socket_libevent.cc',
320 'socket/tcp_socket_libevent.h',
321 'udp/udp_socket_libevent.cc',
322 'udp/udp_socket_libevent.h',
324 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
325 'msvs_disabled_warnings': [4267, ],
326 }, { # else: OS != "win"
328 'base/winsock_init.cc',
329 'base/winsock_init.h',
330 'base/winsock_util.cc',
331 'base/winsock_util.h',
332 'proxy/proxy_resolver_winhttp.cc',
333 'proxy/proxy_resolver_winhttp.h',
340 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
341 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
342 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
343 '$(SDKROOT)/usr/lib/libresolv.dylib',
350 'disk_cache/blockfile/file_posix.cc',
354 '$(SDKROOT)/System/Library/Frameworks/CFNetwork.framework',
355 '$(SDKROOT)/System/Library/Frameworks/MobileCoreServices.framework',
356 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
357 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
358 '$(SDKROOT)/usr/lib/libresolv.dylib',
363 [ 'OS == "ios" or OS == "mac"', {
365 '<@(net_base_mac_ios_sources)',
369 ['OS=="android" and _toolset=="target" and android_webview_build == 0', {
374 [ 'OS == "android"', {
379 'base/openssl_private_key_store_memory.cc',
380 'cert/cert_database_openssl.cc',
381 'cert/cert_verify_proc_openssl.cc',
382 'cert/test_root_certs_openssl.cc',
387 'target_conditions': [
388 # These source files are excluded by default platform rules, but they
389 # are needed in specific cases on other platforms. Re-including them can
390 # only be done in target_conditions as it is evaluated after the
392 ['OS == "android"', {
394 ['include', '^base/platform_mime_util_linux\\.cc$'],
395 ['include', '^base/address_tracker_linux\\.cc$'],
396 ['include', '^base/address_tracker_linux\\.h$'],
397 ['include', '^base/net_util_linux\\.cc$'],
398 ['include', '^base/net_util_linux\\.h$'],
403 ['include', '^base/mac/url_conversions\\.h$'],
404 ['include', '^base/mac/url_conversions\\.mm$'],
405 ['include', '^base/net_util_mac\\.cc$'],
406 ['include', '^base/net_util_mac\\.h$'],
407 ['include', '^base/network_change_notifier_mac\\.cc$'],
408 ['include', '^base/network_config_watcher_mac\\.cc$'],
409 ['include', '^base/platform_mime_util_mac\\.mm$'],
410 # The iOS implementation only partially uses NSS and thus does not
411 # defines |use_nss|. In particular the |USE_NSS| preprocessor
412 # definition is not used. The following files are needed though:
413 ['include', '^cert/cert_verify_proc_nss\\.cc$'],
414 ['include', '^cert/cert_verify_proc_nss\\.h$'],
415 ['include', '^cert/test_root_certs_nss\\.cc$'],
416 ['include', '^cert/x509_util_nss\\.cc$'],
417 ['include', '^cert/x509_util_nss\\.h$'],
418 ['include', '^proxy/proxy_resolver_mac\\.cc$'],
419 ['include', '^proxy/proxy_server_mac\\.cc$'],
420 ['include', '^ocsp/nss_ocsp\\.cc$'],
421 ['include', '^ocsp/nss_ocsp\\.h$'],