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/protobuf/protobuf.gyp:protobuf_lite',
16 '../third_party/zlib/zlib.gyp:zlib',
17 'net_derived_sources',
22 '<@(net_nacl_common_sources)',
23 '<@(net_non_nacl_sources)',
28 'export_dependent_settings': [
29 '../base/base.gyp:base',
34 'base/network_change_notifier_linux.cc',
35 'base/network_change_notifier_linux.h',
36 'base/network_change_notifier_netlink_linux.cc',
37 'base/network_change_notifier_netlink_linux.h',
38 'proxy/proxy_config_service_linux.cc',
39 'proxy/proxy_config_service_linux.h',
49 '/usr/include/kerberosV'
52 ['linux_link_kerberos==1', {
55 '<!@(krb5-config --libs gssapi)',
58 }, { # linux_link_kerberos==0
64 }, { # use_kerberos == 0
66 'http/http_auth_gssapi_posix.cc',
67 'http/http_auth_gssapi_posix.h',
68 'http/http_auth_handler_negotiate.cc',
69 'http/http_auth_handler_negotiate.h',
72 ['posix_avoid_mmap==1', {
76 'direct_dependent_settings': {
82 'disk_cache/blockfile/mapped_file_posix.cc',
86 'disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc',
89 ['disable_file_support==1', {
90 # TODO(mmenke): Should probably get rid of the dependency on
91 # net_resources in this case (It's used in net_util, to format
92 # directory listings. Also used outside of net/).
94 'base/directory_lister.cc',
95 'base/directory_lister.h',
96 'url_request/file_protocol_handler.cc',
97 'url_request/file_protocol_handler.h',
98 'url_request/url_request_file_dir_job.cc',
99 'url_request/url_request_file_dir_job.h',
100 'url_request/url_request_file_job.cc',
101 'url_request/url_request_file_job.h',
104 ['disable_ftp_support==1', {
106 ['exclude', '^ftp/'],
109 'url_request/ftp_protocol_handler.cc',
110 'url_request/ftp_protocol_handler.h',
111 'url_request/url_request_ftp_job.cc',
112 'url_request/url_request_ftp_job.h',
115 ['enable_built_in_dns==1', {
117 'ENABLE_BUILT_IN_DNS',
121 'dns/address_sorter_posix.cc',
122 'dns/address_sorter_posix.h',
128 'base/crypto_module_nss.cc',
129 'base/keygen_handler_nss.cc',
132 'cert/cert_database_nss.cc',
133 'cert/cert_verify_proc_nss.cc',
134 'cert/cert_verify_proc_nss.h',
135 'cert/ct_log_verifier_nss.cc',
136 'cert/ct_objects_extractor_nss.cc',
137 'cert/jwk_serializer_nss.cc',
138 'cert/nss_cert_database.cc',
139 'cert/nss_cert_database.h',
140 'cert/nss_cert_database_chromeos.cc',
141 'cert/nss_cert_database_chromeos.h',
142 'cert/nss_profile_filter_chromeos.cc',
143 'cert/nss_profile_filter_chromeos.h',
144 'cert/scoped_nss_types.h',
145 'cert/sha256_legacy_support_nss_win.cc',
146 'cert/test_root_certs_nss.cc',
147 'cert/x509_certificate_nss.cc',
148 'cert/x509_util_nss.cc',
149 'cert/x509_util_nss.h',
152 'quic/crypto/aead_base_decrypter_nss.cc',
153 'quic/crypto/aead_base_encrypter_nss.cc',
154 'quic/crypto/aes_128_gcm_12_decrypter_nss.cc',
155 'quic/crypto/aes_128_gcm_12_encrypter_nss.cc',
156 'quic/crypto/chacha20_poly1305_decrypter_nss.cc',
157 'quic/crypto/chacha20_poly1305_encrypter_nss.cc',
158 'quic/crypto/channel_id_nss.cc',
159 'quic/crypto/p256_key_exchange_nss.cc',
160 'socket/nss_ssl_util.cc',
161 'socket/nss_ssl_util.h',
162 'socket/ssl_client_socket_nss.cc',
163 'socket/ssl_client_socket_nss.h',
164 'socket/ssl_server_socket_nss.cc',
165 'socket/ssl_server_socket_nss.h',
166 'third_party/mozilla_security_manager/nsKeygenHandler.cpp',
167 'third_party/mozilla_security_manager/nsKeygenHandler.h',
168 'third_party/mozilla_security_manager/nsNSSCertificateDB.cpp',
169 'third_party/mozilla_security_manager/nsNSSCertificateDB.h',
170 'third_party/mozilla_security_manager/nsPKCS12Blob.cpp',
171 'third_party/mozilla_security_manager/nsPKCS12Blob.h',
174 '../third_party/boringssl/boringssl.gyp:boringssl',
177 { # else !use_openssl: remove the unneeded files and depend on NSS.
179 'base/crypto_module_openssl.cc',
180 'cert/ct_log_verifier_openssl.cc',
181 'cert/ct_objects_extractor_openssl.cc',
182 'cert/jwk_serializer_openssl.cc',
183 'cert/sha256_legacy_support_openssl_win.cc',
184 'cert/x509_util_openssl.cc',
185 'cert/x509_util_openssl.h',
186 'quic/crypto/aead_base_decrypter_openssl.cc',
187 'quic/crypto/aead_base_encrypter_openssl.cc',
188 'quic/crypto/aes_128_gcm_12_decrypter_openssl.cc',
189 'quic/crypto/aes_128_gcm_12_encrypter_openssl.cc',
190 'quic/crypto/chacha20_poly1305_decrypter_openssl.cc',
191 'quic/crypto/chacha20_poly1305_encrypter_openssl.cc',
192 'quic/crypto/channel_id_openssl.cc',
193 'quic/crypto/p256_key_exchange_openssl.cc',
194 'quic/crypto/scoped_evp_aead_ctx.cc',
195 'quic/crypto/scoped_evp_aead_ctx.h',
196 'socket/ssl_client_socket_openssl.cc',
197 'socket/ssl_client_socket_openssl.h',
198 'socket/ssl_server_socket_openssl.cc',
199 'socket/ssl_server_socket_openssl.h',
200 'socket/ssl_session_cache_openssl.cc',
201 'socket/ssl_session_cache_openssl.h',
202 'ssl/openssl_platform_key.h',
203 'ssl/openssl_platform_key_mac.cc',
204 'ssl/openssl_platform_key_win.cc',
205 'ssl/openssl_ssl_util.cc',
206 'ssl/openssl_ssl_util.h',
209 # Pull in the bundled or system NSS as appropriate.
210 [ 'desktop_linux == 1 or chromeos == 1', {
212 '../build/linux/system.gyp:ssl',
216 '../third_party/nss/nss.gyp:nspr',
217 '../third_party/nss/nss.gyp:nss',
218 'third_party/nss/ssl.gyp:libssl',
224 [ 'use_openssl_certs == 0', {
226 'base/keygen_handler_openssl.cc',
227 'base/openssl_private_key_store.h',
228 'base/openssl_private_key_store_android.cc',
229 'base/openssl_private_key_store_memory.cc',
230 'cert/cert_database_openssl.cc',
231 'cert/cert_verify_proc_openssl.cc',
232 'cert/cert_verify_proc_openssl.h',
233 'cert/test_root_certs_openssl.cc',
234 'cert/x509_certificate_openssl.cc',
235 'ssl/openssl_client_key_store.cc',
236 'ssl/openssl_client_key_store.h',
241 '../build/linux/system.gyp:gconf',
242 '../build/linux/system.gyp:gio',
245 [ 'desktop_linux == 1 or chromeos == 1', {
249 'base/network_change_notifier_linux.cc',
250 'base/network_change_notifier_netlink_linux.cc',
251 'proxy/proxy_config_service_linux.cc',
255 '../build/linux/system.gyp:libresolv',
267 { # else: OS is not in the above list
269 'base/crypto_module_nss.cc',
270 'base/keygen_handler_nss.cc',
271 'cert/cert_database_nss.cc',
272 'cert/nss_cert_database.cc',
273 'cert/nss_cert_database.h',
274 'cert/test_root_certs_nss.cc',
275 'cert/x509_certificate_nss.cc',
278 'third_party/mozilla_security_manager/nsKeygenHandler.cpp',
279 'third_party/mozilla_security_manager/nsKeygenHandler.h',
280 'third_party/mozilla_security_manager/nsNSSCertificateDB.cpp',
281 'third_party/mozilla_security_manager/nsNSSCertificateDB.h',
282 'third_party/mozilla_security_manager/nsPKCS12Blob.cpp',
283 'third_party/mozilla_security_manager/nsPKCS12Blob.h',
289 'cert/cert_verify_proc_nss.cc',
290 'cert/cert_verify_proc_nss.h',
291 'ssl/client_cert_store_chromeos.cc',
292 'ssl/client_cert_store_chromeos.h',
293 'ssl/client_cert_store_nss.cc',
294 'ssl/client_cert_store_nss.h',
297 [ 'enable_websockets != 1', {
299 ['exclude', '^websockets/'],
302 [ 'enable_mdns != 1', {
306 'dns/mdns_client.cc',
308 'dns/mdns_client_impl.cc',
309 'dns/mdns_client_impl.h',
310 'dns/record_parsed.cc',
311 'dns/record_parsed.h',
312 'dns/record_rdata.cc',
313 'dns/record_rdata.h',
318 'http/http_auth_handler_ntlm_portable.cc',
319 'socket/socket_libevent.cc',
320 'socket/socket_libevent.h',
321 'socket/tcp_socket_libevent.cc',
322 'socket/tcp_socket_libevent.h',
323 'udp/udp_socket_libevent.cc',
324 'udp/udp_socket_libevent.h',
326 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
327 'msvs_disabled_warnings': [4267, ],
328 }, { # else: OS != "win"
330 'base/winsock_init.cc',
331 'base/winsock_init.h',
332 'base/winsock_util.cc',
333 'base/winsock_util.h',
334 'proxy/proxy_resolver_winhttp.cc',
335 'proxy/proxy_resolver_winhttp.h',
342 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
343 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
344 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
345 '$(SDKROOT)/usr/lib/libresolv.dylib',
352 'disk_cache/blockfile/file_posix.cc',
356 '$(SDKROOT)/System/Library/Frameworks/CFNetwork.framework',
357 '$(SDKROOT)/System/Library/Frameworks/MobileCoreServices.framework',
358 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
359 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
360 '$(SDKROOT)/usr/lib/libresolv.dylib',
365 [ 'OS == "ios" or OS == "mac"', {
367 '<@(net_base_mac_ios_sources)',
371 ['OS=="android" and _toolset=="target"', {
376 [ 'OS == "android"', {
381 'base/openssl_private_key_store_memory.cc',
382 'cert/cert_database_openssl.cc',
383 'cert/cert_verify_proc_openssl.cc',
384 'cert/test_root_certs_openssl.cc',
389 'target_conditions': [
390 # These source files are excluded by default platform rules, but they
391 # are needed in specific cases on other platforms. Re-including them can
392 # only be done in target_conditions as it is evaluated after the
394 ['OS == "android"', {
396 ['include', '^base/platform_mime_util_linux\\.cc$'],
397 ['include', '^base/address_tracker_linux\\.cc$'],
398 ['include', '^base/address_tracker_linux\\.h$'],
399 ['include', '^base/net_util_linux\\.cc$'],
400 ['include', '^base/net_util_linux\\.h$'],
405 ['include', '^base/mac/url_conversions\\.h$'],
406 ['include', '^base/mac/url_conversions\\.mm$'],
407 ['include', '^base/net_util_mac\\.cc$'],
408 ['include', '^base/net_util_mac\\.h$'],
409 ['include', '^base/network_change_notifier_mac\\.cc$'],
410 ['include', '^base/network_config_watcher_mac\\.cc$'],
411 ['include', '^base/platform_mime_util_mac\\.mm$'],
412 # The iOS implementation only partially uses NSS and thus does not
413 # defines |use_nss|. In particular the |USE_NSS| preprocessor
414 # definition is not used. The following files are needed though:
415 ['include', '^cert/cert_verify_proc_nss\\.cc$'],
416 ['include', '^cert/cert_verify_proc_nss\\.h$'],
417 ['include', '^cert/test_root_certs_nss\\.cc$'],
418 ['include', '^cert/x509_util_nss\\.cc$'],
419 ['include', '^cert/x509_util_nss\\.h$'],
420 ['include', '^proxy/proxy_resolver_mac\\.cc$'],
421 ['include', '^proxy/proxy_server_mac\\.cc$'],
422 ['include', '^ocsp/nss_ocsp\\.cc$'],
423 ['include', '^ocsp/nss_ocsp\\.h$'],