michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: os_win = 0 michael@0: os_posix = 0 michael@0: os_macosx = 0 michael@0: os_dragonfly = 0 michael@0: os_freebsd = 0 michael@0: os_netbsd = 0 michael@0: os_openbsd = 0 michael@0: os_bsd = 0 michael@0: os_linux = 0 michael@0: michael@0: if CONFIG['OS_ARCH'] == 'WINNT': michael@0: os_win = 1 michael@0: else: michael@0: os_posix = 1 michael@0: if CONFIG['OS_ARCH'] == 'Darwin': michael@0: os_macosx = 1 michael@0: elif CONFIG['OS_ARCH'] == 'DragonFly': michael@0: os_dragonfly = 1 michael@0: os_bsd = 1 michael@0: elif CONFIG['OS_ARCH'] in ['FreeBSD', 'GNU_kFreeBSD']: michael@0: os_freebsd = 1 michael@0: os_bsd = 1 michael@0: elif CONFIG['OS_ARCH'] == 'NetBSD': michael@0: os_netbsd = 1 michael@0: os_bsd = 1 michael@0: elif CONFIG['OS_ARCH'] == 'OpenBSD': michael@0: os_openbsd = 1 michael@0: os_bsd = 1 michael@0: else: michael@0: os_linux = 1 michael@0: michael@0: UNIFIED_SOURCES += [ michael@0: 'src/base/at_exit.cc', michael@0: 'src/base/base_paths.cc', michael@0: 'src/base/base_switches.cc', michael@0: 'src/base/command_line.cc', michael@0: 'src/base/debug_util.cc', michael@0: 'src/base/file_path.cc', michael@0: 'src/base/file_util.cc', michael@0: 'src/base/histogram.cc', michael@0: 'src/base/lazy_instance.cc', michael@0: 'src/base/lock.cc', michael@0: 'src/base/logging.cc', michael@0: 'src/base/memory_debug.cc', michael@0: 'src/base/message_loop.cc', michael@0: 'src/base/message_pump_default.cc', michael@0: 'src/base/non_thread_safe.cc', michael@0: 'src/base/path_service.cc', michael@0: 'src/base/pickle.cc', michael@0: 'src/base/rand_util.cc', michael@0: 'src/base/ref_counted.cc', michael@0: 'src/base/revocable_store.cc', michael@0: 'src/base/scoped_temp_dir.cc', michael@0: 'src/base/simple_thread.cc', michael@0: 'src/base/stats_table.cc', michael@0: 'src/base/string_piece.cc', michael@0: 'src/base/string_util.cc', michael@0: 'src/base/system_monitor.cc', michael@0: 'src/base/thread.cc', michael@0: 'src/base/thread_collision_warner.cc', michael@0: 'src/base/time.cc', michael@0: 'src/base/timer.cc', michael@0: 'src/base/trace_event.cc', michael@0: 'src/base/tracked.cc', michael@0: 'src/base/tracked_objects.cc', michael@0: 'src/chrome/common/child_process.cc', michael@0: 'src/chrome/common/child_process_host.cc', michael@0: 'src/chrome/common/child_process_info.cc', michael@0: 'src/chrome/common/child_thread.cc', michael@0: 'src/chrome/common/chrome_switches.cc', michael@0: 'src/chrome/common/debug_flags.cc', michael@0: 'src/chrome/common/env_vars.cc', michael@0: 'src/chrome/common/ipc_channel_proxy.cc', michael@0: 'src/chrome/common/ipc_logging.cc', michael@0: 'src/chrome/common/ipc_message.cc', michael@0: 'src/chrome/common/ipc_sync_channel.cc', michael@0: 'src/chrome/common/ipc_sync_message.cc', michael@0: 'src/chrome/common/message_router.cc', michael@0: 'src/chrome/common/notification_service.cc', michael@0: 'src/chrome/common/task_queue.cc', michael@0: ] michael@0: michael@0: if os_win: michael@0: SOURCES += [ michael@0: 'src/base/base_paths_win.cc', michael@0: 'src/base/condition_variable_win.cc', michael@0: 'src/base/cpu.cc', michael@0: 'src/base/debug_util_win.cc', michael@0: 'src/base/event_recorder.cc', michael@0: 'src/base/file_util_win.cc', michael@0: 'src/base/idle_timer.cc', michael@0: 'src/base/lock_impl_win.cc', michael@0: 'src/base/message_pump_win.cc', michael@0: 'src/base/object_watcher.cc', michael@0: 'src/base/platform_file_win.cc', michael@0: 'src/base/platform_thread_win.cc', michael@0: 'src/base/process_util_win.cc', michael@0: 'src/base/process_win.cc', michael@0: 'src/base/rand_util_win.cc', michael@0: 'src/base/registry.cc', michael@0: 'src/base/shared_memory_win.cc', michael@0: 'src/base/sys_info_win.cc', michael@0: 'src/base/sys_string_conversions_win.cc', michael@0: 'src/base/system_monitor_win.cc', michael@0: 'src/base/thread_local_storage_win.cc', michael@0: 'src/base/thread_local_win.cc', michael@0: 'src/base/time_win.cc', michael@0: 'src/base/waitable_event_watcher_win.cc', michael@0: 'src/base/waitable_event_win.cc', michael@0: 'src/base/win_util.cc', michael@0: 'src/chrome/common/ipc_channel_win.cc', michael@0: 'src/chrome/common/process_watcher_win.cc', michael@0: 'src/chrome/common/transport_dib_win.cc', michael@0: ] michael@0: elif not CONFIG['MOZ_NATIVE_LIBEVENT']: michael@0: SOURCES += [ michael@0: 'src/third_party/libevent/buffer.c', michael@0: 'src/third_party/libevent/bufferevent.c', michael@0: 'src/third_party/libevent/bufferevent_ratelim.c', michael@0: 'src/third_party/libevent/bufferevent_sock.c', michael@0: 'src/third_party/libevent/evdns.c', michael@0: 'src/third_party/libevent/event.c', michael@0: 'src/third_party/libevent/event_tagging.c', michael@0: 'src/third_party/libevent/evmap.c', michael@0: 'src/third_party/libevent/evrpc.c', michael@0: 'src/third_party/libevent/evthread.c', michael@0: 'src/third_party/libevent/evthread_pthread.c', michael@0: 'src/third_party/libevent/evutil.c', michael@0: 'src/third_party/libevent/evutil_rand.c', michael@0: 'src/third_party/libevent/http.c', michael@0: 'src/third_party/libevent/listener.c', michael@0: 'src/third_party/libevent/log.c', michael@0: 'src/third_party/libevent/poll.c', michael@0: 'src/third_party/libevent/select.c', michael@0: 'src/third_party/libevent/signal.c', michael@0: 'src/third_party/libevent/strlcpy.c', michael@0: ] michael@0: DEFINES['HAVE_CONFIG_H'] = True michael@0: LOCAL_INCLUDES += [ michael@0: 'src/third_party/libevent', michael@0: 'src/third_party/libevent/include', michael@0: ] michael@0: michael@0: if os_posix: michael@0: SOURCES += [ michael@0: 'src/base/condition_variable_posix.cc', michael@0: 'src/base/debug_util_posix.cc', michael@0: 'src/base/event_recorder_stubs.cc', michael@0: 'src/base/file_descriptor_shuffle.cc', michael@0: 'src/base/file_util_posix.cc', michael@0: 'src/base/lock_impl_posix.cc', michael@0: 'src/base/message_pump_libevent.cc', michael@0: 'src/base/platform_file_posix.cc', michael@0: 'src/base/platform_thread_posix.cc', michael@0: 'src/base/process_posix.cc', michael@0: 'src/base/process_util_posix.cc', michael@0: 'src/base/rand_util_posix.cc', michael@0: 'src/base/shared_memory_posix.cc', michael@0: 'src/base/string16.cc', michael@0: 'src/base/sys_info_posix.cc', michael@0: 'src/base/system_monitor_posix.cc', michael@0: 'src/base/thread_local_posix.cc', michael@0: 'src/base/thread_local_storage_posix.cc', michael@0: 'src/base/waitable_event_posix.cc', michael@0: 'src/base/waitable_event_watcher_posix.cc', michael@0: 'src/chrome/common/file_descriptor_set_posix.cc', michael@0: 'src/chrome/common/ipc_channel_posix.cc', michael@0: 'src/chrome/common/process_watcher_posix_sigchld.cc', michael@0: ] michael@0: if CONFIG['OS_TARGET'] == 'Android': michael@0: SOURCES += [ michael@0: 'src/base/message_pump_android.cc', michael@0: ] michael@0: DEFINES['ANDROID'] = True michael@0: DEFINES['_POSIX_MONOTONIC_CLOCK'] = 0 michael@0: michael@0: if os_macosx: michael@0: UNIFIED_SOURCES += [ michael@0: 'src/base/debug_util_mac.cc', michael@0: 'src/base/hmac_mac.cc', michael@0: 'src/base/idle_timer.cc', michael@0: 'src/base/sys_info_mac.cc', michael@0: 'src/base/time_mac.cc', michael@0: 'src/chrome/common/mach_message_source_mac.cc', michael@0: 'src/chrome/common/transport_dib_mac.cc', michael@0: ] michael@0: SOURCES += [ michael@0: 'src/base/base_paths_mac.mm', michael@0: 'src/base/chrome_application_mac.mm', michael@0: 'src/base/file_util_mac.mm', michael@0: 'src/base/mac_util.mm', michael@0: 'src/base/message_pump_mac.mm', michael@0: 'src/base/platform_thread_mac.mm', michael@0: 'src/base/process_util_mac.mm', michael@0: 'src/base/scoped_nsautorelease_pool.mm', michael@0: 'src/base/sys_string_conversions_mac.mm', michael@0: 'src/base/worker_pool_mac.mm', michael@0: 'src/chrome/common/mach_ipc_mac.mm', michael@0: ] michael@0: if not CONFIG['MOZ_NATIVE_LIBEVENT']: michael@0: UNIFIED_SOURCES += [ michael@0: 'src/third_party/libevent/kqueue.c', michael@0: ] michael@0: LOCAL_INCLUDES += ['src/third_party/libevent/mac'] michael@0: michael@0: if os_linux: michael@0: SOURCES += [ michael@0: 'src/base/atomicops_internals_x86_gcc.cc', michael@0: 'src/base/base_paths_linux.cc', michael@0: 'src/base/idle_timer_none.cc', michael@0: 'src/base/process_util_linux.cc', michael@0: 'src/base/time_posix.cc', michael@0: ] michael@0: if CONFIG['MOZ_WIDGET_GTK']: michael@0: SOURCES += [ michael@0: 'src/base/message_pump_glib.cc', michael@0: ] michael@0: if CONFIG['MOZ_ENABLE_QT']: michael@0: SOURCES += [ michael@0: 'src/base/message_pump_qt.cc', michael@0: ] michael@0: GENERATED_SOURCES += [ michael@0: 'moc_message_pump_qt.cc', michael@0: ] michael@0: if not CONFIG['MOZ_NATIVE_LIBEVENT']: michael@0: if CONFIG['OS_TARGET'] != 'Android': michael@0: SOURCES += [ michael@0: 'src/third_party/libevent/epoll_sub.c', michael@0: ] michael@0: SOURCES += [ michael@0: 'src/third_party/libevent/epoll.c', michael@0: ] michael@0: if CONFIG['OS_TARGET'] == 'Android': michael@0: LOCAL_INCLUDES += ['src/third_party/libevent/android'] michael@0: else: michael@0: LOCAL_INCLUDES += ['src/third_party/libevent/linux'] michael@0: michael@0: if os_bsd: michael@0: SOURCES += [ michael@0: 'src/base/atomicops_internals_x86_gcc.cc', michael@0: 'src/base/time_posix.cc', michael@0: ] michael@0: if CONFIG['OS_ARCH'] == 'GNU_kFreeBSD': michael@0: SOURCES += [ michael@0: 'src/base/process_util_linux.cc' michael@0: ] michael@0: else: michael@0: SOURCES += [ michael@0: 'src/base/process_util_bsd.cc' michael@0: ] michael@0: if CONFIG['MOZ_WIDGET_GTK']: michael@0: SOURCES += [ michael@0: 'src/base/message_pump_glib.cc', michael@0: ] michael@0: if CONFIG['MOZ_ENABLE_QT']: michael@0: SOURCES += [ michael@0: 'src/base/message_pump_qt.cc', michael@0: ] michael@0: GENERATED_SOURCES += [ michael@0: 'moc_message_pump_qt.cc', michael@0: ] michael@0: if not CONFIG['MOZ_NATIVE_LIBEVENT']: michael@0: SOURCES += [ michael@0: 'src/third_party/libevent/kqueue.c', michael@0: ] michael@0: LOCAL_INCLUDES += ['src/third_party/libevent/bsd'] michael@0: michael@0: if CONFIG['_MSC_VER']: michael@0: SOURCES += [ michael@0: 'src/base/debug_on_start.cc', michael@0: ] michael@0: michael@0: ost = CONFIG['OS_TEST'] michael@0: if ost.find('86') == -1 and ost.find('arm') == -1 and ost.find('mips') == -1: michael@0: SOURCES += [ michael@0: 'src/base/atomicops_internals_mutex.cc', michael@0: ] michael@0: michael@0: include('/ipc/chromium/chromium-config.mozbuild') michael@0: michael@0: FINAL_LIBRARY = 'xul'