blob: e1c73d46d5601de3126bd8adf18455cc2a3acad9 [file] [log] [blame]
[email protected]2f80c312009-02-25 21:26:551# Copyright (c) 2009 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 'chromium_code': 1,
8 },
9 'includes': [
10 '../build/common.gypi',
11 ],
12 'targets': [
13 {
14 'target_name': 'net',
15 'type': 'static_library',
16 'dependencies': [
17 '../base/base.gyp:base',
18 '../build/temp_gyp/googleurl.gyp:googleurl',
[email protected]6b675b82009-02-26 23:18:3219 '../build/temp_gyp/v8.gyp:v8',
[email protected]2f80c312009-02-25 21:26:5520 '../sdch/sdch.gyp:sdch',
21 '../third_party/bzip2/bzip2.gyp:bzip2',
22 '../third_party/icu38/icu38.gyp:icui18n',
23 '../third_party/icu38/icu38.gyp:icuuc',
24 '../third_party/modp_b64/modp_b64.gyp:modp_b64',
25 '../third_party/zlib/zlib.gyp:zlib',
26 ],
27 'sources': [
28 'base/address_list.cc',
29 'base/address_list.h',
30 'base/auth.h',
31 'base/base64.cc',
32 'base/base64.h',
33 'base/bzip2_filter.cc',
34 'base/bzip2_filter.h',
35 'base/cert_status_flags.cc',
36 'base/cert_status_flags.h',
37 'base/cert_verifier.cc',
38 'base/cert_verifier.h',
39 'base/cert_verify_result.h',
40 'base/client_socket.cc',
41 'base/client_socket.h',
42 'base/client_socket_factory.cc',
43 'base/client_socket_factory.h',
44 'base/client_socket_handle.cc',
45 'base/client_socket_handle.h',
46 'base/client_socket_pool.cc',
47 'base/client_socket_pool.h',
48 'base/completion_callback.h',
49 'base/connection_type_histograms.cc',
50 'base/connection_type_histograms.h',
51 'base/cookie_monster.cc',
52 'base/cookie_monster.h',
53 'base/cookie_policy.cc',
54 'base/cookie_policy.h',
55 'base/data_url.cc',
56 'base/data_url.h',
57 'base/directory_lister.cc',
58 'base/directory_lister.h',
59 'base/dns_resolution_observer.cc',
60 'base/dns_resolution_observer.h',
61 'base/effective_tld_names.cc',
62 'base/effective_tld_names.dat',
63 'base/escape.cc',
64 'base/escape.h',
65 'base/ev_root_ca_metadata.cc',
66 'base/ev_root_ca_metadata.h',
67 'base/file_stream.h',
68 'base/file_stream_posix.cc',
69 'base/file_stream_win.cc',
70 'base/filter.cc',
71 'base/filter.h',
72 'base/gzip_filter.cc',
73 'base/gzip_filter.h',
74 'base/gzip_header.cc',
75 'base/gzip_header.h',
76 'base/host_resolver.cc',
77 'base/host_resolver.h',
78 'base/io_buffer.cc',
79 'base/io_buffer.h',
80 'base/listen_socket.cc',
81 'base/listen_socket.h',
82 'base/load_flags.h',
83 'base/mime_sniffer.cc',
84 'base/mime_sniffer.h',
85 'base/mime_util.cc',
86 'base/mime_util.h',
87 'base/net_error_list.h',
88 'base/net_errors.cc',
89 'base/net_errors.h',
90 'base/net_module.cc',
91 'base/net_module.h',
92 'base/net_resources.h',
93 'base/net_util.cc',
94 'base/net_util.h',
95 'base/net_util_posix.cc',
96 'base/net_util_win.cc',
97 'base/nss_memio.c',
98 'base/platform_mime_util.h',
99 # TODO(tc): gnome-vfs? xdgmime? /etc/mime.types?
100 'base/platform_mime_util_linux.cc',
101 'base/platform_mime_util_mac.cc',
102 'base/platform_mime_util_win.cc',
103 'base/registry_controlled_domain.cc',
104 'base/registry_controlled_domain.h',
105 'base/scoped_cert_chain_context.h',
106 'base/sdch_filter.cc',
107 'base/sdch_filter.h',
108 'base/sdch_manager.cc',
109 'base/sdch_manager.h',
110 'base/socket.h',
111 'base/ssl_client_socket.h',
112 'base/ssl_client_socket_mac.cc',
113 'base/ssl_client_socket_nss.cc',
114 'base/ssl_client_socket_win.cc',
115 'base/ssl_client_socket_win.h',
116 'base/ssl_config_service.cc',
117 'base/ssl_config_service.h',
118 'base/ssl_info.h',
119 'base/ssl_test_util.cc',
120 'base/tcp_client_socket.h',
121 'base/tcp_client_socket_libevent.cc',
122 'base/tcp_client_socket_win.cc',
123 'base/telnet_server.cc',
124 'base/telnet_server.h',
125 'base/upload_data.cc',
126 'base/upload_data.h',
127 'base/upload_data_stream.cc',
128 'base/upload_data_stream.h',
129 'base/wininet_util.cc',
130 'base/wininet_util.h',
131 'base/winsock_init.cc',
132 'base/winsock_init.h',
133 'base/x509_certificate.cc',
134 'base/x509_certificate.h',
135 'base/x509_certificate_mac.cc',
136 'base/x509_certificate_nss.cc',
137 'base/x509_certificate_win.cc',
138 'build/precompiled_net.cc',
139 'build/precompiled_net.h',
140 'disk_cache/addr.cc',
141 'disk_cache/addr.h',
142 'disk_cache/backend_impl.cc',
143 'disk_cache/backend_impl.h',
144 'disk_cache/block_files.cc',
145 'disk_cache/block_files.h',
146 'disk_cache/cache_util.h',
147 'disk_cache/cache_util_posix.cc',
148 'disk_cache/cache_util_win.cc',
149 'disk_cache/disk_cache.h',
150 'disk_cache/disk_format.h',
151 'disk_cache/entry_impl.cc',
152 'disk_cache/entry_impl.h',
153 'disk_cache/errors.h',
154 'disk_cache/eviction.cc',
155 'disk_cache/eviction.h',
156 'disk_cache/file.h',
157 'disk_cache/file_block.h',
158 'disk_cache/file_lock.cc',
159 'disk_cache/file_lock.h',
160 'disk_cache/file_posix.cc',
161 'disk_cache/file_win.cc',
162 'disk_cache/hash.cc',
163 'disk_cache/hash.h',
164 'disk_cache/mapped_file.h',
165 'disk_cache/mapped_file_posix.cc',
166 'disk_cache/mapped_file_win.cc',
167 'disk_cache/mem_backend_impl.cc',
168 'disk_cache/mem_backend_impl.h',
169 'disk_cache/mem_entry_impl.cc',
170 'disk_cache/mem_entry_impl.h',
171 'disk_cache/mem_rankings.cc',
172 'disk_cache/mem_rankings.h',
173 'disk_cache/rankings.cc',
174 'disk_cache/rankings.h',
175 'disk_cache/stats.cc',
176 'disk_cache/stats.h',
177 'disk_cache/stats_histogram.cc',
178 'disk_cache/stats_histogram.h',
179 'disk_cache/storage_block-inl.h',
180 'disk_cache/storage_block.h',
181 'disk_cache/trace.cc',
182 'disk_cache/trace.h',
183 'ftp/ftp_auth_cache.cc',
184 'ftp/ftp_auth_cache.h',
185 'ftp/ftp_network_layer.cc',
186 'ftp/ftp_network_layer.h',
187 'ftp/ftp_network_session.h',
188 'ftp/ftp_network_transaction.cc',
189 'ftp/ftp_network_transaction.h',
190 'ftp/ftp_request_info.h',
191 'ftp/ftp_response_info.h',
192 'ftp/ftp_transaction.h',
193 'ftp/ftp_transaction_factory.h',
[email protected]5ae0b862009-02-28 02:02:41194 'http/des.cc',
195 'http/des.h',
[email protected]2f80c312009-02-25 21:26:55196 'http/http_atom_list.h',
197 'http/http_auth.cc',
198 'http/http_auth.h',
199 'http/http_auth_cache.cc',
200 'http/http_auth_cache.h',
201 'http/http_auth_handler.h',
202 'http/http_auth_handler.cc',
203 'http/http_auth_handler_basic.cc',
204 'http/http_auth_handler_basic.h',
205 'http/http_auth_handler_digest.cc',
206 'http/http_auth_handler_digest.h',
[email protected]5ae0b862009-02-28 02:02:41207 'http/http_auth_handler_ntlm.cc',
208 'http/http_auth_handler_ntlm.h',
[email protected]2f80c312009-02-25 21:26:55209 'http/http_cache.cc',
210 'http/http_cache.h',
211 'http/http_chunked_decoder.cc',
212 'http/http_chunked_decoder.h',
213 'http/http_network_layer.cc',
214 'http/http_network_layer.h',
215 'http/http_network_session.h',
216 'http/http_network_transaction.cc',
217 'http/http_network_transaction.h',
218 'http/http_request_info.h',
219 'http/http_response_headers.cc',
220 'http/http_response_headers.h',
221 'http/http_response_info.cc',
222 'http/http_response_info.h',
223 'http/http_transaction.h',
224 'http/http_transaction_factory.h',
225 'http/http_util.cc',
226 'http/http_util.h',
227 'http/http_vary_data.cc',
228 'http/http_vary_data.h',
[email protected]5ae0b862009-02-28 02:02:41229 'http/md4.cc',
230 'http/md4.h',
[email protected]2f80c312009-02-25 21:26:55231 'proxy/proxy_config_service_fixed.h',
232 'proxy/proxy_config_service_win.cc',
233 'proxy/proxy_config_service_win.h',
234 'proxy/proxy_resolver_mac.cc',
[email protected]6b675b82009-02-26 23:18:32235 'proxy/proxy_resolver_script.h',
236 'proxy/proxy_resolver_v8.cc',
237 'proxy/proxy_resolver_v8.h',
[email protected]2f80c312009-02-25 21:26:55238 'proxy/proxy_resolver_winhttp.cc',
239 'proxy/proxy_resolver_winhttp.h',
240 'proxy/proxy_script_fetcher.cc',
241 'proxy/proxy_script_fetcher.h',
242 'proxy/proxy_server.cc',
243 'proxy/proxy_server.h',
244 'proxy/proxy_service.cc',
245 'proxy/proxy_service.h',
246 'url_request/mime_sniffer_proxy.cc',
247 'url_request/mime_sniffer_proxy.h',
248 'url_request/url_request.cc',
249 'url_request/url_request.h',
250 'url_request/url_request_about_job.cc',
251 'url_request/url_request_about_job.h',
252 'url_request/url_request_context.h',
253 'url_request/url_request_error_job.cc',
254 'url_request/url_request_error_job.h',
255 'url_request/url_request_file_dir_job.cc',
256 'url_request/url_request_file_dir_job.h',
257 'url_request/url_request_file_job.cc',
258 'url_request/url_request_file_job.h',
259 'url_request/url_request_filter.cc',
260 'url_request/url_request_filter.h',
261 'url_request/url_request_ftp_job.cc',
262 'url_request/url_request_ftp_job.h',
263 'url_request/url_request_http_job.cc',
264 'url_request/url_request_http_job.h',
265 'url_request/url_request_inet_job.cc',
266 'url_request/url_request_inet_job.h',
267 'url_request/url_request_job.cc',
268 'url_request/url_request_job.h',
269 'url_request/url_request_job_manager.cc',
270 'url_request/url_request_job_manager.h',
271 'url_request/url_request_job_metrics.cc',
272 'url_request/url_request_job_metrics.h',
273 'url_request/url_request_job_tracker.cc',
274 'url_request/url_request_job_tracker.h',
275 'url_request/url_request_simple_job.cc',
276 'url_request/url_request_simple_job.h',
277 'url_request/url_request_status.h',
278 'url_request/url_request_test_job.cc',
279 'url_request/url_request_test_job.h',
280 'url_request/url_request_view_cache_job.cc',
281 'url_request/url_request_view_cache_job.h',
282 ],
283 'sources!': [
284 'build/precompiled_net.h',
285 'build/precompiled_net.cc',
286 ],
287 'export_dependent_settings': [
288 '../base/base.gyp:base',
289 ],
290 'conditions': [
291 [ 'OS == "win"', {
292 'sources/': [ ['exclude', '_(mac|linux|posix)\\.cc$'] ],
293 'sources!': [
294 'base/tcp_client_socket_libevent.cc',
295 ],
296 'dependencies': [
297 'net_resources',
298 'tld_cleanup',
299 ],
300 'configurations': {
301 'Debug': {
302 'msvs_precompiled_header': 'build/precompiled_net.h',
303 'msvs_precompiled_source': 'build/precompiled_net.cc',
304 },
305 },
306 },
307 { # else: OS != "win"
308 'sources!': [
309 'base/ssl_config_service.cc',
310 'base/wininet_util.cc',
311 'base/winsock_init.cc',
312 'proxy/proxy_resolver_winhttp.cc',
313 'url_request/url_request_ftp_job.cc',
314 'url_request/url_request_inet_job.cc',
315 ],
316 },
317 ],
318 [ 'OS == "linux"', {
319 'sources/': [ ['exclude', '_(mac|win)\\.cc$'] ],
320 'dependencies': [
321 'net_resources',
322 ],
323 },
324 { # else: OS != "linux"
325 'sources!': [
326 'base/nss_memio.c',
327 'base/ssl_client_socket_nss.cc',
328 'base/x509_certificate_nss.cc',
329 ],
330 # Get U_STATIC_IMPLEMENTATION and -I directories on Linux.
331 'dependencies': [
332 '../third_party/icu38/icu38.gyp:icui18n',
333 '../third_party/icu38/icu38.gyp:icuuc',
334 ],
335 },
336 ],
337 [ 'OS == "mac"', {
338 'sources/': [ ['exclude', '_(linux|win)\\.cc$'] ],
339 'link_settings': {
340 'libraries': [
341 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
342 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
343 ]
344 },
345 },
346 ],
347 [ 'OS == "win"', {
348 # This used to live in build_convert_tld_data.rules
349 #'msvs_tool_files': ['build/convert_tld_data.rules'],
350 'rules': [
351 {
352 'rule_name': 'tld_convert',
353 'extension': 'dat',
354 'inputs': [ '<(RULE_INPUT_PATH)' ],
355 'outputs':
356 ['<(INTERMEDIATE_DIR)/../<(RULE_INPUT_ROOT)_clean.dat'],
357 'action':
358 ['<(PRODUCT_DIR)/tld_cleanup', '<@(_inputs)', '<@(_outputs)'],
359 },
360 ],
361 },],
362 ],
363 },
364 {
365 'target_name': 'net_unittests',
366 'type': 'executable',
367 'dependencies': [
368 'net',
369 '../base/base.gyp:base',
370 '../testing/gtest.gyp:gtest',
371 ],
372 'sources': [
373 'base/base64_unittest.cc',
374 'base/bzip2_filter_unittest.cc',
375 'base/client_socket_pool_unittest.cc',
376 'base/cookie_monster_unittest.cc',
377 'base/cookie_policy_unittest.cc',
378 'base/data_url_unittest.cc',
379 'base/directory_lister_unittest.cc',
380 'base/escape_unittest.cc',
381 'base/file_stream_unittest.cc',
382 'base/filter_unittest.cc',
383 'base/gzip_filter_unittest.cc',
384 'base/host_resolver_unittest.cc',
385 'base/listen_socket_unittest.cc',
386 'base/listen_socket_unittest.h',
387 'base/mime_sniffer_unittest.cc',
388 'base/mime_util_unittest.cc',
389 'base/net_util_unittest.cc',
390 'base/registry_controlled_domain_unittest.cc',
391 'base/run_all_unittests.cc',
392 'base/sdch_filter_unittest.cc',
393 'base/ssl_client_socket_unittest.cc',
394 'base/ssl_config_service_unittest.cc',
395 'base/tcp_client_socket_unittest.cc',
[email protected]8b03e8d2009-03-02 06:53:31396 'base/tcp_pinger_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55397 'base/telnet_server_unittest.cc',
398 'base/test_completion_callback_unittest.cc',
399 'base/wininet_util_unittest.cc',
400 'base/x509_certificate_unittest.cc',
401 'disk_cache/addr_unittest.cc',
402 'disk_cache/backend_unittest.cc',
403 'disk_cache/block_files_unittest.cc',
404 'disk_cache/disk_cache_test_base.cc',
405 'disk_cache/disk_cache_test_base.h',
406 'disk_cache/disk_cache_test_util.cc',
407 'disk_cache/disk_cache_test_util.h',
408 'disk_cache/entry_unittest.cc',
409 'disk_cache/mapped_file_unittest.cc',
410 'disk_cache/storage_block_unittest.cc',
411 'ftp/ftp_auth_cache_unittest.cc',
[email protected]5ae0b862009-02-28 02:02:41412 'http/des_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55413 'http/http_auth_cache_unittest.cc',
414 'http/http_auth_handler_basic_unittest.cc',
415 'http/http_auth_handler_digest_unittest.cc',
416 'http/http_auth_unittest.cc',
417 'http/http_cache_unittest.cc',
418 'http/http_chunked_decoder_unittest.cc',
419 'http/http_network_layer_unittest.cc',
420 'http/http_network_transaction_unittest.cc',
421 'http/http_response_headers_unittest.cc',
422 'http/http_transaction_unittest.cc',
423 'http/http_transaction_unittest.h',
424 'http/http_util_unittest.cc',
425 'http/http_vary_data_unittest.cc',
[email protected]6b675b82009-02-26 23:18:32426 'proxy/proxy_resolver_v8_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55427 'proxy/proxy_script_fetcher_unittest.cc',
[email protected]8b03e8d2009-03-02 06:53:31428 'proxy/proxy_server_unittest.cc',
[email protected]2f80c312009-02-25 21:26:55429 'proxy/proxy_service_unittest.cc',
430 'url_request/url_request_unittest.cc',
431 'url_request/url_request_unittest.h',
432 ],
433 'conditions': [
434 [ 'OS != "win"', {
435 'sources!': [
436 'base/wininet_util_unittest.cc',
437 ],
438 },
439 ],
440 [ 'OS == "linux"', {
441 'sources!': [
442 'base/sdch_filter_unittest.cc',
443 'base/ssl_config_service_unittest.cc',
444 ],
445 },
446 ],
447 [ 'OS == "mac"', {
448 'sources!': [
449 'base/ssl_config_service_unittest.cc',
450 ],
451 },
452 ],
453 # This is needed to trigger the dll copy step on windows.
454 # TODO(mark): Specifying this here shouldn't be necessary.
455 [ 'OS == "win"', {
456 'dependencies': [
457 '../third_party/icu38/icu38.gyp:icudata',
458 ],
459 },
460 ],
461 ],
462 },
463 {
464 'target_name': 'net_perftests',
465 'type': 'executable',
466 'dependencies': [
467 'net',
468 '../base/base.gyp:base',
469 '../testing/gtest.gyp:gtest',
470 ],
471 'sources': [
472 '../base/perftimer.cc',
473 '../base/run_all_perftests.cc',
474 'base/cookie_monster_perftest.cc',
475 'disk_cache/disk_cache_perftest.cc',
476 'disk_cache/disk_cache_test_util.cc',
477 ],
478 'conditions': [
479 # This is needed to trigger the dll copy step on windows.
480 # TODO(mark): Specifying this here shouldn't be necessary.
481 [ 'OS == "win"', {
482 'dependencies': [
483 '../third_party/icu38/icu38.gyp:icudata',
484 ],
485 },
486 ],
487 ],
488 },
489 {
490 'target_name': 'stress_cache',
491 'type': 'executable',
492 'dependencies': [
493 'net',
494 '../base/base.gyp:base',
495 ],
496 'sources': [
497 'disk_cache/disk_cache_test_util.cc',
498 'disk_cache/stress_cache.cc',
499 ],
500 },
501 {
502 'target_name': 'tld_cleanup',
503 'type': 'executable',
504 'dependencies': [
505 '../base/base.gyp:base',
506 '../build/temp_gyp/googleurl.gyp:googleurl',
507 ],
508 'sources': [
509 'tools/tld_cleanup/tld_cleanup.cc',
510 ],
511 },
512 {
513 'target_name': 'crash_cache',
514 'type': 'executable',
515 'dependencies': [
516 'net',
517 '../base/base.gyp:base',
518 ],
519 'sources': [
520 'tools/crash_cache/crash_cache.cc',
521 'disk_cache/disk_cache_test_util.cc',
522 ],
523 },
524 ],
525 'conditions': [
526 ['OS=="win"', {
527 'targets': [
528 {
529 'target_name': 'net_resources',
530 'type': 'none',
531 'sources': [
532 'base/net_resources.grd',
533 ],
534 #'msvs_tool_files': ['../tools/grit/build/grit_resources.rules'],
535 # This was orignally in grit_resources.rules
536 # NOTE: this version doesn't mimic the Properties specified there.
537 'rules': [
538 {
539 'rule_name': 'grit',
540 'extension': 'grd',
541 'inputs': [
542 '<(DEPTH)/tools/grit/grit.py',
543 ],
544 'outputs': [
545 '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources/<(RULE_INPUT_ROOT).h',
546 ],
547 'action':
548 ['python', '<(DEPTH)/tools/grit/grit.py', '-i', '<(RULE_INPUT_PATH)', 'build', '-o', '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources'],
549 },
550 ],
551 'direct_dependent_settings': {
552 'include_dirs': [
553 '<(SHARED_INTERMEDIATE_DIR)/grit_derived_sources',
554 ],
555 },
556 },
557 {
558 # TODO(port): dump_cache is still Windows-specific.
559 'target_name': 'dump_cache',
560 'type': 'executable',
561 'dependencies': [
562 'net',
563 '../base/base.gyp:base',
564 ],
565 'sources': [
566 'tools/dump_cache/dump_cache.cc',
567 'tools/dump_cache/dump_files.cc',
568 'tools/dump_cache/upgrade.cc',
569 ],
570 },
571 ],
572 }],
573 ['OS=="linux"', {
574 'targets': [
575 {
576 'target_name': 'net_resources',
577 'type': 'resource',
578 'sources': [
579 'base/net_resources.grd',
580 '../../grit_derived_sources/effective_tld_names_clean.dat',
581 ],
582 'direct_dependent_settings': {
583 'include_dirs': [
584 '../../grit_derived_sources'
585 # FIXME: Should use one of the INTERMEDIATE dirs, e.g.:
586 # '$(obj)/gen'
587 ],
588 },
589 'actions': [
590 {
591 'action_name': 'net_resources_h',
592 'inputs': [
593 'tld_cleanup',
594 'base/effective_tld_names.dat',
595 ],
596 'outputs': [
597 '../../grit_derived_sources/effective_tld_names_clean.dat',
598 ],
599 # An 'action' like this would expand things at gyp time:
600 #'action': 'tld_cleanup <@(_inputs) <@(_outputs)',
601 # But that doesn't work well with the SCons variant dir
602 # stuff that builds everything underneath Hammer. Just
603 # put a SCons string in the action, at least for now.
604 'action': ['${SOURCES[0]}', '${SOURCES[1]}', '$TARGET'],
605 }
606 ],
607 },
608 ],
609 }],
610 ],
611}