summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 20:24:56 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 20:24:56 +0000
commit4c75444536c32d6f57801ab73129e90b93db0605 (patch)
treecf468f03b60942cbccd8a166713cf39a610f0131
parentad11a576675dba34fe8f84f2abe6d1fed793b874 (diff)
downloadchromium_src-4c75444536c32d6f57801ab73129e90b93db0605.zip
chromium_src-4c75444536c32d6f57801ab73129e90b93db0605.tar.gz
chromium_src-4c75444536c32d6f57801ab73129e90b93db0605.tar.bz2
SCons renaming updates for base, net and googleurl:
* Rename SConscript files to {module}.scons or {moduel}_lib.scons, depending on the primary target involved. * Separate targets into individual *.scons files, with one construction environment (named "env") per *.scons file. * Add using_{module}.scons files (like .vsprops) that will be used by other modules to add CPPDEFINES, CPPPATH, LIBS and LIBPATH values. * Update other modules' *.scons files to use the new using_{module}.scons files (using a temporary one-liner idiom until we have the ApplySConscript() method from the Hammer modules). * Use the idiom of removing to-be-ported files from the master list, so they can be simply deleted from the to-be-ported list as they get ported in the future, instead of having to shuffle entries between lists. * Use $OBJ_ROOT instead of hard-coded '#/$BUILD_TYPE/' for the $*_DIR variables. * Add a addRepository() call mapping build/ to $TARGET_ROOT/googleurl, so its $OBJ_ROOT value can look like the others'. * Formatting changes, primarily modifying indentation to conform to style guidelines. * Fix copyright headers in some third_party/* modules previously overlooked. * Add rudimentary __doc__ strings, setting up for a future ability to generate meaningful documentation. Review URL: http://codereview.chromium.org/7807 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3675 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/SConscript360
-rw-r--r--base/base.scons19
-rw-r--r--base/base_lib.scons188
-rw-r--r--base/base_unittests.scons171
-rw-r--r--base/gfx/SConscript77
-rw-r--r--base/gfx/base_gfx.scons79
-rw-r--r--base/gfx/using_base_gfx.scons15
-rw-r--r--base/using_base.scons15
-rw-r--r--build/SConscript.googleurl95
-rw-r--r--build/SConscript.main36
-rw-r--r--build/googleurl.scons18
-rw-r--r--build/googleurl_lib.scons49
-rw-r--r--build/googleurl_unittests.scons45
-rw-r--r--build/using_googleurl.scons15
-rw-r--r--net/SConscript356
-rw-r--r--net/crash_cache.scons64
-rw-r--r--net/net.scons39
-rw-r--r--net/net_lib.scons191
-rw-r--r--net/net_perftests.scons76
-rw-r--r--net/net_resources.scons41
-rw-r--r--net/net_unittests.scons125
-rw-r--r--net/stress_cache.scons62
-rw-r--r--net/tools/tld_cleanup/SConscript52
-rw-r--r--net/tools/tld_cleanup/tld_cleanup.scons54
-rw-r--r--net/using_net.scons15
-rw-r--r--sdch/using_sdch.scons18
-rw-r--r--skia/SConscript2
-rw-r--r--skia/using_skia.scons20
-rw-r--r--testing/using_gtest.scons22
-rw-r--r--third_party/bzip2/SConscript60
-rw-r--r--third_party/bzip2/bzip2.scons38
-rw-r--r--third_party/bzip2/using_bzip2.scons15
-rw-r--r--third_party/libevent/libevent.scons (renamed from third_party/libevent/SConscript)10
-rw-r--r--third_party/libevent/using_libevent.scons15
-rw-r--r--third_party/libpng/SConscript77
-rw-r--r--third_party/libpng/libpng.scons59
-rw-r--r--third_party/libpng/using_libpng.scons22
-rw-r--r--third_party/modp_b64/SConscript46
-rw-r--r--third_party/modp_b64/modp_b64.scons25
-rw-r--r--third_party/modp_b64/using_modp_b64.scons15
-rw-r--r--third_party/zlib/SConscript58
-rw-r--r--third_party/zlib/using_zlib.scons18
-rw-r--r--third_party/zlib/zlib.scons36
43 files changed, 1606 insertions, 1207 deletions
diff --git a/base/SConscript b/base/SConscript
deleted file mode 100644
index fbb0516..0000000
--- a/base/SConscript
+++ /dev/null
@@ -1,360 +0,0 @@
-# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-Import('env')
-
-env = env.Clone()
-env_tests = env.Clone()
-
-env.Prepend(
- CPPPATH = [
- '$ICU38_DIR/public/common',
- '$ICU38_DIR/public/i18n',
- '..',
- ],
- CPPDEFINES = [
- 'U_STATIC_IMPLEMENTATION',
- ],
-)
-
-if env['PLATFORM'] == 'win32':
- env.Prepend(
- CCFLAGS = [
- '/TP',
- '/Wp64',
- ],
- )
-
-# These base files work on *all* platforms; files that don't work
-# cross-platform live below.
-input_files = [
- 'at_exit.cc',
- 'base_paths.cc',
- 'base_switches.cc',
- 'bzip2_error_handler.cc',
- 'command_line.cc',
- 'debug_util.cc',
- 'field_trial.cc',
- 'file_path.cc',
- 'file_util.cc',
- 'histogram.cc',
- 'icu_util.cc',
- 'json_reader.cc',
- 'json_writer.cc',
- 'lazy_instance.cc',
- 'lock.cc',
- 'logging.cc',
- 'md5.cc',
- 'memory_debug.cc',
- 'message_loop.cc',
- 'message_pump_default.cc',
- 'non_thread_safe.cc',
- 'path_service.cc',
- 'pickle.cc',
- 'rand_util.cc',
- 'ref_counted.cc',
- 'revocable_store.cc',
- 'sha2.cc',
- 'simple_thread.cc',
- 'stats_table.cc',
- 'string_escape.cc',
- 'string_piece.cc',
- 'string_util.cc',
- 'string_util_icu.cc',
- 'system_monitor.cc',
- 'thread.cc',
- 'time.cc',
- 'time_format.cc',
- 'timer.cc',
- 'trace_event.cc',
- 'tracked.cc',
- 'tracked_objects.cc',
- 'values.cc',
- 'word_iterator.cc',
- 'third_party/nspr/prtime.cc',
- 'third_party/nss/sha512.cc',
-]
-
-if env['PLATFORM'] == 'win32':
- # Some of these aren't really Windows-specific, they're just here until
- # we have the port versions working.
- # TODO: move all these files to either the cross-platform block above or
- # a platform-specific block below.
- input_files.extend([
- 'clipboard_util.cc',
- 'event_recorder.cc',
- 'file_version_info.cc',
-
- # This group all depends on MessageLoop.
- 'idle_timer.cc',
- 'object_watcher.cc',
- 'watchdog.cc',
-
- 'resource_util.cc', # Uses HMODULE, but may be abstractable.
- ])
-
-if env['PLATFORM'] == 'win32':
- input_files.extend([
- 'base_drag_source.cc',
- 'base_drop_target.cc',
- 'base_paths_win.cc',
- 'clipboard_win.cc',
- 'condition_variable_win.cc',
- 'cpu.cc',
- 'debug_on_start.cc',
- 'debug_util_win.cc',
- 'directory_watcher_win.cc',
- 'file_util_win.cc',
- 'hmac_win.cc',
- 'iat_patch.cc',
- 'image_util.cc',
- 'lock_impl_win.cc',
- 'message_pump_win.cc',
- 'pe_image.cc',
- 'platform_thread_win.cc',
- 'process_util_win.cc',
- 'process_win.cc',
- 'rand_util_win.cc',
- 'registry.cc',
- 'shared_memory_win.cc',
- 'sys_info_win.cc',
- 'sys_string_conversions_win.cc',
- 'system_monitor_win.cc',
- 'thread_local_storage_win.cc',
- 'thread_local_win.cc',
- 'time_win.cc',
- 'waitable_event_win.cc',
- 'win_util.cc',
- 'wmi_util.cc',
- 'worker_pool.cc',
- ])
-
-if env['PLATFORM'] in ('darwin', 'posix'):
- input_files.extend([
- 'condition_variable_posix.cc',
- 'debug_util_posix.cc',
- 'file_util_posix.cc',
- 'lock_impl_posix.cc',
- 'message_pump_libevent.cc',
- 'platform_thread_posix.cc',
- 'process_util_posix.cc',
- 'rand_util_posix.cc',
- 'shared_memory_posix.cc',
- 'string16.cc',
- 'sys_info_posix.cc',
- 'thread_local_storage_posix.cc',
- 'thread_local_posix.cc',
- 'time_posix.cc',
- 'waitable_event_generic.cc',
- ])
-
-if env['PLATFORM'] == 'darwin':
- input_files.extend([
- 'base_paths_mac.mm',
- 'clipboard_mac.mm',
- 'file_util_mac.mm',
- 'file_version_info_mac.mm',
- 'hmac_mac.cc',
- 'message_pump_mac.mm',
- 'platform_thread_mac.mm',
- 'scoped_nsautorelease_pool.mm',
- 'sys_string_conversions_mac.mm',
- 'worker_pool_mac.mm',
- ])
-
-if env['PLATFORM'] == 'posix':
- input_files.extend([
- 'atomicops_internals_x86_gcc.cc',
- 'base_paths_linux.cc',
- 'clipboard_linux.cc',
- 'file_util_linux.cc',
- 'hmac_nss.cc',
- 'message_pump_glib.cc',
- 'nss_init.cc',
- 'process_posix.cc',
- 'process_util_linux.cc',
- 'sys_string_conversions_linux.cc',
- 'worker_pool.cc',
- ])
-
-env.ChromeStaticLibrary('base', input_files)
-
-
-env_tests.Prepend(
- CPPPATH = [
- '$GTEST_DIR/include',
- '$GTEST_DIR',
- '$SKIA_DIR/include',
- '$SKIA_DIR/include/corecg',
- '$SKIA_DIR/platform',
- '$ZLIB_DIR',
- '$LIBPNG_DIR',
- '$ICU38_DIR/public/common',
- '$ICU38_DIR/public/i18n',
- '..',
- ],
- CPPDEFINES = [
- 'UNIT_TEST',
- 'PNG_USER_CONFIG',
- 'CHROME_PNG_WRITE_SUPPORT',
- 'U_STATIC_IMPLEMENTATION',
- 'GOOGLE_CHROME_BUILD',
- ],
- LIBS = [
- 'base',
- 'base_gfx',
- 'gtest',
- env_tests['ICU_LIBS'], # TODO(sgk): '$ICU_LIBS' when scons is fixed
- 'libpng',
- 'skia',
- 'zlib',
- ]
-)
-
-env_tests.Append(
- CPPPATH = [
- '$GTEST_DIR/include',
- ],
-)
-
-if env['PLATFORM'] == 'win32':
- env_tests.Prepend(
- CCFLAGS = [
- '/TP',
- '/WX',
- ],
- CPPDEFINES = [
- '_WIN32_WINNT=0x0600',
- 'WINVER=0x0600',
- '_HAS_EXCEPTIONS=0',
- ],
- LINKFLAGS = [
- '/MANIFEST',
- '/DELAYLOAD:"dwmapi.dll"',
- '/DELAYLOAD:"uxtheme.dll"',
- '/MACHINE:X86',
- '/FIXED:No',
-
- '/safeseh',
- '/dynamicbase',
- '/ignore:4199',
- '/nxcompat',
- ],
- )
-
-if env['PLATFORM'] in ('posix', 'darwin'):
- env_tests.Append(
- LIBS = [
- 'event',
- ],
- )
-
-# These test files work on *all* platforms; tests that don't work
-# cross-platform live below.
-test_files = [
- 'at_exit_unittest.cc',
- 'atomicops_unittest.cc',
- 'clipboard_unittest.cc',
- 'command_line_unittest.cc',
- 'condition_variable_unittest.cc',
- 'field_trial_unittest.cc',
- 'file_path_unittest.cc',
- 'file_util_unittest.cc',
- 'hmac_unittest.cc',
- 'histogram_unittest.cc',
- 'json_reader_unittest.cc',
- 'json_writer_unittest.cc',
- 'lazy_instance_unittest.cc',
- 'linked_ptr_unittest.cc',
- 'message_loop_unittest.cc',
- 'observer_list_unittest.cc',
- 'path_service_unittest.cc',
- 'pickle_unittest.cc',
- 'pr_time_unittest.cc',
- 'rand_util_unittest.cc',
- 'ref_counted_unittest.cc',
- 'run_all_unittests.cc',
- 'scoped_ptr_unittest.cc',
- 'sha2_unittest.cc',
- 'shared_memory_unittest.cc',
- 'simple_thread_unittest.cc',
- 'singleton_unittest.cc',
- 'stack_container_unittest.cc',
- 'string_escape_unittest.cc',
- 'string_piece_unittest.cc',
- 'string_tokenizer_unittest.cc',
- 'string_util_unittest.cc',
- 'sys_info_unittest.cc',
- 'thread_local_unittest.cc',
- 'thread_local_storage_unittest.cc',
- 'thread_unittest.cc',
- 'time_unittest.cc',
- 'timer_unittest.cc',
- 'tracked_objects_unittest.cc',
- 'tuple_unittest.cc',
- 'values_unittest.cc',
- 'waitable_event_unittest.cc',
- 'word_iterator_unittest.cc',
- 'worker_pool_unittest.cc',
- 'gfx/convolver_unittest.cc',
- 'gfx/image_operations_unittest.cc',
- 'gfx/png_codec_unittest.cc',
- 'gfx/rect_unittest.cc',
-]
-
-if env['PLATFORM'] == 'win32':
- # These tests aren't really Windows-specific, they're just here until
- # we have the port versions working.
- env_tests.ChromeTestProgram('debug_message', ['debug_message.cc'])
-
- test_files.extend([
- 'directory_watcher_unittest.cc',
- 'idletimer_unittest.cc',
- 'process_util_unittest.cc',
- 'stats_table_unittest.cc',
- 'watchdog_unittest.cc',
- 'gfx/native_theme_unittest.cc',
- 'gfx/uniscribe_unittest.cc',
- 'gfx/vector_canvas_unittest.cc',
- ])
-
-if env['PLATFORM'] == 'win32':
- # Windows-specific tests.
- test_files.extend([
- 'file_version_info_unittest.cc',
- 'object_watcher_unittest.cc',
- 'pe_image_unittest.cc',
- 'sys_string_conversions_win_unittest.cc',
- 'time_unittest_win.cc',
- 'win_util_unittest.cc',
- 'wmi_util_unittest.cc',
- ])
-
-if env['PLATFORM'] == 'darwin':
- test_files.extend([
- 'platform_test_mac.mm',
- ])
-
-base_unittests = env_tests.ChromeTestProgram('base_unittests', test_files)
-
-# Install up a level to allow unit test path assumptions to be valid.
-installed_base_unittests = env.Install('$TARGET_ROOT', base_unittests)
-
-
-sconscript_dirs = [
- 'gfx/SConscript',
-]
-
-SConscript(sconscript_dirs, exports=['env'])
-
-
-env.Alias('base', ['.', installed_base_unittests])
-
-# TODO(sgk) should this be moved into base.lib like everything else? This will
-# require updating a bunch of other SConscripts which link directly against
-# this generated object file.
-env_tests.StaticObject('perftimer.cc')
-
-# Since run_all_perftests supplies a main, we cannot have it in base.lib
-env_tests.StaticObject('run_all_perftests.cc')
diff --git a/base/base.scons b/base/base.scons
new file mode 100644
index 0000000..403eb26
--- /dev/null
+++ b/base/base.scons
@@ -0,0 +1,19 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Master configuration for building base components (including base_gfx).
+"""
+
+Import('env')
+
+sconscript_files = [
+ 'base_lib.scons',
+ 'base_unittests.scons',
+ 'gfx/base_gfx.scons',
+]
+
+SConscript(sconscript_files, exports=['env'])
+
+env.Alias('base', '.')
diff --git a/base/base_lib.scons b/base/base_lib.scons
new file mode 100644
index 0000000..b05a980
--- /dev/null
+++ b/base/base_lib.scons
@@ -0,0 +1,188 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building base.lib / libbase.a.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ '$ICU38_DIR/using_icu38.scons',
+], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Prepend(
+ CCFLAGS = [
+ '/TP',
+ '/Wp64',
+ ],
+ )
+
+# These base files work on *all* platforms; files that don't work
+# cross-platform live below.
+input_files = [
+ 'at_exit.cc',
+ 'base_paths.cc',
+ 'base_switches.cc',
+ 'bzip2_error_handler.cc',
+ 'clipboard_util.cc',
+ 'command_line.cc',
+ 'debug_util.cc',
+ 'event_recorder.cc',
+ 'file_path.cc',
+ 'file_util.cc',
+ 'file_version_info.cc',
+ 'histogram.cc',
+ 'icu_util.cc',
+ 'idle_timer.cc',
+ 'json_reader.cc',
+ 'json_writer.cc',
+ 'lazy_instance.cc',
+ 'lock.cc',
+ 'logging.cc',
+ 'md5.cc',
+ 'memory_debug.cc',
+ 'message_loop.cc',
+ 'message_pump_default.cc',
+ 'non_thread_safe.cc',
+ 'object_watcher.cc',
+ 'path_service.cc',
+ 'pickle.cc',
+ 'rand_util.cc',
+ 'ref_counted.cc',
+ 'resource_util.cc',
+ 'revocable_store.cc',
+ 'sha2.cc',
+ 'simple_thread.cc',
+ 'stats_table.cc',
+ 'string_escape.cc',
+ 'string_piece.cc',
+ 'string_util.cc',
+ 'string_util_icu.cc',
+ 'system_monitor.cc',
+ 'third_party/nspr/prtime.cc',
+ 'third_party/nss/sha512.cc',
+ 'thread.cc',
+ 'time.cc',
+ 'time_format.cc',
+ 'timer.cc',
+ 'trace_event.cc',
+ 'tracked.cc',
+ 'tracked_objects.cc',
+ 'values.cc',
+ 'watchdog.cc',
+ 'word_iterator.cc',
+]
+
+if env['PLATFORM'] in ('posix', 'darwin'):
+ # Remove files that still need to be ported from the input_files list.
+ # TODO(port): delete files from this list as they get ported.
+ to_be_ported_files = [
+ 'clipboard_util.cc',
+ 'event_recorder.cc',
+ 'file_version_info.cc',
+
+ # This group all depends on MessageLoop.
+ 'idle_timer.cc',
+ 'object_watcher.cc',
+ 'watchdog.cc',
+
+ 'resource_util.cc', # Uses HMODULE, but may be abstractable.
+ ]
+ for remove in to_be_ported_files:
+ input_files.remove(remove)
+
+if env['PLATFORM'] == 'win32':
+ input_files.extend([
+ 'base_drag_source.cc',
+ 'base_drop_target.cc',
+ 'base_paths_win.cc',
+ 'clipboard_win.cc',
+ 'condition_variable_win.cc',
+ 'cpu.cc',
+ 'debug_on_start.cc',
+ 'debug_util_win.cc',
+ 'file_util_win.cc',
+ 'hmac_win.cc',
+ 'iat_patch.cc',
+ 'image_util.cc',
+ 'lock_impl_win.cc',
+ 'message_pump_win.cc',
+ 'pe_image.cc',
+ 'platform_thread_win.cc',
+ 'process_util_win.cc',
+ 'process_win.cc',
+ 'rand_util_win.cc',
+ 'registry.cc',
+ 'shared_memory_win.cc',
+ 'sys_info_win.cc',
+ 'sys_string_conversions_win.cc',
+ 'system_monitor_win.cc',
+ 'thread_local_storage_win.cc',
+ 'thread_local_win.cc',
+ 'time_win.cc',
+ 'waitable_event_win.cc',
+ 'win_util.cc',
+ 'wmi_util.cc',
+ 'worker_pool.cc',
+ ])
+
+if env['PLATFORM'] in ('darwin', 'posix'):
+ input_files.extend([
+ 'condition_variable_posix.cc',
+ 'debug_util_posix.cc',
+ 'file_util_posix.cc',
+ 'lock_impl_posix.cc',
+ 'message_pump_libevent.cc',
+ 'platform_thread_posix.cc',
+ 'process_util_posix.cc',
+ 'rand_util_posix.cc',
+ 'shared_memory_posix.cc',
+ 'string16.cc',
+ 'sys_info_posix.cc',
+ 'thread_local_storage_posix.cc',
+ 'thread_local_posix.cc',
+ 'time_posix.cc',
+ 'waitable_event_generic.cc',
+ ])
+
+if env['PLATFORM'] == 'darwin':
+ input_files.extend([
+ 'base_paths_mac.mm',
+ 'clipboard_mac.mm',
+ 'file_util_mac.mm',
+ 'file_version_info_mac.mm',
+ 'hmac_mac.cc',
+ 'message_pump_mac.mm',
+ 'platform_thread_mac.mm',
+ 'scoped_nsautorelease_pool.mm',
+ 'sys_string_conversions_mac.mm',
+ 'worker_pool_mac.mm',
+ ])
+
+if env['PLATFORM'] == 'posix':
+ input_files.extend([
+ 'atomicops_internals_x86_gcc.cc',
+ 'base_paths_linux.cc',
+ 'file_util_linux.cc',
+ 'hmac_nss.cc',
+ 'message_pump_glib.cc',
+ 'nss_init.cc',
+ 'process_posix.cc',
+ 'process_util_linux.cc',
+ 'sys_string_conversions_linux.cc',
+ 'worker_pool.cc',
+ ])
+
+base_lib = env.ChromeStaticLibrary('base', input_files)
+env.Alias('base', base_lib)
diff --git a/base/base_unittests.scons b/base/base_unittests.scons
new file mode 100644
index 0000000..fbb7c0c
--- /dev/null
+++ b/base/base_unittests.scons
@@ -0,0 +1,171 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building base_unittests{,.exe}.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ '$BASE_DIR/using_base.scons',
+ '$BASE_DIR/gfx/using_base_gfx.scons',
+ '$GTEST_DIR/../using_gtest.scons',
+ '$ICU38_DIR/using_icu38.scons',
+ '$LIBPNG_DIR/using_libpng.scons',
+ '$SKIA_DIR/using_skia.scons',
+ '$ZLIB_DIR/using_zlib.scons',
+], {'env':env})
+
+if env['PLATFORM'] in ('posix', 'darwin'):
+ env.SConscript([
+ '$LIBEVENT_DIR/using_libevent.scons',
+ ], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+ CPPDEFINES = [
+ 'GOOGLE_CHROME_BUILD',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Prepend(
+ CCFLAGS = [
+ '/TP',
+ '/WX',
+ ],
+ CPPDEFINES = [
+ '_WIN32_WINNT=0x0600',
+ 'WINVER=0x0600',
+ '_HAS_EXCEPTIONS=0',
+ ],
+ LINKFLAGS = [
+ '/MANIFEST',
+ '/DELAYLOAD:"dwmapi.dll"',
+ '/DELAYLOAD:"uxtheme.dll"',
+ '/MACHINE:X86',
+ '/FIXED:No',
+
+ '/safeseh',
+ '/dynamicbase',
+ '/ignore:4199',
+ '/nxcompat',
+ ],
+ )
+
+# These test files work on *all* platforms; tests that don't work
+# cross-platform live below.
+input_files = [
+ 'at_exit_unittest.cc',
+ 'atomicops_unittest.cc',
+ 'clipboard_unittest.cc',
+ 'command_line_unittest.cc',
+ 'condition_variable_unittest.cc',
+ 'file_path_unittest.cc',
+ 'file_util_unittest.cc',
+ 'histogram_unittest.cc',
+ 'hmac_unittest.cc',
+ 'idletimer_unittest.cc',
+ 'json_reader_unittest.cc',
+ 'json_writer_unittest.cc',
+ 'lazy_instance_unittest.cc',
+ 'linked_ptr_unittest.cc',
+ 'message_loop_unittest.cc',
+ 'observer_list_unittest.cc',
+ 'path_service_unittest.cc',
+ 'pickle_unittest.cc',
+ 'pr_time_unittest.cc',
+ 'process_util_unittest.cc',
+ 'rand_util_unittest.cc',
+ 'ref_counted_unittest.cc',
+ 'run_all_unittests.cc',
+ 'scoped_ptr_unittest.cc',
+ 'sha2_unittest.cc',
+ 'shared_memory_unittest.cc',
+ 'simple_thread_unittest.cc',
+ 'singleton_unittest.cc',
+ 'stack_container_unittest.cc',
+ 'stats_table_unittest.cc',
+ 'string_escape_unittest.cc',
+ 'string_piece_unittest.cc',
+ 'string_tokenizer_unittest.cc',
+ 'string_util_unittest.cc',
+ 'sys_info_unittest.cc',
+ 'thread_local_storage_unittest.cc',
+ 'thread_local_unittest.cc',
+ 'thread_unittest.cc',
+ 'time_unittest.cc',
+ 'timer_unittest.cc',
+ 'tracked_objects_unittest.cc',
+ 'tuple_unittest.cc',
+ 'values_unittest.cc',
+ 'waitable_event_unittest.cc',
+ 'watchdog_unittest.cc',
+ 'word_iterator_unittest.cc',
+ 'worker_pool_unittest.cc',
+
+ 'gfx/convolver_unittest.cc',
+ 'gfx/image_operations_unittest.cc',
+ 'gfx/native_theme_unittest.cc',
+ 'gfx/png_codec_unittest.cc',
+ 'gfx/rect_unittest.cc',
+ 'gfx/uniscribe_unittest.cc',
+ 'gfx/vector_canvas_unittest.cc',
+]
+
+if env['PLATFORM'] in ('posix', 'darwin'):
+ #env.ChromeTestProgram('debug_message', ['debug_message.cc'])
+
+ # Remove files that still need to be ported from the input_files list.
+ # TODO(port): delete files from this list as they get ported.
+ to_be_ported_files = [
+ 'clipboard_unittest.cc',
+ 'idletimer_unittest.cc',
+ 'process_util_unittest.cc',
+ 'stats_table_unittest.cc',
+ 'watchdog_unittest.cc',
+ 'gfx/native_theme_unittest.cc',
+ 'gfx/uniscribe_unittest.cc',
+ 'gfx/vector_canvas_unittest.cc',
+ ]
+ for remove in to_be_ported_files:
+ input_files.remove(remove)
+
+if env['PLATFORM'] == 'win32':
+ # Windows-specific tests.
+ input_files.extend([
+ 'file_version_info_unittest.cc',
+ 'object_watcher_unittest.cc',
+ 'pe_image_unittest.cc',
+ 'sys_string_conversions_win_unittest.cc',
+ 'time_unittest_win.cc',
+ 'win_util_unittest.cc',
+ 'wmi_util_unittest.cc',
+ ])
+
+if env['PLATFORM'] == 'darwin':
+ # Mac-specific tests.
+ input_files.extend([
+ 'platform_test_mac.mm',
+ ])
+
+base_unittests = env.ChromeTestProgram('base_unittests', input_files)
+
+# Install up a level to allow unit test path assumptions to be valid.
+installed_base_unittests = env.Install('$TARGET_ROOT', base_unittests)
+
+env.Alias('base', installed_base_unittests)
+
+# TODO(sgk) should this be moved into base.lib like everything else? This will
+# require updating a bunch of other SConscripts which link directly against
+# this generated object file.
+env.StaticObject('perftimer.cc')
+
+# Since run_all_perftests supplies a main, we cannot have it in base.lib
+env.StaticObject('run_all_perftests.cc')
diff --git a/base/gfx/SConscript b/base/gfx/SConscript
deleted file mode 100644
index c862193..0000000
--- a/base/gfx/SConscript
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-Import('env')
-
-env = env.Clone()
-
-# Remove an inherited relative path that doesn't make sense anymore. This
-# makes sure we don't pull in the wrong version of time.h when building on
-# linux.
-env['CPPPATH'].remove('..')
-
-env.Prepend(
- CPPPATH = [
- '$SKIA_DIR/include',
- '$SKIA_DIR/include/corecg',
- '$SKIA_DIR/include/platform',
- '$ZLIB_DIR',
- '$LIBPNG_DIR',
- '$ICU38_DIR/public/common',
- '$ICU38_DIR/public/i18n',
- '../..',
- ],
- CPPDEFINES = [
- 'PNG_USER_CONFIG',
- 'CHROME_PNG_WRITE_SUPPORT',
- 'U_STATIC_IMPLEMENTATION',
- ],
-)
-
-if env['PLATFORM'] == 'win32':
- env.Prepend(
- CCFLAGS = [
- '/TP',
- '/WX',
- ],
- )
-
-input_files = [
- 'convolver.cc',
- 'image_operations.cc',
- 'png_decoder.cc',
- 'png_encoder.cc',
- 'point.cc',
- 'rect.cc',
- 'size.cc',
-]
-
-if env['PLATFORM'] == 'win32':
- # Some of these aren't really Windows-specific, they're just here until
- # we have the port versions working.
- input_files.extend([
- 'font_utils.cc',
- 'gdi_util.cc',
- 'native_theme.cc',
- 'skia_utils.cc',
- 'uniscribe.cc',
- 'vector_canvas.cc',
- 'vector_device.cc',
- ])
-
-if env['PLATFORM'] == 'win32':
- input_files.extend([
- 'bitmap_platform_device_win.cc',
- 'platform_canvas_win.cc',
- 'platform_device_win.cc',
- ])
-elif env['PLATFORM'] == 'posix':
- input_files.extend([
- 'bitmap_platform_device_linux.cc',
- 'platform_canvas_linux.cc',
- 'platform_device_linux.cc',
- ])
-
-env.ChromeStaticLibrary('base_gfx', input_files)
-
diff --git a/base/gfx/base_gfx.scons b/base/gfx/base_gfx.scons
new file mode 100644
index 0000000..9a5e992
--- /dev/null
+++ b/base/gfx/base_gfx.scons
@@ -0,0 +1,79 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building base_gfx.lib / libbase_gfx.a.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ '$ICU38_DIR/using_icu38.scons',
+ '$LIBPNG_DIR/using_libpng.scons',
+ '$SKIA_DIR/using_skia.scons',
+ '$ZLIB_DIR/using_zlib.scons',
+], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Prepend(
+ CCFLAGS = [
+ '/TP',
+ '/WX',
+ ],
+ )
+
+input_files = [
+ 'convolver.cc',
+ 'font_utils.cc',
+ 'gdi_util.cc',
+ 'image_operations.cc',
+ 'native_theme.cc',
+ 'png_decoder.cc',
+ 'png_encoder.cc',
+ 'point.cc',
+ 'rect.cc',
+ 'size.cc',
+ 'skia_utils.cc',
+ 'uniscribe.cc',
+ 'vector_canvas.cc',
+ 'vector_device.cc',
+]
+
+if env['PLATFORM'] in ('posix', 'darwin'):
+ # Remove files that still need to be ported from the input_files list.
+ # TODO(port): delete files from this list as they get ported.
+ to_be_ported_files = [
+ 'font_utils.cc',
+ 'gdi_util.cc',
+ 'native_theme.cc',
+ 'skia_utils.cc',
+ 'uniscribe.cc',
+ 'vector_canvas.cc',
+ 'vector_device.cc',
+ ]
+ for remove in to_be_ported_files:
+ input_files.remove(remove)
+
+if env['PLATFORM'] == 'win32':
+ input_files.extend([
+ 'bitmap_platform_device_win.cc',
+ 'platform_canvas_win.cc',
+ 'platform_device_win.cc',
+ ])
+elif env['PLATFORM'] == 'posix':
+ input_files.extend([
+ 'bitmap_platform_device_linux.cc',
+ 'platform_canvas_linux.cc',
+ 'platform_device_linux.cc',
+ ])
+
+env.ChromeStaticLibrary('base_gfx', input_files)
diff --git a/base/gfx/using_base_gfx.scons b/base/gfx/using_base_gfx.scons
new file mode 100644
index 0000000..a428878
--- /dev/null
+++ b/base/gfx/using_base_gfx.scons
@@ -0,0 +1,15 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Settings for other components using the base_gfx library.
+"""
+
+Import("env")
+
+env.Append(
+ LIBS = [
+ 'base_gfx',
+ ],
+)
diff --git a/base/using_base.scons b/base/using_base.scons
new file mode 100644
index 0000000..f3d58b4
--- /dev/null
+++ b/base/using_base.scons
@@ -0,0 +1,15 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Settings for other components using the base library.
+"""
+
+Import("env")
+
+env.Append(
+ LIBS = [
+ 'base',
+ ],
+)
diff --git a/build/SConscript.googleurl b/build/SConscript.googleurl
index 11ca7c7..e69de29 100644
--- a/build/SConscript.googleurl
+++ b/build/SConscript.googleurl
@@ -1,95 +0,0 @@
-# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-Import('env')
-
-env = env.Clone()
-
-env.Prepend(
- CPPPATH = [
- '$ICU38_DIR/public/common',
- '$ICU38_DIR/public/i18n',
- '#/..',
- ],
-)
-
-env.Append(
- CPPDEFINES = [
- 'U_STATIC_IMPLEMENTATION',
- ],
-)
-
-if env['PLATFORM'] == 'win32':
- env.Append(
- CCFLAGS = [
- '/TP',
- ],
- )
-
-lib_input_files = [
- 'gurl.cc',
- 'url_canon_etc.cc',
- 'url_canon_fileurl.cc',
- 'url_canon_host.cc',
- 'url_canon_icu.cc',
- 'url_canon_internal.cc',
- 'url_canon_ip.cc',
- 'url_canon_mailtourl.cc',
- 'url_canon_path.cc',
- 'url_canon_pathurl.cc',
- 'url_canon_query.cc',
- 'url_canon_relative.cc',
- 'url_canon_stdurl.cc',
- 'url_parse.cc',
- 'url_parse_file.cc',
- 'url_util.cc',
-]
-
-def BuildObjectFiles(environ, input_files):
- obj_files = []
- for input_file in input_files:
- source = '../googleurl/src/' + input_file
- target = '$TARGET_ROOT/googleurl/' + input_file[:input_file.find('.cc')]
- obj_files.append(environ.StaticObject(source = source, target = target))
- return obj_files
-
-env.ChromeStaticLibrary('$TARGET_ROOT/googleurl/googleurl',
- BuildObjectFiles(env, lib_input_files))
-
-env_tests = env.Clone()
-
-env_tests.Append(
- CPPPATH = [
- '$GTEST_DIR/include',
- ],
- CPPDEFINES = [
- 'UNIT_TEST',
- ],
- LIBS = [
- 'googleurl',
- 'base',
- env_tests['ICU_LIBS'], # TODO(sgk): '$ICU_LIBS' when scons is fixed
- 'gtest',
- ]
-)
-
-test_files = [
- 'gurl_unittest.cc',
- 'url_canon_unittest.cc',
- 'url_parse_unittest.cc',
- 'url_util_unittest.cc',
-]
-
-test_obj_files = BuildObjectFiles(env_tests, test_files)
-# The version of gtest that googleurl uses provides a main() function; ours
-# doesn't so include our own main function.
-test_obj_files.append(env_tests.StaticObject(source = '../base/run_all_unittests.cc',
- target = '$TARGET_ROOT/googleurl/run_all_unittests'))
-
-gurl_unittests = env_tests.ChromeTestProgram(
- '$TARGET_ROOT/googleurl/googleurl_unittests', test_obj_files)
-
-installed_gurl_unittests = env.Install('$TARGET_ROOT', gurl_unittests)
-
-env.Alias('googleurl', installed_gurl_unittests)
diff --git a/build/SConscript.main b/build/SConscript.main
index a740553..f8e6882 100644
--- a/build/SConscript.main
+++ b/build/SConscript.main
@@ -15,6 +15,7 @@ elif p == 'name':
default_warnings = ['no-missing-sconscript', 'no-no-parallel-support']
+default_warnings = ['no-no-parallel-support']
SetOption('warn', default_warnings + GetOption('warn'))
@@ -29,6 +30,7 @@ env = Environment(
BUILD_TYPE = ARGUMENTS.get('BUILD_TYPE', 'Hammer'),
TARGET_ROOT = '#/$BUILD_TYPE',
OBJ_ROOT = '$TARGET_ROOT',
+ ROOT_DIR = '#/..',
LIBS_DIR = '$OBJ_ROOT/Libs',
@@ -37,17 +39,7 @@ env = Environment(
CHROME_DIR = '$OBJ_ROOT/chrome',
GEARS_DIR = '$OBJ_ROOT/gears',
GOOGLE_UPDATE_DIR = '$OBJ_ROOT/google_update',
-
- # Work around a limitation (bug?) in SCons in that, when we build
- # from a different directory, it forces the build targets defined
- # the SConscript.googleurl file to be relative to that file (i.e.,
- # here in the build/ directory with us), not relative to the
- # the SConstruct directory from which SCons was launched. When
- # we roll forward to a version of SCons that fixes this, we'll
- # need to revert to the $BUILD_TYPE definition of GOOGLEURL_DIR.
- #GOOGLEURL_DIR = '$OBJ_ROOT/googleurl',
- GOOGLEURL_DIR = '#/../build/googleurl',
-
+ GOOGLEURL_DIR = '$OBJ_ROOT/googleurl',
NET_DIR = '$OBJ_ROOT/net',
RLZ_DIR = '$OBJ_ROOT/rlz',
SANDBOX_DIR = '$OBJ_ROOT/sandbox',
@@ -464,8 +456,8 @@ env.Decider('MD5-timestamp')
# Overlay things from a layer below.
-env.Dir('$TARGET_ROOT').addRepository(Dir('..'))
-
+env.Dir('$TARGET_ROOT').addRepository(Dir('#/..'))
+env.Dir('$TARGET_ROOT/googleurl').addRepository(env.Dir('$ROOT_DIR/build'))
included = [c for c in load if not c.startswith('-')]
excluded = [c[1:] for c in load if c.startswith('-')]
@@ -483,7 +475,7 @@ def LoadComponent(c):
sconscripts = []
if LoadComponent('base'):
- sconscripts.append('$BASE_DIR/SConscript')
+ sconscripts.append('$BASE_DIR/base.scons')
if LoadComponent('breakpad'):
sconscripts.append('$BREAKPAD_DIR/SConscript')
@@ -500,10 +492,10 @@ if LoadComponent('google_update'):
if LoadComponent('googleurl'):
# googleurl comes from a different repository so we provide the SConscript
# file.
- sconscripts.append('SConscript.googleurl')
+ sconscripts.append('$GOOGLEURL_DIR/googleurl.scons')
if LoadComponent('net'):
- sconscripts.append('$NET_DIR/SConscript')
+ sconscripts.append('$NET_DIR/net.scons')
if LoadComponent('rlz'):
sconscripts.append('$RLZ_DIR/SConscript')
@@ -523,12 +515,12 @@ if LoadComponent('testing'):
if LoadComponent('third_party'):
sconscripts.extend([
'$BSDIFF_DIR/SConscript',
- '$BZIP2_DIR/SConscript',
- '$ICU38_DIR/SConscript',
- '$LIBPNG_DIR/SConscript',
+ '$BZIP2_DIR/bzip2.scons',
+ '$ICU38_DIR/icu38.scons',
+ '$LIBPNG_DIR/libpng.scons',
'$LZMA_SDK_DIR/SConscript',
- '$MODP_B64_DIR/SConscript',
- '$ZLIB_DIR/SConscript',
+ '$MODP_B64_DIR/modp_b64.scons',
+ '$ZLIB_DIR/zlib.scons',
])
# Temporary until we get these building on Mac.
if env['PLATFORM'] != 'darwin':
@@ -539,7 +531,7 @@ if LoadComponent('third_party'):
])
if env['PLATFORM'] in ('posix', 'darwin'):
sconscripts.extend([
- '$LIBEVENT_DIR/SConscript',
+ '$LIBEVENT_DIR/libevent.scons',
])
# This is temporary until we get this lib to build on other platforms.
if env['PLATFORM'] == 'win32':
diff --git a/build/googleurl.scons b/build/googleurl.scons
new file mode 100644
index 0000000..fffb4fd
--- /dev/null
+++ b/build/googleurl.scons
@@ -0,0 +1,18 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Master configuration for building googleurl components.
+"""
+
+Import('env')
+
+sconscript_files = [
+ 'googleurl_lib.scons',
+ 'googleurl_unittests.scons',
+]
+
+SConscript(sconscript_files, exports=['env'])
+
+env.Alias('base', '.')
diff --git a/build/googleurl_lib.scons b/build/googleurl_lib.scons
new file mode 100644
index 0000000..cbb403f
--- /dev/null
+++ b/build/googleurl_lib.scons
@@ -0,0 +1,49 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building googleurl.lib / libgoogleurl.a.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ '$ICU38_DIR/using_icu38.scons',
+], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CCFLAGS = [
+ '/TP',
+ ],
+ )
+
+input_files = [
+ 'src/gurl.cc',
+ 'src/url_canon_etc.cc',
+ 'src/url_canon_fileurl.cc',
+ 'src/url_canon_host.cc',
+ 'src/url_canon_icu.cc',
+ 'src/url_canon_internal.cc',
+ 'src/url_canon_ip.cc',
+ 'src/url_canon_mailtourl.cc',
+ 'src/url_canon_path.cc',
+ 'src/url_canon_pathurl.cc',
+ 'src/url_canon_query.cc',
+ 'src/url_canon_relative.cc',
+ 'src/url_canon_stdurl.cc',
+ 'src/url_parse.cc',
+ 'src/url_parse_file.cc',
+ 'src/url_util.cc',
+]
+
+env.ChromeStaticLibrary('googleurl', input_files)
diff --git a/build/googleurl_unittests.scons b/build/googleurl_unittests.scons
new file mode 100644
index 0000000..2da2e47
--- /dev/null
+++ b/build/googleurl_unittests.scons
@@ -0,0 +1,45 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building the googleurl_unittests{,.exe} executable.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ '$BASE_DIR/using_base.scons',
+ '$ICU38_DIR/using_icu38.scons',
+ '$GTEST_DIR/../using_gtest.scons',
+ '#/../build/using_googleurl.scons',
+], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CCFLAGS = [
+ '/TP',
+ ],
+ )
+
+input_files = [
+ 'src/gurl_unittest.cc',
+ 'src/url_canon_unittest.cc',
+ 'src/url_parse_unittest.cc',
+ 'src/url_util_unittest.cc',
+ '$OBJ_ROOT/base/run_all_unittests$OBJSUFFIX',
+]
+
+gurl_unittests = env.ChromeTestProgram('googleurl_unittests', input_files)
+
+installed_gurl_unittests = env.Install('$TARGET_ROOT', gurl_unittests)
+
+env.Alias('googleurl', installed_gurl_unittests)
diff --git a/build/using_googleurl.scons b/build/using_googleurl.scons
new file mode 100644
index 0000000..3c2c3c6
--- /dev/null
+++ b/build/using_googleurl.scons
@@ -0,0 +1,15 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Settings for other components using the googleurl library.
+"""
+
+Import("env")
+
+env.Append(
+ LIBS = [
+ 'googleurl',
+ ],
+)
diff --git a/net/SConscript b/net/SConscript
deleted file mode 100644
index 8a0b85c..0000000
--- a/net/SConscript
+++ /dev/null
@@ -1,356 +0,0 @@
-# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-Import('env')
-
-env_res = env.Clone()
-env_tests = env.Clone()
-env = env.Clone()
-
-env.Prepend(
- CPPPATH = [
- '$ZLIB_DIR',
- '$ICU38_DIR/public/common',
- '$ICU38_DIR/public/i18n',
- '$SDCH_DIR/open-vcdiff/src',
- '..',
- ],
-)
-
-env.Append(
- CPPDEFINES = [
- 'U_STATIC_IMPLEMENTATION',
- ],
-)
-
-# These net files work on *all* platforms; files that don't work
-# cross-platform live below.
-input_files = [
- 'base/address_list.cc',
- 'base/auth_cache.cc',
- 'base/base64.cc',
- 'base/bzip2_filter.cc',
- 'base/client_socket_handle.cc',
- 'base/client_socket_pool.cc',
- 'base/cookie_monster.cc',
- 'base/cookie_policy.cc',
- 'base/data_url.cc',
- 'base/escape.cc',
- 'base/ev_root_ca_metadata.cc',
- 'base/filter.cc',
- 'base/gzip_filter.cc',
- 'base/gzip_header.cc',
- 'base/host_resolver.cc',
- 'base/mime_sniffer.cc',
- 'base/mime_util.cc',
- 'base/net_errors.cc',
- 'base/net_module.cc',
- 'base/net_util.cc',
- 'base/registry_controlled_domain.cc',
- 'base/sdch_filter.cc',
- 'base/sdch_manager.cc',
- 'base/upload_data.cc',
- 'base/x509_certificate.cc',
- 'disk_cache/backend_impl.cc',
- 'disk_cache/block_files.cc',
- 'disk_cache/entry_impl.cc',
- 'disk_cache/file_lock.cc',
- 'disk_cache/hash.cc',
- 'disk_cache/mem_backend_impl.cc',
- 'disk_cache/mem_entry_impl.cc',
- 'disk_cache/mem_rankings.cc',
- 'disk_cache/rankings.cc',
- 'disk_cache/stats.cc',
- 'disk_cache/stats_histogram.cc',
- 'disk_cache/trace.cc',
- 'http/cert_status_cache.cc',
- 'http/http_auth.cc',
- 'http/http_auth_handler.cc',
- 'http/http_auth_handler_basic.cc',
- 'http/http_auth_handler_digest.cc',
- 'http/http_cache.cc',
- 'http/http_chunked_decoder.cc',
- 'http/http_response_headers.cc',
- 'http/http_util.cc',
- 'http/http_vary_data.cc',
- 'url_request/mime_sniffer_proxy.cc',
- 'url_request/url_request.cc',
- 'url_request/url_request_about_job.cc',
- 'url_request/url_request_error_job.cc',
- 'url_request/url_request_file_job.cc',
- 'url_request/url_request_http_job.cc',
- 'url_request/url_request_job.cc',
- 'url_request/url_request_job_metrics.cc',
- 'url_request/url_request_job_tracker.cc',
- 'url_request/url_request_simple_job.cc',
- 'url_request/url_request_test_job.cc',
- 'url_request/url_request_view_cache_job.cc',
-]
-
-if env['PLATFORM'] == 'win32':
- input_files.extend([
- 'base/client_socket_factory.cc',
- 'base/directory_lister.cc',
- 'base/dns_resolution_observer.cc',
- 'base/listen_socket.cc',
- 'base/ssl_client_socket_win.cc',
- 'base/ssl_config_service.cc',
- 'base/tcp_client_socket.cc',
- 'base/telnet_server.cc',
- 'base/upload_data_stream.cc',
- 'base/wininet_util.cc',
- 'base/winsock_init.cc',
- 'http/http_network_layer.cc',
- 'http/http_network_transaction.cc',
- 'http/http_transaction_winhttp.cc',
- 'http/winhttp_request_throttle.cc',
- 'proxy/proxy_resolver_fixed.cc',
- 'proxy/proxy_resolver_winhttp.cc',
- 'proxy/proxy_service.cc',
- 'url_request/url_request_file_dir_job.cc',
- 'url_request/url_request_filter.cc',
- 'url_request/url_request_ftp_job.cc',
- 'url_request/url_request_inet_job.cc',
- 'url_request/url_request_job_manager.cc',
- ])
-
-if env['PLATFORM'] == 'win32':
- input_files.extend([
- 'base/file_input_stream_win.cc',
- 'base/net_util_win.cc',
- 'base/platform_mime_util_win.cc',
- 'base/x509_certificate_win.cc',
- 'disk_cache/cache_util_win.cc',
- 'disk_cache/file_win.cc',
- 'disk_cache/mapped_file_win.cc',
- 'disk_cache/os_file_win.cc',
- ])
-
-if env['PLATFORM'] == 'darwin':
- input_files.extend([
- 'base/platform_mime_util_mac.mm',
- 'base/x509_certificate_mac.cc',
- ])
-
-if env['PLATFORM'] == 'posix':
- input_files.extend([
- # TODO(tc): gnome-vfs? xdgmime? /etc/mime.types?
- 'base/platform_mime_util_linux.cc',
- ])
-
-if env['PLATFORM'] in ('darwin', 'posix'):
- input_files.extend([
- 'base/file_input_stream_posix.cc',
- 'base/net_util_posix.cc',
- 'base/tcp_client_socket_libevent.cc',
- 'disk_cache/cache_util_posix.cc',
- 'disk_cache/file_posix.cc',
- 'disk_cache/mapped_file_posix.cc',
- 'disk_cache/os_file_posix.cc',
- ])
-
-if env['PLATFORM'] == 'win32':
- # TODO(bradnelson): This step generates file precompiled_net.pch.ib_tag
- # possibly only on incredibuild, scons doesn't know this.
- env_p = env.Clone()
- env_p.Append(CCFLAGS='/Ylnet')
- pch, obj = env_p.PCH('precompiled_net.pch', 'build/precompiled_net.cc')
- env['PCH'] = pch
- env['PCHSTOP'] = 'precompiled_net.h'
- env.Append(CCPCHFLAGS = ['/FIprecompiled_net.h'])
- input_files += [obj]
-
-env.ChromeStaticLibrary('net', input_files)
-
-
-env_tests.Prepend(
- CPPPATH = [
- '..',
- ],
- CPPDEFINES = [
- 'UNIT_TEST',
- ],
- LIBS = [ # On Linux, dependencies must follow dependents, so...
- 'net', # net must come before base and modp_b64
- 'bzip2', # bzip2 must come before base
- 'base',
- 'googleurl',
- 'gtest',
- 'sdch',
- env_tests['ICU_LIBS'], # TODO(sgk): '$ICU_LIBS' when scons is fixed
- 'modp_b64',
- 'zlib',
- ]
-)
-
-env_tests.Append(
- CPPPATH = [
- '$GTEST_DIR/include',
- ],
-)
-
-if env['PLATFORM'] == 'win32':
- env_tests.Prepend(
- CCFLAGS = [
- '/TP',
- '/WX',
- ],
- CPPDEFINES = [
- '_WIN32_WINNT=0x0600',
- 'WINVER=0x0600',
- '_HAS_EXCEPTIONS=0',
- ],
- LINKFLAGS = [
- '/DELAYLOAD:"dwmapi.dll"',
- '/DELAYLOAD:"uxtheme.dll"',
- '/MACHINE:X86',
- '/FIXED:No',
- '/safeseh',
- '/dynamicbase',
- '/ignore:4199',
- '/nxcompat',
- ],
- )
-
-if env['PLATFORM'] in ('posix', 'darwin'):
- env_tests.Append(
- LIBS = [
- 'event',
- ],
- )
-
-
-unittest_files = [
- 'base/auth_cache_unittest.cc',
- 'base/base64_unittest.cc',
- 'base/bzip2_filter_unittest.cc',
- 'base/client_socket_pool_unittest.cc',
- 'base/cookie_monster_unittest.cc',
- 'base/cookie_policy_unittest.cc',
- 'base/data_url_unittest.cc',
- 'base/escape_unittest.cc',
- 'base/file_input_stream_unittest.cc',
- 'base/gzip_filter_unittest.cc',
- 'base/host_resolver_unittest.cc',
- 'base/mime_sniffer_unittest.cc',
- 'base/mime_util_unittest.cc',
- 'base/net_util_unittest.cc',
- 'base/registry_controlled_domain_unittest.cc',
- 'base/run_all_unittests.cc',
- 'base/tcp_client_socket_unittest.cc',
- 'base/test_completion_callback_unittest.cc',
- 'disk_cache/addr_unittest.cc',
- 'disk_cache/backend_unittest.cc',
- 'disk_cache/block_files_unittest.cc',
- 'disk_cache/disk_cache_test_base.cc',
- 'disk_cache/disk_cache_test_util.cc',
- 'disk_cache/entry_unittest.cc',
- 'disk_cache/mapped_file_unittest.cc',
- 'disk_cache/storage_block_unittest.cc',
- 'http/http_auth_unittest.cc',
- 'http/http_auth_handler_basic_unittest.cc',
- 'http/http_auth_handler_digest_unittest.cc',
- 'http/http_chunked_decoder_unittest.cc',
- 'http/http_response_headers_unittest.cc',
- 'http/http_vary_data_unittest.cc',
-]
-
-if env['PLATFORM'] == 'win32':
- unittest_files.extend([
- 'base/directory_lister_unittest.cc',
- 'base/sdch_filter_unittest.cc',
- 'base/ssl_config_service_unittest.cc',
- 'base/ssl_client_socket_unittest.cc',
- 'base/wininet_util_unittest.cc',
- 'http/http_cache_unittest.cc',
- 'http/http_network_layer_unittest.cc',
- 'http/http_network_transaction_unittest.cc',
- 'http/http_transaction_unittest.cc',
- 'http/http_transaction_winhttp_unittest.cc',
- 'http/http_util_unittest.cc',
- 'http/winhttp_request_throttle_unittest.cc',
- 'url_request/url_request_unittest.cc',
- ])
-
-if env['PLATFORM'] == 'darwin':
- unittest_files.extend([
- '../base/platform_test_mac.o',
- ])
-
-net_unittests = env_tests.ChromeTestProgram('net_unittests', unittest_files)
-
-install_targets = net_unittests[:]
-
-if env['PLATFORM'] in ('posix', 'win32'):
-
- net_perftests = env_tests.ChromeTestProgram(
- 'net_perftests',
- ['disk_cache/disk_cache_test_util.cc',
- 'disk_cache/disk_cache_perftest.cc',
- 'base/cookie_monster_perftest.cc',
- # TODO(sgk): avoid using .cc from base directly
- '$BASE_DIR/run_all_perftests$OBJSUFFIX',
- '$BASE_DIR/perftimer$OBJSUFFIX']
- )
-
- install_targets.extend([
- net_perftests
- ])
-
-if env['PLATFORM'] == 'win32':
- stress_cache = env_tests.ChromeTestProgram(
- 'stress_cache',
- ['disk_cache/stress_cache.cc',
- 'disk_cache/disk_cache_test_util.cc']
- )
-
- crash_cache = env_tests.ChromeTestProgram(
- 'crash_cache',
- ['tools/crash_cache/crash_cache.cc',
- 'disk_cache/disk_cache_test_util.cc']
- )
-
- install_targets.extend([
- stress_cache,
- crash_cache,
- ])
-
-
-# Create install of tests.
-installed_tests = env.Install('$TARGET_ROOT', install_targets)
-
-
-if env['PLATFORM'] == 'win32':
- env_res.Append(
- CPPPATH = [
- '..',
- ],
- RCFLAGS = [
- ['/l', '0x409'],
- ],
- )
-
- # TODO: Need to figure out what we're doing with external resources on
- # linux.
- # This dat file needed by net_resources is generated.
- tld_names_clean = env_res.Command('net/effective_tld_names_clean.dat',
- ['base/effective_tld_names.dat',
- 'tools/tld_cleanup/tld_cleanup.exe'],
- '${SOURCES[1]} ${SOURCES[0]} $TARGET')
- rc = env_res.Command('net_resources.rc',
- 'base/net_resources.rc',
- Copy('$TARGET', '$SOURCE'))
- net_resources = env_res.RES(rc)
- env_res.Depends(rc, tld_names_clean)
-
- # TODO: We need to port tld_cleanup before this will work on other
- # platforms.
- sconscript_files = [
- 'tools/tld_cleanup/SConscript',
- ]
-
- SConscript(sconscript_files, exports=['env'])
-
-
-env.Alias('net', ['.', installed_tests])
diff --git a/net/crash_cache.scons b/net/crash_cache.scons
new file mode 100644
index 0000000..6ef6860
--- /dev/null
+++ b/net/crash_cache.scons
@@ -0,0 +1,64 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration the disk_cache{,.exe} executable.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ # On Linux, dependencies must follow dependents, so...
+ # 1) net must come before base and modp_b64.
+ '$NET_DIR/using_net.scons',
+
+ '$BASE_DIR/using_base.scons',
+ '$GTEST_DIR/../using_gtest.scons',
+ '$ICU38_DIR/using_icu38.scons',
+], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Prepend(
+ CCFLAGS = [
+ '/TP',
+ '/WX',
+ ],
+ CPPDEFINES = [
+ '_WIN32_WINNT=0x0600',
+ 'WINVER=0x0600',
+ '_HAS_EXCEPTIONS=0',
+ ],
+ LINKFLAGS = [
+ '/DELAYLOAD:"dwmapi.dll"',
+ '/DELAYLOAD:"uxtheme.dll"',
+ '/MACHINE:X86',
+ '/FIXED:No',
+ '/safeseh',
+ '/dynamicbase',
+ '/ignore:4199',
+ '/nxcompat',
+ ],
+ )
+
+input_files = [
+ 'disk_cache/disk_cache_test_util$OBJSUFFIX',
+ 'tools/crash_cache/crash_cache.cc',
+]
+
+
+if env['PLATFORM'] in ('posix', 'win32'):
+
+ crash_cache = env.ChromeTestProgram('crash_cache', input_files)
+
+ installed_test = env.Install('$TARGET_ROOT', crash_cache)
+
+ env.Alias('net', installed_test)
diff --git a/net/net.scons b/net/net.scons
new file mode 100644
index 0000000..04a23154
--- /dev/null
+++ b/net/net.scons
@@ -0,0 +1,39 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Master configuration for building net components.
+"""
+
+Import('env')
+
+sconscript_files = [
+ 'crash_cache.scons',
+ 'net_lib.scons',
+ 'net_perftests.scons',
+ 'net_unittests.scons',
+ 'stress_cache.scons',
+]
+
+if env['PLATFORM'] in ('posix', 'darwin'):
+ # Remove *.scons files whose targets still need to be ported.
+ # TODO(port): delete files from this list as they get ported.
+ to_be_ported = [
+ 'crash_cache.scons',
+ 'stress_cache.scons',
+ ]
+ for remove in to_be_ported:
+ sconscript_files.remove(remove)
+
+if env['PLATFORM'] == 'win32':
+ # TODO: We need to port tld_cleanup before this will work on other
+ # platforms.
+ sconscript_files.extend([
+ 'net_resources.scons',
+ 'tools/tld_cleanup/tld_cleanup.scons',
+ ])
+
+SConscript(sconscript_files, exports=['env'])
+
+env.Alias('net', '.')
diff --git a/net/net_lib.scons b/net/net_lib.scons
new file mode 100644
index 0000000..ee57964
--- /dev/null
+++ b/net/net_lib.scons
@@ -0,0 +1,191 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building net.lib / libnet.a.
+"""
+
+Import('env')
+
+env_res = env.Clone()
+env_tests = env.Clone()
+env = env.Clone()
+
+env.SConscript([
+ '$ICU38_DIR/using_icu38.scons',
+ '$SDCH_DIR/using_sdch.scons',
+ '$ZLIB_DIR/using_zlib.scons',
+], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+# These net files work on *all* platforms; files that don't work
+# cross-platform live below.
+input_files = [
+ 'base/address_list.cc',
+ 'base/auth_cache.cc',
+ 'base/base64.cc',
+ 'base/bzip2_filter.cc',
+ 'base/client_socket_factory.cc',
+ 'base/client_socket_handle.cc',
+ 'base/client_socket_pool.cc',
+ 'base/cookie_monster.cc',
+ 'base/cookie_policy.cc',
+ 'base/data_url.cc',
+ 'base/directory_lister.cc',
+ 'base/dns_resolution_observer.cc',
+ 'base/escape.cc',
+ 'base/ev_root_ca_metadata.cc',
+ 'base/filter.cc',
+ 'base/gzip_filter.cc',
+ 'base/gzip_header.cc',
+ 'base/host_resolver.cc',
+ 'base/listen_socket.cc',
+ 'base/mime_sniffer.cc',
+ 'base/mime_util.cc',
+ 'base/net_errors.cc',
+ 'base/net_module.cc',
+ 'base/net_util.cc',
+ 'base/registry_controlled_domain.cc',
+ 'base/sdch_filter.cc',
+ 'base/sdch_manager.cc',
+ 'base/ssl_client_socket_win.cc',
+ 'base/ssl_config_service.cc',
+ 'base/tcp_client_socket.cc',
+ 'base/telnet_server.cc',
+ 'base/upload_data.cc',
+ 'base/upload_data_stream.cc',
+ 'base/wininet_util.cc',
+ 'base/winsock_init.cc',
+ 'base/x509_certificate.cc',
+ 'disk_cache/backend_impl.cc',
+ 'disk_cache/block_files.cc',
+ 'disk_cache/entry_impl.cc',
+ 'disk_cache/file_lock.cc',
+ 'disk_cache/hash.cc',
+ 'disk_cache/mem_backend_impl.cc',
+ 'disk_cache/mem_entry_impl.cc',
+ 'disk_cache/mem_rankings.cc',
+ 'disk_cache/rankings.cc',
+ 'disk_cache/stats.cc',
+ 'disk_cache/stats_histogram.cc',
+ 'disk_cache/trace.cc',
+ 'http/cert_status_cache.cc',
+ 'http/http_auth.cc',
+ 'http/http_auth_handler.cc',
+ 'http/http_auth_handler_basic.cc',
+ 'http/http_auth_handler_digest.cc',
+ 'http/http_cache.cc',
+ 'http/http_chunked_decoder.cc',
+ 'http/http_network_layer.cc',
+ 'http/http_network_transaction.cc',
+ 'http/http_response_headers.cc',
+ 'http/http_transaction_winhttp.cc',
+ 'http/http_util.cc',
+ 'http/http_vary_data.cc',
+ 'http/winhttp_request_throttle.cc',
+ 'proxy/proxy_resolver_fixed.cc',
+ 'proxy/proxy_resolver_winhttp.cc',
+ 'proxy/proxy_service.cc',
+ 'url_request/mime_sniffer_proxy.cc',
+ 'url_request/url_request.cc',
+ 'url_request/url_request_about_job.cc',
+ 'url_request/url_request_error_job.cc',
+ 'url_request/url_request_file_dir_job.cc',
+ 'url_request/url_request_file_job.cc',
+ 'url_request/url_request_filter.cc',
+ 'url_request/url_request_ftp_job.cc',
+ 'url_request/url_request_http_job.cc',
+ 'url_request/url_request_inet_job.cc',
+ 'url_request/url_request_job.cc',
+ 'url_request/url_request_job_manager.cc',
+ 'url_request/url_request_job_metrics.cc',
+ 'url_request/url_request_job_tracker.cc',
+ 'url_request/url_request_simple_job.cc',
+ 'url_request/url_request_test_job.cc',
+ 'url_request/url_request_view_cache_job.cc',
+]
+
+if env['PLATFORM'] in ('posix', 'darwin'):
+ # Remove files that still need to be ported from the input_files list.
+ # TODO(port): delete files from this list as they get ported.
+ to_be_ported_files = [
+ 'base/client_socket_factory.cc',
+ 'base/directory_lister.cc',
+ 'base/dns_resolution_observer.cc',
+ 'base/listen_socket.cc',
+ 'base/ssl_client_socket_win.cc',
+ 'base/ssl_config_service.cc',
+ 'base/tcp_client_socket.cc',
+ 'base/telnet_server.cc',
+ 'base/upload_data_stream.cc',
+ 'base/wininet_util.cc',
+ 'base/winsock_init.cc',
+ 'http/http_network_layer.cc',
+ 'http/http_network_transaction.cc',
+ 'http/http_transaction_winhttp.cc',
+ 'http/winhttp_request_throttle.cc',
+ 'proxy/proxy_resolver_fixed.cc',
+ 'proxy/proxy_resolver_winhttp.cc',
+ 'proxy/proxy_service.cc',
+ 'url_request/url_request_file_dir_job.cc',
+ 'url_request/url_request_filter.cc',
+ 'url_request/url_request_ftp_job.cc',
+ 'url_request/url_request_inet_job.cc',
+ 'url_request/url_request_job_manager.cc',
+ ]
+ for remove in to_be_ported_files:
+ input_files.remove(remove)
+
+if env['PLATFORM'] == 'win32':
+ input_files.extend([
+ 'base/file_input_stream_win.cc',
+ 'base/net_util_win.cc',
+ 'base/platform_mime_util_win.cc',
+ 'base/x509_certificate_win.cc',
+ 'disk_cache/cache_util_win.cc',
+ 'disk_cache/file_win.cc',
+ 'disk_cache/mapped_file_win.cc',
+ 'disk_cache/os_file_win.cc',
+ ])
+
+if env['PLATFORM'] == 'darwin':
+ input_files.extend([
+ 'base/platform_mime_util_mac.mm',
+ 'base/x509_certificate_mac.cc',
+ ])
+
+if env['PLATFORM'] == 'posix':
+ input_files.extend([
+ # TODO(tc): gnome-vfs? xdgmime? /etc/mime.types?
+ 'base/platform_mime_util_linux.cc',
+ ])
+
+if env['PLATFORM'] in ('darwin', 'posix'):
+ input_files.extend([
+ 'base/file_input_stream_posix.cc',
+ 'base/net_util_posix.cc',
+ 'base/tcp_client_socket_libevent.cc',
+ 'disk_cache/cache_util_posix.cc',
+ 'disk_cache/file_posix.cc',
+ 'disk_cache/mapped_file_posix.cc',
+ 'disk_cache/os_file_posix.cc',
+ ])
+
+if env['PLATFORM'] == 'win32':
+ # TODO(bradnelson): This step generates file precompiled_net.pch.ib_tag
+ # possibly only on incredibuild, scons doesn't know this.
+ env_p = env.Clone()
+ env_p.Append(CCFLAGS='/Ylnet')
+ pch, obj = env_p.PCH('precompiled_net.pch', 'build/precompiled_net.cc')
+ env['PCH'] = pch
+ env['PCHSTOP'] = 'precompiled_net.h'
+ env.Append(CCPCHFLAGS = ['/FIprecompiled_net.h'])
+ input_files += [obj]
+
+env.ChromeStaticLibrary('net', input_files)
diff --git a/net/net_perftests.scons b/net/net_perftests.scons
new file mode 100644
index 0000000..8c25187
--- /dev/null
+++ b/net/net_perftests.scons
@@ -0,0 +1,76 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building the net_perftests{,.exe} executable.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ # On Linux, dependencies must follow dependents, so...
+ # 1) net must come before base and modp_b64.
+ # 2) bzip2 must come before base.
+ '$NET_DIR/using_net.scons',
+
+ '$BASE_DIR/using_base.scons',
+ '#/../build/using_googleurl.scons',
+ '$GTEST_DIR/../using_gtest.scons',
+ '$ICU38_DIR/using_icu38.scons',
+ '$MODP_B64_DIR/using_modp_b64.scons',
+], {'env':env})
+
+if env['PLATFORM'] in ('posix', 'darwin'):
+ env.SConscript([
+ '$LIBEVENT_DIR/using_libevent.scons',
+ ], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Prepend(
+ CCFLAGS = [
+ '/TP',
+ '/WX',
+ ],
+ CPPDEFINES = [
+ '_WIN32_WINNT=0x0600',
+ 'WINVER=0x0600',
+ '_HAS_EXCEPTIONS=0',
+ ],
+ LINKFLAGS = [
+ '/DELAYLOAD:"dwmapi.dll"',
+ '/DELAYLOAD:"uxtheme.dll"',
+ '/MACHINE:X86',
+ '/FIXED:No',
+ '/safeseh',
+ '/dynamicbase',
+ '/ignore:4199',
+ '/nxcompat',
+ ],
+ )
+
+input_files = [
+ 'base/cookie_monster_perftest.cc',
+ 'disk_cache/disk_cache_perftest.cc',
+ 'disk_cache/disk_cache_test_util$OBJSUFFIX',
+
+ # TODO(sgk): avoid using .cc from base directly
+ '$OBJ_ROOT/base/run_all_perftests$OBJSUFFIX',
+ '$OBJ_ROOT/base/perftimer$OBJSUFFIX',
+]
+
+if env['PLATFORM'] in ('posix', 'win32'):
+
+ net_perftests = env.ChromeTestProgram('net_perftests', input_files)
+
+ installed_test = env.Install('$TARGET_ROOT', net_perftests)
+
+ env.Alias('net', installed_test)
diff --git a/net/net_resources.scons b/net/net_resources.scons
new file mode 100644
index 0000000..bbce3c4
--- /dev/null
+++ b/net/net_resources.scons
@@ -0,0 +1,41 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building the net_resources.rc resources.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+ RCFLAGS = [
+ ['/l', '0x409'],
+ ],
+)
+
+input_files = [
+ 'base/effective_tld_names.dat',
+ 'tools/tld_cleanup/tld_cleanup.exe'
+]
+
+# TODO: Need to figure out what to do with external resources on linux.
+# This dat file needed by net_resources is generated.
+tld_names_clean = env.Command('net/effective_tld_names_clean.dat',
+ input_files,
+ '${SOURCES[1]} ${SOURCES[0]} $TARGET')
+
+rc = env.Command('net_resources.rc',
+ 'base/net_resources.rc',
+ Copy('$TARGET', '$SOURCE'))
+
+env.Depends(rc, tld_names_clean)
+
+net_resources = env.RES(rc)
+
+env.Alias('net', net_resources)
diff --git a/net/net_unittests.scons b/net/net_unittests.scons
new file mode 100644
index 0000000..374f0f1
--- /dev/null
+++ b/net/net_unittests.scons
@@ -0,0 +1,125 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building the net_unittests{,.exe} executable.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ # On Linux, dependencies must follow dependents, so...
+ # 1) net must come before base and modp_b64.
+ # 2) bzip2 must come before base.
+ '$NET_DIR/using_net.scons',
+ '$BZIP2_DIR/using_bzip2.scons',
+
+ '$BASE_DIR/using_base.scons',
+ '#/../build/using_googleurl.scons',
+ '$GTEST_DIR/../using_gtest.scons',
+ '$ICU38_DIR/using_icu38.scons',
+ '$MODP_B64_DIR/using_modp_b64.scons',
+ '$SDCH_DIR/using_sdch.scons',
+ '$ZLIB_DIR/using_zlib.scons',
+], {'env':env})
+
+if env['PLATFORM'] in ('posix', 'darwin'):
+ env.SConscript([
+ '$LIBEVENT_DIR/using_libevent.scons',
+ ], {'env':env})
+
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Prepend(
+ CCFLAGS = [
+ '/TP',
+ '/WX',
+ ],
+ CPPDEFINES = [
+ '_WIN32_WINNT=0x0600',
+ 'WINVER=0x0600',
+ '_HAS_EXCEPTIONS=0',
+ ],
+ LINKFLAGS = [
+ '/DELAYLOAD:"dwmapi.dll"',
+ '/DELAYLOAD:"uxtheme.dll"',
+ '/MACHINE:X86',
+ '/FIXED:No',
+ '/safeseh',
+ '/dynamicbase',
+ '/ignore:4199',
+ '/nxcompat',
+ ],
+ )
+
+input_files = [
+ 'base/auth_cache_unittest.cc',
+ 'base/base64_unittest.cc',
+ 'base/bzip2_filter_unittest.cc',
+ 'base/client_socket_pool_unittest.cc',
+ 'base/cookie_monster_unittest.cc',
+ 'base/cookie_policy_unittest.cc',
+ 'base/data_url_unittest.cc',
+ 'base/escape_unittest.cc',
+ 'base/file_input_stream_unittest.cc',
+ 'base/gzip_filter_unittest.cc',
+ 'base/host_resolver_unittest.cc',
+ 'base/mime_sniffer_unittest.cc',
+ 'base/mime_util_unittest.cc',
+ 'base/net_util_unittest.cc',
+ 'base/registry_controlled_domain_unittest.cc',
+ 'base/run_all_unittests.cc',
+ 'base/tcp_client_socket_unittest.cc',
+ 'base/test_completion_callback_unittest.cc',
+ 'disk_cache/addr_unittest.cc',
+ 'disk_cache/backend_unittest.cc',
+ 'disk_cache/block_files_unittest.cc',
+ 'disk_cache/disk_cache_test_base.cc',
+ 'disk_cache/disk_cache_test_util.cc',
+ 'disk_cache/entry_unittest.cc',
+ 'disk_cache/mapped_file_unittest.cc',
+ 'disk_cache/storage_block_unittest.cc',
+ 'http/http_auth_unittest.cc',
+ 'http/http_auth_handler_basic_unittest.cc',
+ 'http/http_auth_handler_digest_unittest.cc',
+ 'http/http_chunked_decoder_unittest.cc',
+ 'http/http_response_headers_unittest.cc',
+ 'http/http_vary_data_unittest.cc',
+]
+
+if env['PLATFORM'] == 'win32':
+ input_files.extend([
+ 'base/directory_lister_unittest.cc',
+ 'base/sdch_filter_unittest.cc',
+ 'base/ssl_config_service_unittest.cc',
+ 'base/ssl_client_socket_unittest.cc',
+ 'base/wininet_util_unittest.cc',
+ 'http/http_cache_unittest.cc',
+ 'http/http_network_layer_unittest.cc',
+ 'http/http_network_transaction_unittest.cc',
+ 'http/http_transaction_unittest.cc',
+ 'http/http_transaction_winhttp_unittest.cc',
+ 'http/http_util_unittest.cc',
+ 'http/winhttp_request_throttle_unittest.cc',
+ 'url_request/url_request_unittest.cc',
+ ])
+
+if env['PLATFORM'] == 'darwin':
+ input_files.extend([
+ '../base/platform_test_mac$OBJSUFFIX',
+ ])
+
+net_unittests = env.ChromeTestProgram('net_unittests', input_files)
+
+installed_test = env.Install('$TARGET_ROOT', net_unittests)
+
+env.Alias('net', installed_test)
diff --git a/net/stress_cache.scons b/net/stress_cache.scons
new file mode 100644
index 0000000..ea8ff17
--- /dev/null
+++ b/net/stress_cache.scons
@@ -0,0 +1,62 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building the stress_cache{,.exe} executable.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ # On Linux, dependencies must follow dependents, so...
+ # 1) net must come before base and modp_b64.
+ '$NET_DIR/using_net.scons',
+
+ '$BASE_DIR/using_base.scons',
+ '$GTEST_DIR/../using_gtest.scons',
+ '$ICU38_DIR/using_icu38.scons',
+], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Prepend(
+ CCFLAGS = [
+ '/TP',
+ '/WX',
+ ],
+ CPPDEFINES = [
+ '_WIN32_WINNT=0x0600',
+ 'WINVER=0x0600',
+ '_HAS_EXCEPTIONS=0',
+ ],
+ LINKFLAGS = [
+ '/DELAYLOAD:"dwmapi.dll"',
+ '/DELAYLOAD:"uxtheme.dll"',
+ '/MACHINE:X86',
+ '/FIXED:No',
+ '/safeseh',
+ '/dynamicbase',
+ '/ignore:4199',
+ '/nxcompat',
+ ],
+ )
+
+input_files = [
+ 'disk_cache/disk_cache_test_util$OBJSUFFIX',
+ 'disk_cache/stress_cache.cc',
+]
+
+if env['PLATFORM'] == 'win32':
+ stress_cache = env.ChromeTestProgram('stress_cache', input_files)
+
+ installed_test = env.Install('$TARGET_ROOT', stress_cache)
+
+ env.Alias('net', installed_test)
diff --git a/net/tools/tld_cleanup/SConscript b/net/tools/tld_cleanup/SConscript
deleted file mode 100644
index 5ab7e82..0000000
--- a/net/tools/tld_cleanup/SConscript
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-Import('env')
-
-env = env.Clone()
-
-env.Prepend(
- CPPPATH = [
- '../../..',
- ],
- LIBS = [
- 'googleurl',
- env['ICU_LIBS'], # TODO(sgk): '$ICU_LIBS' when scons is fixed
- 'base',
- # We only need to link with net due to use precompiled_net.pch.
- 'net',
- ],
-)
-
-env.Append(
- CCFLAGS = [
- '/TP',
- ],
-
- LINKFLAGS = [
- '/INCREMENTAL',
- '/MANIFEST',
- '/DELAYLOAD:"dwmapi.dll"',
- '/DELAYLOAD:"uxtheme.dll"',
- '/DEBUG',
- '/SUBSYSTEM:CONSOLE',
- '/MACHINE:X86',
- '/FIXED:No',
- '/safeseh',
- '/dynamicbase',
- '/ignore:4199',
- '/nxcompat',
- ],
-)
-
-input_files = [
- 'tld_cleanup.cc',
-]
-
-exe_targets = env.ChromeProgram('tld_cleanup', input_files)
-i = env.Install('$TARGET_ROOT', exe_targets)
-env.Alias('net', i)
-
-env.Install('$TARGET_ROOT', exe_targets)
-
diff --git a/net/tools/tld_cleanup/tld_cleanup.scons b/net/tools/tld_cleanup/tld_cleanup.scons
new file mode 100644
index 0000000..4819883
--- /dev/null
+++ b/net/tools/tld_cleanup/tld_cleanup.scons
@@ -0,0 +1,54 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration the tld_cleanup{,.exe} executable.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ '$BASE_DIR/using_base.scons',
+ '#/../build/using_googleurl.scons',
+ '$ICU38_DIR/using_icu38.scons',
+ '$NET_DIR/using_net.scons',
+], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CCFLAGS = [
+ '/TP',
+ ],
+
+ LINKFLAGS = [
+ '/INCREMENTAL',
+ '/MANIFEST',
+ '/DELAYLOAD:"dwmapi.dll"',
+ '/DELAYLOAD:"uxtheme.dll"',
+ '/DEBUG',
+ '/SUBSYSTEM:CONSOLE',
+ '/MACHINE:X86',
+ '/FIXED:No',
+ '/safeseh',
+ '/dynamicbase',
+ '/ignore:4199',
+ '/nxcompat',
+ ],
+ )
+
+input_files = [
+ 'tld_cleanup.cc',
+]
+
+tld_cleanup = env.ChromeProgram('tld_cleanup', input_files)
+i = env.Install('$TARGET_ROOT', tld_cleanup)
+env.Alias('net', i)
diff --git a/net/using_net.scons b/net/using_net.scons
new file mode 100644
index 0000000..f5fed16
--- /dev/null
+++ b/net/using_net.scons
@@ -0,0 +1,15 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Settings for other components using the net library.
+"""
+
+Import("env")
+
+env.Append(
+ LIBS = [
+ 'net',
+ ],
+)
diff --git a/sdch/using_sdch.scons b/sdch/using_sdch.scons
new file mode 100644
index 0000000..f99c503
--- /dev/null
+++ b/sdch/using_sdch.scons
@@ -0,0 +1,18 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Settings for other components using the sdch library.
+"""
+
+Import("env")
+
+env.Append(
+ CPPPATH = [
+ '$SDCH_DIR/open-vcdiff/src',
+ ],
+ LIBS = [
+ 'sdch',
+ ],
+)
diff --git a/skia/SConscript b/skia/SConscript
index 9b7d6fb..fd642ae 100644
--- a/skia/SConscript
+++ b/skia/SConscript
@@ -13,7 +13,7 @@ env.Prepend(
'corecg',
'sgl',
'picture',
- '#..',
+ '$ROOT_DIR',
],
)
diff --git a/skia/using_skia.scons b/skia/using_skia.scons
new file mode 100644
index 0000000..b1adf1c
--- /dev/null
+++ b/skia/using_skia.scons
@@ -0,0 +1,20 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Settings for other components using the skia library.
+"""
+
+Import("env")
+
+env.Append(
+ CPPPATH = [
+ '$SKIA_DIR/include',
+ '$SKIA_DIR/include/corecg',
+ '$SKIA_DIR/include/platform',
+ ],
+ LIBS = [
+ 'skia',
+ ],
+)
diff --git a/testing/using_gtest.scons b/testing/using_gtest.scons
new file mode 100644
index 0000000..a6bc10f
--- /dev/null
+++ b/testing/using_gtest.scons
@@ -0,0 +1,22 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Settings for other components using the gtest library.
+"""
+
+Import("env")
+
+env.Append(
+ CPPPATH = [
+ '$GTEST_DIR/include',
+ '$GTEST_DIR',
+ ],
+ CPPDEFINES = [
+ 'UNIT_TEST',
+ ],
+ LIBS = [
+ 'gtest',
+ ],
+)
diff --git a/third_party/bzip2/SConscript b/third_party/bzip2/SConscript
deleted file mode 100644
index 6eedeaf..0000000
--- a/third_party/bzip2/SConscript
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# TODO(keunwoo): Use better cross-platform abstraction; see chrome/SConstruct
-Import('env')
-
-env = env.Clone()
-
-if env['PLATFORM'] == 'win32':
- env.Append(
- CCFLAGS = [
- '/TC',
- '/wd4996',
- '/wd4800',
- ],
- )
-
-env.Append(
- CPPDEFINES = [
- 'BZ_NO_STDIO',
- ],
-)
-
-input_files = [
- 'blocksort.c',
- 'bzlib.c',
- 'compress.c',
- 'crctable.c',
- 'decompress.c',
- 'huffman.c',
- 'randtable.c',
-]
-
-env.ChromeStaticLibrary('bzip2', input_files)
diff --git a/third_party/bzip2/bzip2.scons b/third_party/bzip2/bzip2.scons
new file mode 100644
index 0000000..f1ad082
--- /dev/null
+++ b/third_party/bzip2/bzip2.scons
@@ -0,0 +1,38 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building bzip2.lib / libbzip2.a.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CCFLAGS = [
+ '/TC',
+ '/wd4996',
+ '/wd4800',
+ ],
+ )
+
+env.Append(
+ CPPDEFINES = [
+ 'BZ_NO_STDIO',
+ ],
+)
+
+input_files = [
+ 'blocksort.c',
+ 'bzlib.c',
+ 'compress.c',
+ 'crctable.c',
+ 'decompress.c',
+ 'huffman.c',
+ 'randtable.c',
+]
+
+env.ChromeStaticLibrary('bzip2', input_files)
diff --git a/third_party/bzip2/using_bzip2.scons b/third_party/bzip2/using_bzip2.scons
new file mode 100644
index 0000000..a7706f5
--- /dev/null
+++ b/third_party/bzip2/using_bzip2.scons
@@ -0,0 +1,15 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Settings for other components using the bzip2 library.
+"""
+
+Import("env")
+
+env.Append(
+ LIBS = [
+ 'bzip2',
+ ],
+)
diff --git a/third_party/libevent/SConscript b/third_party/libevent/libevent.scons
index 3d1eb9b..82e54ce 100644
--- a/third_party/libevent/SConscript
+++ b/third_party/libevent/libevent.scons
@@ -2,12 +2,16 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# This SConscript is currently only suitable for Linux.
+
+__doc__ = """
+Configuration for building event.lib / libevent.a.
+
+This is currently only suitable for Linux and Mac.
+"""
Import('env')
-env = env.Clone(
-)
+env = env.Clone()
env.Append(
CPPDEFINES = [
diff --git a/third_party/libevent/using_libevent.scons b/third_party/libevent/using_libevent.scons
new file mode 100644
index 0000000..958c653
--- /dev/null
+++ b/third_party/libevent/using_libevent.scons
@@ -0,0 +1,15 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Settings for other components using the event library.
+"""
+
+Import("env")
+
+env.Append(
+ LIBS = [
+ 'event',
+ ],
+)
diff --git a/third_party/libpng/SConscript b/third_party/libpng/SConscript
deleted file mode 100644
index 5beb689..0000000
--- a/third_party/libpng/SConscript
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# TODO(keunwoo): Use better cross-platform abstraction; see chrome/SConstruct
-Import('env')
-
-env = env.Clone()
-
-env.Prepend(
- CPPPATH = [
- '#../third_party/zlib',
- '#../',
- ],
-)
-
-if env['PLATFORM'] == 'win32':
- env.Append(
- CCFLAGS = [
- '/TP',
- '/wd4800',
- ],
- )
-
-env.Append(
- CPPDEFINES = [
- 'PNG_USER_CONFIG',
- 'CHROME_PNG_WRITE_SUPPORT',
- ],
-)
-
-input_files = [
- 'png.c',
- 'pngwutil.c',
- 'pngwtran.c',
- 'pngwrite.c',
- 'pngwio.c',
- 'pngvcrd.c',
- 'pngtrans.c',
- 'pngset.c',
- 'pngrutil.c',
- 'pngrtran.c',
- 'pngrio.c',
- 'pngread.c',
- 'pngpread.c',
- 'pngmem.c',
- 'pngget.c',
- 'pnggccrd.c',
- 'pngerror.c',
-]
-
-env.ChromeStaticLibrary('libpng', input_files)
diff --git a/third_party/libpng/libpng.scons b/third_party/libpng/libpng.scons
new file mode 100644
index 0000000..7acba1c
--- /dev/null
+++ b/third_party/libpng/libpng.scons
@@ -0,0 +1,59 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+__doc__ = """
+Configuration for building libpng.lib / libpng.a.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.SConscript([
+ '$ZLIB_DIR/using_zlib.scons',
+], {'env':env})
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CCFLAGS = [
+ '/TP',
+ '/wd4800',
+ ],
+ )
+
+env.Append(
+ CPPDEFINES = [
+ 'PNG_USER_CONFIG',
+ 'CHROME_PNG_WRITE_SUPPORT',
+ ],
+)
+
+input_files = [
+ 'png.c',
+ 'pngwutil.c',
+ 'pngwtran.c',
+ 'pngwrite.c',
+ 'pngwio.c',
+ 'pngvcrd.c',
+ 'pngtrans.c',
+ 'pngset.c',
+ 'pngrutil.c',
+ 'pngrtran.c',
+ 'pngrio.c',
+ 'pngread.c',
+ 'pngpread.c',
+ 'pngmem.c',
+ 'pngget.c',
+ 'pnggccrd.c',
+ 'pngerror.c',
+]
+
+env.ChromeStaticLibrary('libpng', input_files)
diff --git a/third_party/libpng/using_libpng.scons b/third_party/libpng/using_libpng.scons
new file mode 100644
index 0000000..68b9c3f
--- /dev/null
+++ b/third_party/libpng/using_libpng.scons
@@ -0,0 +1,22 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Settings for other components using the libpng library.
+"""
+
+Import("env")
+
+env.Append(
+ CPPPATH = [
+ '$LIBPNG_DIR',
+ ],
+ CPPDEFINES = [
+ 'PNG_USER_CONFIG',
+ 'CHROME_PNG_WRITE_SUPPORT',
+ ],
+ LIBS = [
+ 'libpng',
+ ],
+)
diff --git a/third_party/modp_b64/SConscript b/third_party/modp_b64/SConscript
deleted file mode 100644
index 37f9ca5..0000000
--- a/third_party/modp_b64/SConscript
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Import('env')
-
-env = env.Clone(
- PDB = 'vc80.pdb',
-)
-
-env.Prepend(
- CPPPATH = [
- '#/..',
- ],
-)
-
-input_files = [
- 'modp_b64.cc',
-]
-
-env.ChromeStaticLibrary('modp_b64', input_files)
diff --git a/third_party/modp_b64/modp_b64.scons b/third_party/modp_b64/modp_b64.scons
new file mode 100644
index 0000000..02cefb4
--- /dev/null
+++ b/third_party/modp_b64/modp_b64.scons
@@ -0,0 +1,25 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building modp_b64.lib / libmodp_b64.a.
+"""
+
+Import('env')
+
+env = env.Clone(
+ PDB = 'vc80.pdb',
+)
+
+env.Prepend(
+ CPPPATH = [
+ '$ROOT_DIR',
+ ],
+)
+
+input_files = [
+ 'modp_b64.cc',
+]
+
+env.ChromeStaticLibrary('modp_b64', input_files)
diff --git a/third_party/modp_b64/using_modp_b64.scons b/third_party/modp_b64/using_modp_b64.scons
new file mode 100644
index 0000000..f4637db
--- /dev/null
+++ b/third_party/modp_b64/using_modp_b64.scons
@@ -0,0 +1,15 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Settings for other components using the modp_b64 library.
+"""
+
+Import("env")
+
+env.Append(
+ LIBS = [
+ 'modp_b64',
+ ],
+)
diff --git a/third_party/zlib/SConscript b/third_party/zlib/SConscript
deleted file mode 100644
index 490ce01..0000000
--- a/third_party/zlib/SConscript
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 2008, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# TODO(keunwoo): Use better cross-platform abstraction; see chrome/SConstruct
-Import('env')
-
-env = env.Clone()
-
-if env['PLATFORM'] == 'win32':
- env.Append(
- CCFLAGS = [
- '/TC',
- '/wd4800',
- ],
- )
-
-input_files = [
- 'adler32.c',
- 'compress.c',
- 'crc32.c',
- 'deflate.c',
- 'gzio.c',
- 'infback.c',
- 'inffast.c',
- 'inflate.c',
- 'inftrees.c',
- 'trees.c',
- 'uncompr.c',
- 'zutil.c',
-]
-
-env.ChromeStaticLibrary('zlib', input_files)
diff --git a/third_party/zlib/using_zlib.scons b/third_party/zlib/using_zlib.scons
new file mode 100644
index 0000000..60bceb7
--- /dev/null
+++ b/third_party/zlib/using_zlib.scons
@@ -0,0 +1,18 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Settings for other components using the zlib library.
+"""
+
+Import("env")
+
+env.Append(
+ CPPPATH = [
+ '$ZLIB_DIR',
+ ],
+ LIBS = [
+ 'zlib',
+ ],
+)
diff --git a/third_party/zlib/zlib.scons b/third_party/zlib/zlib.scons
new file mode 100644
index 0000000..a7dcb89
--- /dev/null
+++ b/third_party/zlib/zlib.scons
@@ -0,0 +1,36 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building zlib.lib / libzlib.a.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CCFLAGS = [
+ '/TC',
+ '/wd4800',
+ ],
+ )
+
+input_files = [
+ 'adler32.c',
+ 'compress.c',
+ 'crc32.c',
+ 'deflate.c',
+ 'gzio.c',
+ 'infback.c',
+ 'inffast.c',
+ 'inflate.c',
+ 'inftrees.c',
+ 'trees.c',
+ 'uncompr.c',
+ 'zutil.c',
+]
+
+env.ChromeStaticLibrary('zlib', input_files)