# This file is generated; do not edit.

import os

Import("env")

env = env.Clone(COMPONENT_NAME='net',
                TARGET_NAME='net')

configurations = {
    'Debug' : {
        'Append' : dict(
            CCFLAGS = [
                '-Werror',
                '-pthread',
                '-fno-exceptions',
                '-fno-asynchronous-unwind-tables',
                '-fvisibility=hidden',
                '-Wall',
                '-D_FILE_OFFSET_BITS=64',
                '-DPNG_NO_MMX_CODE',
                '-pthread',
                '-I/usr/include/gtk-2.0',
                '-I/usr/lib/gtk-2.0/include',
                '-I/usr/include/atk-1.0',
                '-I/usr/include/cairo',
                '-I/usr/include/pango-1.0',
                '-I/usr/include/glib-2.0',
                '-I/usr/lib/glib-2.0/include',
                '-I/usr/include/freetype2',
                '-I/usr/include/libpng12',
                '-I/usr/include/pixman-1',
                '-DORBIT2=1',
                '-pthread',
                '-I/usr/include/gconf/2',
                '-I/usr/include/orbit-2.0',
                '-I/usr/include/glib-2.0',
                '-I/usr/lib/glib-2.0/include',
                '-DPNG_NO_MMX_CODE',
                '-I/usr/include/gtk-2.0',
                '-I/usr/lib/gtk-2.0/include',
                '-I/usr/include/pango-1.0',
                '-I/usr/include/glib-2.0',
                '-I/usr/lib/glib-2.0/include',
                '-I/usr/include/cairo',
                '-I/usr/include/freetype2',
                '-I/usr/include/libpng12',
                '-I/usr/include/pixman-1',
                '-I/usr/include/nss',
                '-I/usr/include/nspr',
                '-O0',
                '-g'
            ],
            CPPDEFINES = [
                '__STDC_FORMAT_MACROS',
                'CHROMIUM_BUILD',
                'U_STATIC_IMPLEMENTATION',
                '_DEBUG'
            ],
            CPPPATH = [
                env.Dir('$SRC_DIR/net/../third_party/icu/public/common'),
                env.Dir('$SRC_DIR/net/../third_party/icu/public/i18n'),
                env.Dir('$SRC_DIR/net/..'),
                env.Dir('$SRC_DIR/net/../sdch/open-vcdiff/src'),
                env.Dir('$SRC_DIR/net/../third_party/bzip2'),
                env.Dir('$SRC_DIR/net/../third_party/zlib'),
                env.Dir('${SHARED_INTERMEDIATE_DIR}/net'),
                env.Dir('$SRC_DIR/net/../v8/include')
            ],
            CXXFLAGS = [
                '-fno-rtti',
                '-fno-threadsafe-statics',
                '-fvisibility-inlines-hidden'
            ],
            LINKFLAGS = [
                '-pthread',
                '-rdynamic'
            ],
        ),
        'FilterOut' : dict(
        ),
        'Replace' : dict(
             FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'],
             FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'],
             FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'],
             IMPLICIT_COMMAND_DEPENDENCIES = '0',
             LDMODULECOM = [['$FLOCK_LDMODULE',
  '-o',
  '$TARGET',
  '$_LIBDIRFLAGS',
  '$LDMODULEFLAGS',
  '$SOURCES',
  '-Wl,--start-group',
  '$_LIBFLAGS',
  '-Wl,--end-group']],
             LIBPATH = ['$LIB_DIR'],
             LINKCOM = [['$FLOCK_LINK',
  '-o',
  '$TARGET',
  '$_LIBDIRFLAGS',
  '$LINKFLAGS',
  '$SOURCES',
  '-Wl,--start-group',
  '$_LIBFLAGS',
  '-Wl,--end-group']],
             SHLINKCOM = [['$FLOCK_SHLINK',
  '-o',
  '$TARGET',
  '$_LIBDIRFLAGS',
  '$SHLINKFLAGS',
  '$SOURCES',
  '-Wl,--start-group',
  '$_LIBFLAGS',
  '-Wl,--end-group']],
        ),
        'ImportExternal' : [
             'AS',
             'CC',
             'CXX',
             'LINK',
        ],
        'PropagateExternal' : [
             'AS',
             'CC',
             'CCACHE_DIR',
             'CXX',
             'DISTCC_DIR',
             'DISTCC_HOSTS',
             'HOME',
             'INCLUDE_SERVER_ARGS',
             'INCLUDE_SERVER_PORT',
             'LINK',
             'CHROME_BUILD_TYPE',
             'CHROMIUM_BUILD',
             'OFFICIAL_BUILD',
        ],
    },
    'Release' : {
        'Append' : dict(
            CCFLAGS = [
                '-Werror',
                '-pthread',
                '-fno-exceptions',
                '-fno-asynchronous-unwind-tables',
                '-fvisibility=hidden',
                '-Wall',
                '-D_FILE_OFFSET_BITS=64',
                '-DPNG_NO_MMX_CODE',
                '-pthread',
                '-I/usr/include/gtk-2.0',
                '-I/usr/lib/gtk-2.0/include',
                '-I/usr/include/atk-1.0',
                '-I/usr/include/cairo',
                '-I/usr/include/pango-1.0',
                '-I/usr/include/glib-2.0',
                '-I/usr/lib/glib-2.0/include',
                '-I/usr/include/freetype2',
                '-I/usr/include/libpng12',
                '-I/usr/include/pixman-1',
                '-DORBIT2=1',
                '-pthread',
                '-I/usr/include/gconf/2',
                '-I/usr/include/orbit-2.0',
                '-I/usr/include/glib-2.0',
                '-I/usr/lib/glib-2.0/include',
                '-DPNG_NO_MMX_CODE',
                '-I/usr/include/gtk-2.0',
                '-I/usr/lib/gtk-2.0/include',
                '-I/usr/include/pango-1.0',
                '-I/usr/include/glib-2.0',
                '-I/usr/lib/glib-2.0/include',
                '-I/usr/include/cairo',
                '-I/usr/include/freetype2',
                '-I/usr/include/libpng12',
                '-I/usr/include/pixman-1',
                '-I/usr/include/nss',
                '-I/usr/include/nspr',
                '-O2',
                '-fno-ident',
                '-fdata-sections',
                '-ffunction-sections'
            ],
            CPPDEFINES = [
                '__STDC_FORMAT_MACROS',
                'CHROMIUM_BUILD',
                'U_STATIC_IMPLEMENTATION',
                'NDEBUG',
                'NVALGRIND'
            ],
            CPPPATH = [
                env.Dir('$SRC_DIR/net/../third_party/icu/public/common'),
                env.Dir('$SRC_DIR/net/../third_party/icu/public/i18n'),
                env.Dir('$SRC_DIR/net/..'),
                env.Dir('$SRC_DIR/net/../sdch/open-vcdiff/src'),
                env.Dir('$SRC_DIR/net/../third_party/bzip2'),
                env.Dir('$SRC_DIR/net/../third_party/zlib'),
                env.Dir('${SHARED_INTERMEDIATE_DIR}/net'),
                env.Dir('$SRC_DIR/net/../v8/include')
            ],
            CXXFLAGS = [
                '-fno-rtti',
                '-fno-threadsafe-statics',
                '-fvisibility-inlines-hidden'
            ],
            LINKFLAGS = [
                '-pthread',
                '-Wl,--gc-sections'
            ],
        ),
        'FilterOut' : dict(
        ),
        'Replace' : dict(
             FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'],
             FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'],
             FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'],
             IMPLICIT_COMMAND_DEPENDENCIES = '0',
             LDMODULECOM = [['$FLOCK_LDMODULE',
  '-o',
  '$TARGET',
  '$_LIBDIRFLAGS',
  '$LDMODULEFLAGS',
  '$SOURCES',
  '-Wl,--start-group',
  '$_LIBFLAGS',
  '-Wl,--end-group']],
             LIBPATH = ['$LIB_DIR'],
             LINKCOM = [['$FLOCK_LINK',
  '-o',
  '$TARGET',
  '$_LIBDIRFLAGS',
  '$LINKFLAGS',
  '$SOURCES',
  '-Wl,--start-group',
  '$_LIBFLAGS',
  '-Wl,--end-group']],
             SHLINKCOM = [['$FLOCK_SHLINK',
  '-o',
  '$TARGET',
  '$_LIBDIRFLAGS',
  '$SHLINKFLAGS',
  '$SOURCES',
  '-Wl,--start-group',
  '$_LIBFLAGS',
  '-Wl,--end-group']],
        ),
        'ImportExternal' : [
             'AS',
             'CC',
             'CXX',
             'LINK',
        ],
        'PropagateExternal' : [
             'AS',
             'CC',
             'CCACHE_DIR',
             'CXX',
             'DISTCC_DIR',
             'DISTCC_HOSTS',
             'HOME',
             'INCLUDE_SERVER_ARGS',
             'INCLUDE_SERVER_PORT',
             'LINK',
             'CHROME_BUILD_TYPE',
             'CHROMIUM_BUILD',
             'OFFICIAL_BUILD',
        ],
    },
}

config = configurations[env['CONFIG_NAME']]
env.Append(**config['Append'])
env.FilterOut(**config['FilterOut'])
env.Replace(**config['Replace'])

# Scons forces -fPIC for SHCCFLAGS on some platforms.
# Disable that so we can control it from cflags in gyp.
# Note that Scons itself is inconsistent with its -fPIC
# setting. SHCCFLAGS forces -fPIC, and SHCFLAGS does not.
# This will make SHCCFLAGS consistent with SHCFLAGS.
env['SHCCFLAGS'] = ['$CCFLAGS']

for _var in config['ImportExternal']:
  if _var in ARGUMENTS:
    env[_var] = ARGUMENTS[_var]
  elif _var in os.environ:
    env[_var] = os.environ[_var]
for _var in config['PropagateExternal']:
  if _var in ARGUMENTS:
    env[_var] = ARGUMENTS[_var]
  elif _var in os.environ:
    env['ENV'][_var] = os.environ[_var]

env['ENV']['LD_LIBRARY_PATH'] = env.subst('$LIB_DIR')

if ARGUMENTS.get('COVERAGE') not in (None, '0'):
  env.AppendUnique(
            CCFLAGS = [
                '-fprofile-arcs',
                '-ftest-coverage'
            ],
            LINKFLAGS = [
                '-fprofile-arcs'
            ],
  )

if ARGUMENTS.get('PROFILE') not in (None, '0'):
  env.AppendUnique(
            CCFLAGS = [
                '-pg',
                '-g'
            ],
            LINKFLAGS = [
                '-pg'
            ],
  )

if ARGUMENTS.get('SYMBOLS') not in (None, '0'):
  env.AppendUnique(
            CCFLAGS = [
                '-g'
            ],
  )

input_files = [
    'disk_cache/addr.cc',
    'disk_cache/addr.h',
    'disk_cache/backend_impl.cc',
    'disk_cache/backend_impl.h',
    'disk_cache/bitmap.cc',
    'disk_cache/bitmap.h',
    'disk_cache/block_files.cc',
    'disk_cache/block_files.h',
    'disk_cache/cache_util.h',
    'disk_cache/cache_util_posix.cc',
    'disk_cache/disk_cache.h',
    'disk_cache/disk_format.h',
    'disk_cache/entry_impl.cc',
    'disk_cache/entry_impl.h',
    'disk_cache/errors.h',
    'disk_cache/eviction.cc',
    'disk_cache/eviction.h',
    'disk_cache/file.h',
    'disk_cache/file_block.h',
    'disk_cache/file_lock.cc',
    'disk_cache/file_lock.h',
    'disk_cache/file_posix.cc',
    'disk_cache/hash.cc',
    'disk_cache/hash.h',
    'disk_cache/histogram_macros.h',
    'disk_cache/mapped_file.h',
    'disk_cache/mapped_file_posix.cc',
    'disk_cache/mem_backend_impl.cc',
    'disk_cache/mem_backend_impl.h',
    'disk_cache/mem_entry_impl.cc',
    'disk_cache/mem_entry_impl.h',
    'disk_cache/mem_rankings.cc',
    'disk_cache/mem_rankings.h',
    'disk_cache/rankings.cc',
    'disk_cache/rankings.h',
    'disk_cache/sparse_control.cc',
    'disk_cache/sparse_control.h',
    'disk_cache/stats.cc',
    'disk_cache/stats.h',
    'disk_cache/stats_histogram.cc',
    'disk_cache/stats_histogram.h',
    'disk_cache/storage_block-inl.h',
    'disk_cache/storage_block.h',
    'disk_cache/trace.cc',
    'disk_cache/trace.h',
    'flip/flip_bitmasks.h',
    'flip/flip_frame_builder.cc',
    'flip/flip_frame_builder.h',
    'flip/flip_framer.cc',
    'flip/flip_framer.h',
    'flip/flip_io_buffer.cc',
    'flip/flip_io_buffer.h',
    'flip/flip_network_transaction.cc',
    'flip/flip_network_transaction.h',
    'flip/flip_protocol.h',
    'flip/flip_session.cc',
    'flip/flip_session.h',
    'flip/flip_session_pool.cc',
    'flip/flip_session_pool.h',
    'flip/flip_stream.cc',
    'flip/flip_stream.h',
    'flip/flip_transaction_factory.h',
    'ftp/ftp_auth_cache.cc',
    'ftp/ftp_auth_cache.h',
    'ftp/ftp_ctrl_response_buffer.cc',
    'ftp/ftp_ctrl_response_buffer.h',
    'ftp/ftp_directory_listing_buffer.cc',
    'ftp/ftp_directory_listing_buffer.h',
    'ftp/ftp_directory_listing_parsers.cc',
    'ftp/ftp_directory_listing_parsers.h',
    'ftp/ftp_network_layer.cc',
    'ftp/ftp_network_layer.h',
    'ftp/ftp_network_session.h',
    'ftp/ftp_network_transaction.cc',
    'ftp/ftp_network_transaction.h',
    'ftp/ftp_request_info.h',
    'ftp/ftp_response_info.h',
    'ftp/ftp_server_type_histograms.cc',
    'ftp/ftp_server_type_histograms.h',
    'ftp/ftp_transaction.h',
    'ftp/ftp_transaction_factory.h',
    'ftp/ftp_util.cc',
    'ftp/ftp_util.h',
    'http/des.cc',
    'http/des.h',
    'http/http_atom_list.h',
    'http/http_auth.cc',
    'http/http_auth.h',
    'http/http_auth_cache.cc',
    'http/http_auth_cache.h',
    'http/http_auth_handler.h',
    'http/http_auth_handler.cc',
    'http/http_auth_handler_basic.cc',
    'http/http_auth_handler_basic.h',
    'http/http_auth_handler_digest.cc',
    'http/http_auth_handler_digest.h',
    'http/http_auth_handler_ntlm.cc',
    'http/http_auth_handler_ntlm.h',
    'http/http_auth_handler_ntlm_portable.cc',
    'http/http_basic_stream.cc',
    'http/http_basic_stream.h',
    'http/http_byte_range.cc',
    'http/http_byte_range.h',
    'http/http_cache.cc',
    'http/http_cache.h',
    'http/http_cache_transaction.cc',
    'http/http_cache_transaction.h',
    'http/http_chunked_decoder.cc',
    'http/http_chunked_decoder.h',
    'http/http_network_layer.cc',
    'http/http_network_layer.h',
    'http/http_network_session.cc',
    'http/http_network_session.h',
    'http/http_network_transaction.cc',
    'http/http_network_transaction.h',
    'http/http_request_info.h',
    'http/http_response_headers.cc',
    'http/http_response_headers.h',
    'http/http_response_info.cc',
    'http/http_response_info.h',
    'http/http_stream.h',
    'http/http_stream_parser.cc',
    'http/http_stream_parser.h',
    'http/http_transaction.h',
    'http/http_transaction_factory.h',
    'http/http_util.cc',
    'http/http_util_icu.cc',
    'http/http_util.h',
    'http/http_vary_data.cc',
    'http/http_vary_data.h',
    'http/http_version.h',
    'http/md4.cc',
    'http/md4.h',
    'http/partial_data.cc',
    'http/partial_data.h',
    'ocsp/nss_ocsp.cc',
    'ocsp/nss_ocsp.h',
    'proxy/init_proxy_resolver.cc',
    'proxy/init_proxy_resolver.h',
    'proxy/proxy_config.cc',
    'proxy/proxy_config.h',
    'proxy/proxy_config_service.h',
    'proxy/proxy_config_service_fixed.h',
    'proxy/proxy_config_service_linux.cc',
    'proxy/proxy_config_service_linux.h',
    'proxy/proxy_config_service_win.h',
    'proxy/proxy_info.cc',
    'proxy/proxy_info.h',
    'proxy/proxy_list.cc',
    'proxy/proxy_list.h',
    'proxy/proxy_resolver.h',
    'proxy/proxy_resolver_js_bindings.cc',
    'proxy/proxy_resolver_js_bindings.h',
    'proxy/proxy_resolver_mac.h',
    'proxy/proxy_resolver_script.h',
    'proxy/proxy_resolver_v8.cc',
    'proxy/proxy_resolver_v8.h',
    'proxy/proxy_resolver_winhttp.h',
    'proxy/proxy_retry_info.h',
    'proxy/proxy_script_fetcher.cc',
    'proxy/proxy_script_fetcher.h',
    'proxy/proxy_server.cc',
    'proxy/proxy_server.h',
    'proxy/proxy_service.cc',
    'proxy/proxy_service.h',
    'proxy/single_threaded_proxy_resolver.cc',
    'proxy/single_threaded_proxy_resolver.h',
    'socket/client_socket.cc',
    'socket/client_socket.h',
    'socket/client_socket_factory.cc',
    'socket/client_socket_factory.h',
    'socket/client_socket_handle.cc',
    'socket/client_socket_handle.h',
    'socket/client_socket_pool.h',
    'socket/client_socket_pool_base.cc',
    'socket/client_socket_pool_base.h',
    'socket/socket.h',
    'socket/socks5_client_socket.cc',
    'socket/socks5_client_socket.h',
    'socket/socks_client_socket.cc',
    'socket/socks_client_socket.h',
    'socket/ssl_client_socket.h',
    'socket/ssl_client_socket_mac.h',
    'socket/ssl_client_socket_nss.cc',
    'socket/ssl_client_socket_nss.h',
    'socket/ssl_client_socket_win.h',
    'socket/ssl_test_util.cc',
    'socket/ssl_test_util.h',
    'socket/tcp_client_socket.h',
    'socket/tcp_client_socket_libevent.cc',
    'socket/tcp_client_socket_libevent.h',
    'socket/tcp_client_socket_pool.cc',
    'socket/tcp_client_socket_pool.h',
    'socket/tcp_client_socket_win.h',
    'socket/tcp_pinger.h',
    'socket_stream/socket_stream.cc',
    'socket_stream/socket_stream.h',
    'socket_stream/socket_stream_metrics.cc',
    'socket_stream/socket_stream_metrics.h',
    'socket_stream/socket_stream_throttle.cc',
    'socket_stream/socket_stream_throttle.h',
    'third_party/parseftp/ParseFTPList.cpp',
    'third_party/parseftp/ParseFTPList.h',
    'url_request/request_tracker.h',
    'url_request/url_request.cc',
    'url_request/url_request.h',
    'url_request/url_request_about_job.cc',
    'url_request/url_request_about_job.h',
    'url_request/url_request_context.h',
    'url_request/url_request_data_job.cc',
    'url_request/url_request_data_job.h',
    'url_request/url_request_error_job.cc',
    'url_request/url_request_error_job.h',
    'url_request/url_request_file_dir_job.cc',
    'url_request/url_request_file_dir_job.h',
    'url_request/url_request_file_job.cc',
    'url_request/url_request_file_job.h',
    'url_request/url_request_filter.cc',
    'url_request/url_request_filter.h',
    'url_request/url_request_ftp_job.h',
    'url_request/url_request_http_job.cc',
    'url_request/url_request_http_job.h',
    'url_request/url_request_inet_job.h',
    'url_request/url_request_job.cc',
    'url_request/url_request_job.h',
    'url_request/url_request_job_manager.cc',
    'url_request/url_request_job_manager.h',
    'url_request/url_request_job_metrics.cc',
    'url_request/url_request_job_metrics.h',
    'url_request/url_request_job_tracker.cc',
    'url_request/url_request_job_tracker.h',
    'url_request/url_request_new_ftp_job.cc',
    'url_request/url_request_new_ftp_job.h',
    'url_request/url_request_redirect_job.cc',
    'url_request/url_request_redirect_job.h',
    'url_request/url_request_simple_job.cc',
    'url_request/url_request_simple_job.h',
    'url_request/url_request_status.h',
    'url_request/url_request_test_job.cc',
    'url_request/url_request_test_job.h',
    'url_request/url_request_view_net_internals_job.cc',
    'url_request/url_request_view_net_internals_job.h',
    'url_request/view_cache_helper.cc',
    'url_request/view_cache_helper.h',
    'websockets/websocket.cc',
    'websockets/websocket.h',
    'websockets/websocket_throttle.cc',
    'websockets/websocket_throttle.h',
]

target_files = []
prerequisites = []

_result = []
for infile in input_files:
  if env.compilable(infile):
    if (type(infile) == type('')
        and (infile.startswith('$SRC_DIR/net/')
             or not os.path.isabs(env.subst(infile)))):
      # Force files below the build directory by replacing all '..'
      # elements in the path with '__':
      base, ext = os.path.splitext(os.path.normpath(infile))
      base = [d == '..' and '__' or d for d in base.split('/')]
      base = os.path.join(*base)
      object = '${OBJ_DIR}/${COMPONENT_NAME}/${TARGET_NAME}/' + base
      if not infile.startswith('$SRC_DIR/net/'):
        infile = '$SRC_DIR/net/' + infile
      infile = env.StaticObject(object, infile)[0]
    else:
      infile = env.StaticObject(infile)[0]
  _result.append(infile)
input_files = _result

_outputs = env.GypStaticLibrary('net', input_files)
target_files.extend(_outputs)

gyp_target = env.Alias('net', target_files)
dependencies = [
    Alias('net_resources'),
    Alias('v8'),
    Alias('gconf'),
    Alias('gdk'),
    Alias('nss')
]
env.Requires(target_files, dependencies)
env.Requires(gyp_target, dependencies)
for prerequisite in prerequisites:
  env.Requires(prerequisite, dependencies)
env.Requires(gyp_target, prerequisites)
Return("gyp_target")