OLD | NEW |
| (Empty) |
1 # Copyright (c) 2006-2008 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 __doc__ = """ | |
6 Configuration for building net.lib / libnet.a. | |
7 """ | |
8 | |
9 Import('env') | |
10 | |
11 env = env.Clone() | |
12 | |
13 env.ApplySConscript([ | |
14 '$BZIP2_DIR/using_bzip2.scons', | |
15 '$CHROME_SRC_DIR/build/using_googleurl.scons', | |
16 '$CHROME_SRC_DIR/build/using_v8.scons', | |
17 '$GRIT_DIR/build/using_generated_resources.scons', | |
18 '$GTEST_DIR/../using_gtest.scons', | |
19 '$ICU38_DIR/using_icu38.scons', | |
20 '$MODP_B64_DIR/using_modp_b64.scons', | |
21 '$SDCH_DIR/using_sdch.scons', | |
22 '$ZLIB_DIR/using_zlib.scons', | |
23 ]) | |
24 | |
25 input_files = ChromeFileList([ | |
26 MSVSFilter('base', [ | |
27 'base/address_list.cc', | |
28 'base/address_list.h', | |
29 'base/auth.h', | |
30 'base/base64.cc', | |
31 'base/base64.h', | |
32 'base/bzip2_filter.cc', | |
33 'base/bzip2_filter.h', | |
34 'base/cert_status_flags.cc', | |
35 'base/cert_status_flags.h', | |
36 'base/cert_verifier.cc', | |
37 'base/cert_verifier.h', | |
38 'base/cert_verify_result.h', | |
39 'base/client_socket.cc', | |
40 'base/client_socket.h', | |
41 'base/client_socket_factory.cc', | |
42 'base/client_socket_factory.h', | |
43 'base/client_socket_handle.cc', | |
44 'base/client_socket_handle.h', | |
45 'base/client_socket_pool.cc', | |
46 'base/client_socket_pool.h', | |
47 'base/completion_callback.h', | |
48 'base/connection_type_histograms.cc', | |
49 'base/connection_type_histograms.h', | |
50 'base/cookie_monster.cc', | |
51 'base/cookie_monster.h', | |
52 'base/cookie_policy.cc', | |
53 'base/cookie_policy.h', | |
54 'base/data_url.cc', | |
55 'base/data_url.h', | |
56 'base/directory_lister.cc', | |
57 'base/directory_lister.h', | |
58 'base/dns_resolution_observer.cc', | |
59 'base/dns_resolution_observer.h', | |
60 'base/effective_tld_names.cc', | |
61 'base/escape.cc', | |
62 'base/escape.h', | |
63 'base/ev_root_ca_metadata.cc', | |
64 'base/ev_root_ca_metadata.h', | |
65 'base/file_stream.h', | |
66 'base/file_stream_win.cc', | |
67 'base/filter.cc', | |
68 'base/filter.h', | |
69 'base/gzip_filter.cc', | |
70 'base/gzip_filter.h', | |
71 'base/gzip_header.cc', | |
72 'base/gzip_header.h', | |
73 'base/host_resolver.cc', | |
74 'base/host_resolver.h', | |
75 'base/io_buffer.cc', | |
76 'base/io_buffer.h', | |
77 'base/listen_socket.cc', | |
78 'base/listen_socket.h', | |
79 'base/load_flags.h', | |
80 'base/mime_sniffer.cc', | |
81 'base/mime_sniffer.h', | |
82 'base/mime_util.cc', | |
83 'base/mime_util.h', | |
84 'base/net_error_list.h', | |
85 'base/net_errors.cc', | |
86 'base/net_errors.h', | |
87 'base/net_module.cc', | |
88 'base/net_module.h', | |
89 'base/net_resources.h', | |
90 'base/net_util.cc', | |
91 'base/net_util.h', | |
92 'base/net_util_win.cc', | |
93 'base/platform_mime_util.h', | |
94 'base/platform_mime_util_win.cc', | |
95 'build/precompiled_net.cc', | |
96 'build/precompiled_net.h', | |
97 'base/registry_controlled_domain.cc', | |
98 'base/registry_controlled_domain.h', | |
99 'base/scoped_cert_chain_context.h', | |
100 'base/sdch_filter.cc', | |
101 'base/sdch_filter.h', | |
102 'base/sdch_manager.cc', | |
103 'base/sdch_manager.h', | |
104 'base/socket.h', | |
105 'base/ssl_client_socket.h', | |
106 'base/ssl_client_socket_win.cc', | |
107 'base/ssl_client_socket_win.h', | |
108 'base/ssl_config_service.cc', | |
109 'base/ssl_config_service.h', | |
110 'base/ssl_info.h', | |
111 'base/ssl_test_util.cc', | |
112 'base/tcp_client_socket.h', | |
113 'base/tcp_client_socket_win.cc', | |
114 'base/telnet_server.cc', | |
115 'base/telnet_server.h', | |
116 'base/upload_data.cc', | |
117 'base/upload_data.h', | |
118 'base/upload_data_stream.cc', | |
119 'base/upload_data_stream.h', | |
120 'base/wininet_util.cc', | |
121 'base/wininet_util.h', | |
122 'base/winsock_init.cc', | |
123 'base/winsock_init.h', | |
124 'base/x509_certificate.cc', | |
125 'base/x509_certificate.h', | |
126 'base/x509_certificate_win.cc', | |
127 ]), | |
128 MSVSFilter('url_request', [ | |
129 'url_request/mime_sniffer_proxy.cc', | |
130 'url_request/mime_sniffer_proxy.h', | |
131 'url_request/url_request.cc', | |
132 'url_request/url_request.h', | |
133 'url_request/url_request_about_job.cc', | |
134 'url_request/url_request_about_job.h', | |
135 'url_request/url_request_context.h', | |
136 'url_request/url_request_error_job.cc', | |
137 'url_request/url_request_error_job.h', | |
138 'url_request/url_request_file_dir_job.cc', | |
139 'url_request/url_request_file_dir_job.h', | |
140 'url_request/url_request_file_job.cc', | |
141 'url_request/url_request_file_job.h', | |
142 'url_request/url_request_filter.cc', | |
143 'url_request/url_request_filter.h', | |
144 'url_request/url_request_ftp_job.cc', | |
145 'url_request/url_request_ftp_job.h', | |
146 'url_request/url_request_http_job.cc', | |
147 'url_request/url_request_http_job.h', | |
148 'url_request/url_request_inet_job.cc', | |
149 'url_request/url_request_inet_job.h', | |
150 'url_request/url_request_job.cc', | |
151 'url_request/url_request_job.h', | |
152 'url_request/url_request_job_manager.cc', | |
153 'url_request/url_request_job_manager.h', | |
154 'url_request/url_request_job_metrics.cc', | |
155 'url_request/url_request_job_metrics.h', | |
156 'url_request/url_request_job_tracker.cc', | |
157 'url_request/url_request_job_tracker.h', | |
158 'url_request/url_request_new_ftp_job.cc', | |
159 'url_request/url_request_new_ftp_job.h', | |
160 'url_request/url_request_simple_job.cc', | |
161 'url_request/url_request_simple_job.h', | |
162 'url_request/url_request_status.h', | |
163 'url_request/url_request_test_job.cc', | |
164 'url_request/url_request_test_job.h', | |
165 'url_request/url_request_view_cache_job.cc', | |
166 'url_request/url_request_view_cache_job.h', | |
167 ]), | |
168 MSVSFilter('http', [ | |
169 'http/des.cc', | |
170 'http/des.h', | |
171 'http/http_atom_list.h', | |
172 'http/http_auth.cc', | |
173 'http/http_auth.h', | |
174 'http/http_auth_cache.cc', | |
175 'http/http_auth_cache.h', | |
176 'http/http_auth_handler.h', | |
177 'http/http_auth_handler.cc', | |
178 'http/http_auth_handler_basic.cc', | |
179 'http/http_auth_handler_basic.h', | |
180 'http/http_auth_handler_digest.cc', | |
181 'http/http_auth_handler_digest.h', | |
182 'http/http_auth_handler_ntlm.cc', | |
183 'http/http_auth_handler_ntlm.h', | |
184 'http/http_cache.cc', | |
185 'http/http_cache.h', | |
186 'http/http_chunked_decoder.cc', | |
187 'http/http_chunked_decoder.h', | |
188 'http/http_network_layer.cc', | |
189 'http/http_network_layer.h', | |
190 'http/http_network_session.h', | |
191 'http/http_network_transaction.cc', | |
192 'http/http_network_transaction.h', | |
193 'http/http_request_info.h', | |
194 'http/http_response_headers.cc', | |
195 'http/http_response_headers.h', | |
196 'http/http_response_info.cc', | |
197 'http/http_response_info.h', | |
198 'http/http_transaction.h', | |
199 'http/http_transaction_factory.h', | |
200 'http/http_util.cc', | |
201 'http/http_util.h', | |
202 'http/http_vary_data.cc', | |
203 'http/http_vary_data.h', | |
204 'http/md4.cc', | |
205 'http/md4.h', | |
206 ]), | |
207 MSVSFilter('disk_cache', [ | |
208 'disk_cache/addr.cc', | |
209 'disk_cache/addr.h', | |
210 'disk_cache/backend_impl.cc', | |
211 'disk_cache/backend_impl.h', | |
212 'disk_cache/block_files.cc', | |
213 'disk_cache/block_files.h', | |
214 'disk_cache/cache_util.h', | |
215 'disk_cache/cache_util_win.cc', | |
216 'disk_cache/disk_cache.h', | |
217 'disk_cache/disk_format.h', | |
218 'disk_cache/entry_impl.cc', | |
219 'disk_cache/entry_impl.h', | |
220 'disk_cache/errors.h', | |
221 'disk_cache/eviction.cc', | |
222 'disk_cache/eviction.h', | |
223 'disk_cache/file.h', | |
224 'disk_cache/file_block.h', | |
225 'disk_cache/file_lock.cc', | |
226 'disk_cache/file_lock.h', | |
227 'disk_cache/file_win.cc', | |
228 'disk_cache/hash.cc', | |
229 'disk_cache/hash.h', | |
230 'disk_cache/mapped_file.h', | |
231 'disk_cache/mapped_file_win.cc', | |
232 'disk_cache/mem_backend_impl.cc', | |
233 'disk_cache/mem_backend_impl.h', | |
234 'disk_cache/mem_entry_impl.cc', | |
235 'disk_cache/mem_entry_impl.h', | |
236 'disk_cache/mem_rankings.cc', | |
237 'disk_cache/mem_rankings.h', | |
238 'disk_cache/rankings.cc', | |
239 'disk_cache/rankings.h', | |
240 'disk_cache/stats.cc', | |
241 'disk_cache/stats.h', | |
242 'disk_cache/stats_histogram.cc', | |
243 'disk_cache/stats_histogram.h', | |
244 'disk_cache/storage_block-inl.h', | |
245 'disk_cache/storage_block.h', | |
246 'disk_cache/trace.cc', | |
247 'disk_cache/trace.h', | |
248 ]), | |
249 MSVSFilter('proxy', [ | |
250 'proxy/proxy_config.cc', | |
251 'proxy/proxy_config.h', | |
252 'proxy/proxy_config_service.h', | |
253 'proxy/proxy_config_service_fixed.h', | |
254 'proxy/proxy_config_service_win.cc', | |
255 'proxy/proxy_config_service_win.h', | |
256 'proxy/proxy_info.cc', | |
257 'proxy/proxy_info.h', | |
258 'proxy/proxy_list.cc', | |
259 'proxy/proxy_list.h', | |
260 'proxy/proxy_resolver.h', | |
261 'proxy/proxy_resolver_script.h', | |
262 'proxy/proxy_resolver_v8.cc', | |
263 'proxy/proxy_resolver_winhttp.cc', | |
264 'proxy/proxy_resolver_winhttp.h', | |
265 'proxy/proxy_retry_info.h', | |
266 'proxy/proxy_script_fetcher.cc', | |
267 'proxy/proxy_script_fetcher.h', | |
268 'proxy/proxy_server.cc', | |
269 'proxy/proxy_server.h', | |
270 'proxy/proxy_service.cc', | |
271 'proxy/proxy_service.h', | |
272 ]), | |
273 MSVSFilter('ftp', [ | |
274 'ftp/ftp_auth_cache.cc', | |
275 'ftp/ftp_auth_cache.h', | |
276 'ftp/ftp_directory_parser.cc', | |
277 'ftp/ftp_directory_parser.h', | |
278 'ftp/ftp_network_layer.cc', | |
279 'ftp/ftp_network_layer.h', | |
280 'ftp/ftp_network_session.h', | |
281 'ftp/ftp_network_transaction.cc', | |
282 'ftp/ftp_network_transaction.h', | |
283 'ftp/ftp_request_info.h', | |
284 'ftp/ftp_response_info.h', | |
285 'ftp/ftp_transaction.h', | |
286 'ftp/ftp_transaction_factory.h', | |
287 ]), | |
288 ]) | |
289 | |
290 if env.Bit('posix'): | |
291 # Remove files that still need to be ported from the input_files list. | |
292 # TODO(port): delete files from this list as they get ported. | |
293 input_files.Remove( | |
294 'base/ssl_config_service.cc', | |
295 'url_request/url_request_ftp_job.cc', | |
296 ) | |
297 | |
298 if not env.Bit('windows'): | |
299 # Remove windows-specific files on non-Windows platforms. | |
300 # TODO(sgk): | |
301 # Remove the windows-specific files from the input_files list above | |
302 # and turn this back in to an add-on-Windows list (like we used to) | |
303 # once we're comfortable re-ordering the files in the generated | |
304 # .vcproj file(s). | |
305 input_files.Remove( | |
306 'base/file_stream_win.cc', | |
307 'base/net_util_win.cc', | |
308 'base/platform_mime_util_win.cc', | |
309 'base/ssl_client_socket_win.cc', | |
310 'base/tcp_client_socket_win.cc', | |
311 'base/wininet_util.cc', | |
312 'base/winsock_init.cc', | |
313 'base/x509_certificate_win.cc', | |
314 'build/precompiled_net.cc', | |
315 'disk_cache/cache_util_win.cc', | |
316 'disk_cache/file_win.cc', | |
317 'disk_cache/mapped_file_win.cc', | |
318 'proxy/proxy_config_service_win.cc', | |
319 'proxy/proxy_resolver_winhttp.cc', | |
320 'url_request/url_request_inet_job.cc', | |
321 ) | |
322 | |
323 if env.Bit('mac'): | |
324 input_files.Extend([ | |
325 'base/platform_mime_util_mac.cc', | |
326 'base/ssl_client_socket_mac.cc', | |
327 'base/x509_certificate_mac.cc', | |
328 'proxy/proxy_resolver_mac.cc', | |
329 ]) | |
330 | |
331 if env.Bit('linux'): | |
332 input_files.Extend([ | |
333 'base/nss_memio.c', | |
334 # TODO(tc): gnome-vfs? xdgmime? /etc/mime.types? | |
335 'base/platform_mime_util_linux.cc', | |
336 'base/ssl_client_socket_nss.cc', | |
337 'base/x509_certificate_nss.cc', | |
338 ]) | |
339 | |
340 if env.Bit('posix'): | |
341 input_files.Extend([ | |
342 'base/file_stream_posix.cc', | |
343 'base/net_util_posix.cc', | |
344 'base/tcp_client_socket_libevent.cc', | |
345 'disk_cache/cache_util_posix.cc', | |
346 'disk_cache/file_posix.cc', | |
347 'disk_cache/mapped_file_posix.cc', | |
348 ]) | |
349 | |
350 if env.Bit('windows'): | |
351 # TODO(bradnelson): This step generates file precompiled_net.pch.ib_tag | |
352 # possibly only on incredibuild, scons doesn't know this. | |
353 env_p = env.Clone() | |
354 # TODO(sgk): for now, add the same _LIB flag that Hammer adds to | |
355 # the other .obj files | |
356 env_p.Append(CCFLAGS='/Ylnet', | |
357 CPPDEFINES=['_LIB']) | |
358 pch, obj = env_p.PCH('precompiled_net.pch', 'build/precompiled_net.cc') | |
359 env['PCH'] = pch | |
360 env['PCHSTOP'] = 'precompiled_net.h' | |
361 env.Append(CCPCHFLAGS = ['/FIprecompiled_net.h']) | |
362 input_files.Replace('build/precompiled_net.cc', obj) | |
363 | |
364 lib = env.ChromeLibrary('net', input_files) | |
365 | |
366 p = env.ChromeMSVSProject('$NET_DIR/build/net.vcproj', | |
367 dest='$CHROME_SRC_DIR/net/build/net.vcproj', | |
368 guid='{326E9795-E760-410A-B69A-3F79DB3F5243}', | |
369 keyword='Win32Proj', | |
370 dependencies = [ | |
371 '$NET_DIR/build/net_resources.vcproj', | |
372 '$NET_DIR/build/tld_cleanup.vcproj', | |
373 ], | |
374 # TODO: restore when we can derive all info, | |
375 # on all platforms, from the windows build targets. | |
376 #buildtargets=[lib[0]], | |
377 files=input_files, | |
378 ConfigurationType='4') | |
379 | |
380 p.AddToolFile('build/convert_tld_data.rules') | |
381 | |
382 p.AddConfig('Debug|Win32', | |
383 InheritedPropertySheets=[ | |
384 '$(SolutionDir)../build/debug.vsprops', | |
385 './net.vsprops', | |
386 ], | |
387 tools=[ | |
388 'VCPreBuildEventTool', | |
389 'VCCustomBuildTool', | |
390 'Convert TLD Data File', | |
391 'VCXMLDataGeneratorTool', | |
392 'VCWebServiceProxyGeneratorTool', | |
393 'VCMIDLTool', | |
394 MSVSTool('VCCLCompilerTool', | |
395 PrecompiledHeaderThrough='precompiled_net.h', | |
396 ForcedIncludeFiles='precompiled_net.h', | |
397 UsePrecompiledHeader='2'), | |
398 'VCManagedResourceCompilerTool', | |
399 'VCResourceCompilerTool', | |
400 'VCPreLinkEventTool', | |
401 'VCLibrarianTool', | |
402 'VCALinkTool', | |
403 'VCXDCMakeTool', | |
404 'VCBscMakeTool', | |
405 'VCFxCopTool', | |
406 'VCPostBuildEventTool', | |
407 ]) | |
408 | |
409 p.AddConfig('Release|Win32', | |
410 InheritedPropertySheets=[ | |
411 '$(SolutionDir)../build/release.vsprops', | |
412 './net.vsprops', | |
413 ], | |
414 tools=[ | |
415 'VCPreBuildEventTool', | |
416 'VCCustomBuildTool', | |
417 'Convert TLD Data File', | |
418 'VCXMLDataGeneratorTool', | |
419 'VCWebServiceProxyGeneratorTool', | |
420 'VCMIDLTool', | |
421 'VCCLCompilerTool', | |
422 'VCManagedResourceCompilerTool', | |
423 'VCResourceCompilerTool', | |
424 'VCPreLinkEventTool', | |
425 'VCLibrarianTool', | |
426 'VCALinkTool', | |
427 'VCXDCMakeTool', | |
428 'VCBscMakeTool', | |
429 'VCFxCopTool', | |
430 'VCPostBuildEventTool', | |
431 ]) | |
432 | |
433 # TODO(sgk): remove when we can derive this information | |
434 p.AddFileConfig('build/precompiled_net.cc', | |
435 'Debug|Win32', | |
436 tools=[ | |
437 MSVSTool('VCCLCompilerTool', | |
438 UsePrecompiledHeader='1'), | |
439 ]) | |
440 | |
441 # TODO(sgk): remove when we can derive this information | |
442 p.AddFileConfig('build/precompiled_net.cc', | |
443 'Release|Win32', | |
444 ExcludedFromBuild='true', | |
445 tools=[ | |
446 'VCCLCompilerTool', | |
447 ]) | |
OLD | NEW |