2012-05-21 15:12:37 +04:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2009-06-29 22:31:58 +04:00
|
|
|
|
2012-08-04 22:26:44 +04:00
|
|
|
DEPTH = @DEPTH@
|
2009-06-29 22:31:58 +04:00
|
|
|
topsrcdir = @top_srcdir@
|
2012-04-10 21:45:15 +04:00
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
2009-06-29 22:31:58 +04:00
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2009-06-30 20:02:37 +04:00
|
|
|
OS_CXXFLAGS := $(filter-out -fshort-wchar,$(OS_CXXFLAGS))
|
|
|
|
|
2009-06-29 22:31:58 +04:00
|
|
|
LIBRARY_NAME = chromium_s
|
|
|
|
FORCE_STATIC_LIB = 1
|
2009-06-30 20:02:37 +04:00
|
|
|
LIBXUL_LIBRARY = 1
|
|
|
|
EXPORT_LIBRARY = 1
|
2009-06-29 22:31:58 +04:00
|
|
|
|
|
|
|
ACDEFINES =
|
|
|
|
|
2010-04-20 11:06:55 +04:00
|
|
|
ifndef MOZ_NATIVE_LIBEVENT # {
|
2009-06-29 22:31:58 +04:00
|
|
|
vpath %.c \
|
|
|
|
$(srcdir)/src/third_party/libevent \
|
|
|
|
$(NULL)
|
2010-04-20 11:06:55 +04:00
|
|
|
else # } else {
|
|
|
|
# message_pump_libevent.cc includes third_party/libevent/event.h,
|
|
|
|
# which we put in $(DIST), see export rule below
|
|
|
|
LOCAL_INCLUDES += -I$(DIST)
|
|
|
|
endif # }
|
2009-06-29 22:31:58 +04:00
|
|
|
|
|
|
|
vpath %.cc \
|
|
|
|
$(srcdir)/src/base \
|
|
|
|
$(srcdir)/src/chrome/common \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
vpath %.mm \
|
|
|
|
$(srcdir)/src/base \
|
|
|
|
$(srcdir)/src/chrome/common \
|
|
|
|
$(NULL)
|
|
|
|
|
2009-06-30 20:02:37 +04:00
|
|
|
include $(topsrcdir)/config/config.mk
|
|
|
|
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
|
|
|
|
2009-06-29 22:31:58 +04:00
|
|
|
CPPSRCS += \
|
|
|
|
at_exit.cc \
|
|
|
|
base_paths.cc \
|
|
|
|
base_switches.cc \
|
|
|
|
command_line.cc \
|
|
|
|
debug_util.cc \
|
|
|
|
file_path.cc \
|
|
|
|
file_util.cc \
|
|
|
|
histogram.cc \
|
|
|
|
lazy_instance.cc \
|
|
|
|
lock.cc \
|
|
|
|
logging.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 \
|
|
|
|
scoped_temp_dir.cc \
|
|
|
|
simple_thread.cc \
|
|
|
|
stats_table.cc \
|
|
|
|
string_escape.cc \
|
|
|
|
string_piece.cc \
|
|
|
|
string_util.cc \
|
|
|
|
system_monitor.cc \
|
|
|
|
thread.cc \
|
|
|
|
thread_collision_warner.cc \
|
|
|
|
time.cc \
|
|
|
|
timer.cc \
|
|
|
|
trace_event.cc \
|
|
|
|
tracked.cc \
|
|
|
|
tracked_objects.cc \
|
|
|
|
child_process.cc \
|
|
|
|
child_process_host.cc \
|
|
|
|
child_process_info.cc \
|
|
|
|
child_thread.cc \
|
|
|
|
chrome_counters.cc \
|
|
|
|
chrome_paths.cc \
|
|
|
|
chrome_switches.cc \
|
|
|
|
debug_flags.cc \
|
|
|
|
env_vars.cc \
|
|
|
|
ipc_channel_proxy.cc \
|
|
|
|
ipc_logging.cc \
|
|
|
|
ipc_message.cc \
|
|
|
|
ipc_message_utils.cc \
|
|
|
|
ipc_sync_channel.cc \
|
|
|
|
ipc_sync_message.cc \
|
|
|
|
message_router.cc \
|
|
|
|
notification_service.cc \
|
|
|
|
task_queue.cc \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
ifdef OS_WIN # {
|
|
|
|
|
|
|
|
CPPSRCS += \
|
|
|
|
base_paths_win.cc \
|
|
|
|
cpu.cc \
|
|
|
|
condition_variable_win.cc \
|
|
|
|
debug_util_win.cc \
|
|
|
|
event_recorder.cc \
|
|
|
|
file_util_win.cc \
|
|
|
|
file_version_info.cc \
|
|
|
|
lock_impl_win.cc \
|
|
|
|
idle_timer.cc \
|
|
|
|
message_pump_win.cc \
|
|
|
|
object_watcher.cc \
|
|
|
|
platform_file_win.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_watcher_win.cc \
|
|
|
|
waitable_event_win.cc \
|
|
|
|
win_util.cc \
|
|
|
|
chrome_paths_win.cc \
|
2010-11-07 11:20:50 +03:00
|
|
|
chrome_constants.cc \
|
2009-06-29 22:31:58 +04:00
|
|
|
ipc_channel_win.cc \
|
|
|
|
process_watcher_win.cc \
|
|
|
|
transport_dib_win.cc \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
endif # } OS_WIN
|
|
|
|
|
2011-04-28 15:36:38 +04:00
|
|
|
ifdef _MSC_VER # {
|
|
|
|
|
|
|
|
CPPSRCS += \
|
|
|
|
debug_on_start.cc
|
|
|
|
|
|
|
|
endif # }
|
|
|
|
|
2009-06-29 22:31:58 +04:00
|
|
|
ifdef OS_POSIX # {
|
|
|
|
|
|
|
|
CPPSRCS += \
|
|
|
|
condition_variable_posix.cc \
|
|
|
|
debug_util_posix.cc \
|
|
|
|
event_recorder_stubs.cc \
|
|
|
|
file_descriptor_shuffle.cc \
|
|
|
|
file_util_posix.cc \
|
|
|
|
lock_impl_posix.cc \
|
|
|
|
message_pump_libevent.cc \
|
|
|
|
platform_file_posix.cc \
|
|
|
|
platform_thread_posix.cc \
|
|
|
|
process_posix.cc \
|
|
|
|
process_util_posix.cc \
|
|
|
|
rand_util_posix.cc \
|
|
|
|
shared_memory_posix.cc \
|
|
|
|
string16.cc \
|
|
|
|
system_monitor_posix.cc \
|
|
|
|
sys_info_posix.cc \
|
|
|
|
thread_local_posix.cc \
|
|
|
|
thread_local_storage_posix.cc \
|
|
|
|
waitable_event_posix.cc \
|
|
|
|
waitable_event_watcher_posix.cc \
|
|
|
|
file_descriptor_set_posix.cc \
|
|
|
|
ipc_channel_posix.cc \
|
2009-12-03 06:09:47 +03:00
|
|
|
process_watcher_posix_sigchld.cc \
|
2009-06-29 22:31:58 +04:00
|
|
|
$(NULL)
|
|
|
|
|
2010-06-25 22:39:02 +04:00
|
|
|
ifeq ($(OS_TARGET),Android)
|
|
|
|
DEFINES += -DANDROID -D_POSIX_MONOTONIC_CLOCK=0
|
|
|
|
CPPSRCS += \
|
|
|
|
message_pump_android.cc \
|
|
|
|
$(NULL)
|
|
|
|
endif # Android
|
|
|
|
|
2009-06-29 22:31:58 +04:00
|
|
|
endif # } OS_POSIX
|
|
|
|
|
|
|
|
ifdef OS_MACOSX # {
|
|
|
|
|
|
|
|
CMMSRCS += \
|
|
|
|
base_paths_mac.mm \
|
|
|
|
file_util_mac.mm \
|
|
|
|
file_version_info_mac.mm \
|
|
|
|
mac_util.mm \
|
|
|
|
message_pump_mac.mm \
|
|
|
|
platform_thread_mac.mm \
|
|
|
|
process_util_mac.mm \
|
|
|
|
scoped_nsautorelease_pool.mm \
|
|
|
|
sys_string_conversions_mac.mm \
|
|
|
|
worker_pool_mac.mm \
|
|
|
|
chrome_paths_mac.mm \
|
|
|
|
mach_ipc_mac.mm \
|
|
|
|
platform_util_mac.mm \
|
2010-03-18 03:10:42 +03:00
|
|
|
chrome_application_mac.mm \
|
2009-06-29 22:31:58 +04:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
CPPSRCS += \
|
|
|
|
debug_util_mac.cc \
|
|
|
|
hmac_mac.cc \
|
|
|
|
idle_timer.cc \
|
|
|
|
sys_info_mac.cc \
|
|
|
|
time_mac.cc \
|
|
|
|
mach_message_source_mac.cc \
|
|
|
|
transport_dib_mac.cc \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
endif # } OS_MACOSX
|
|
|
|
|
|
|
|
ifdef OS_LINUX # {
|
|
|
|
|
|
|
|
CPPSRCS += \
|
|
|
|
atomicops_internals_x86_gcc.cc \
|
|
|
|
base_paths_linux.cc \
|
|
|
|
file_version_info_linux.cc \
|
|
|
|
idle_timer_none.cc \
|
|
|
|
process_util_linux.cc \
|
|
|
|
time_posix.cc \
|
|
|
|
$(NULL)
|
|
|
|
|
2010-02-19 00:48:50 +03:00
|
|
|
ifdef MOZ_ENABLE_GTK2
|
|
|
|
CPPSRCS += \
|
|
|
|
message_pump_glib.cc \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_QT
|
|
|
|
MOCSRCS = \
|
|
|
|
moc_message_pump_qt.cc \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
CPPSRCS += \
|
|
|
|
$(MOCSRCS) \
|
|
|
|
message_pump_qt.cc \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
|
|
|
|
2009-06-29 22:31:58 +04:00
|
|
|
endif # } OS_LINUX
|
|
|
|
|
2012-08-29 01:16:51 +04:00
|
|
|
ifdef OS_BSD # {
|
|
|
|
|
|
|
|
CPPSRCS += \
|
|
|
|
atomicops_internals_x86_gcc.cc \
|
|
|
|
process_util_bsd.cc \
|
|
|
|
time_posix.cc \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_GTK2
|
|
|
|
CPPSRCS += \
|
|
|
|
message_pump_glib.cc \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_QT
|
|
|
|
MOCSRCS = \
|
|
|
|
moc_message_pump_qt.cc \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
CPPSRCS += \
|
|
|
|
$(MOCSRCS) \
|
|
|
|
message_pump_qt.cc \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif # } OS_BSD
|
|
|
|
|
2009-06-29 22:31:58 +04:00
|
|
|
# libevent
|
|
|
|
|
2010-04-20 11:06:55 +04:00
|
|
|
ifndef MOZ_NATIVE_LIBEVENT # {
|
|
|
|
|
2009-06-29 22:31:58 +04:00
|
|
|
ifdef OS_POSIX # {
|
|
|
|
|
2009-06-30 20:02:37 +04:00
|
|
|
LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent
|
2013-03-29 18:34:53 +04:00
|
|
|
LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/include
|
2009-06-29 22:31:58 +04:00
|
|
|
DEFINES += -DHAVE_CONFIG_H
|
|
|
|
|
|
|
|
CSRCS += \
|
|
|
|
buffer.c \
|
2013-03-29 18:34:53 +04:00
|
|
|
bufferevent.c \
|
|
|
|
bufferevent_sock.c \
|
|
|
|
bufferevent_ratelim.c \
|
2009-06-29 22:31:58 +04:00
|
|
|
evdns.c \
|
|
|
|
event.c \
|
|
|
|
event_tagging.c \
|
2013-03-29 18:34:53 +04:00
|
|
|
evmap.c \
|
|
|
|
evthread.c \
|
|
|
|
evthread_pthread.c \
|
2009-06-29 22:31:58 +04:00
|
|
|
evrpc.c \
|
|
|
|
evutil.c \
|
2013-03-29 18:34:53 +04:00
|
|
|
evutil_rand.c \
|
2009-06-29 22:31:58 +04:00
|
|
|
http.c \
|
2013-03-29 18:34:53 +04:00
|
|
|
listener.c \
|
2009-06-29 22:31:58 +04:00
|
|
|
log.c \
|
|
|
|
poll.c \
|
|
|
|
select.c \
|
|
|
|
signal.c \
|
|
|
|
strlcpy.c \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
ifdef OS_MACOSX # {
|
2009-06-30 20:02:37 +04:00
|
|
|
LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/mac
|
2009-06-29 22:31:58 +04:00
|
|
|
CSRCS += kqueue.c
|
|
|
|
endif # }
|
|
|
|
|
|
|
|
ifdef OS_LINUX # {
|
2013-03-29 18:34:53 +04:00
|
|
|
ifeq ($(OS_TARGET),Android) # {
|
|
|
|
LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/android
|
|
|
|
else # } else {
|
2009-06-30 20:02:37 +04:00
|
|
|
LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/linux
|
2013-03-29 18:34:53 +04:00
|
|
|
endif # }
|
2009-06-29 22:31:58 +04:00
|
|
|
CSRCS += \
|
|
|
|
epoll.c \
|
|
|
|
epoll_sub.c \
|
|
|
|
$(NULL)
|
|
|
|
endif # }
|
|
|
|
|
|
|
|
endif # }
|
|
|
|
|
2010-04-20 11:06:55 +04:00
|
|
|
endif # }
|
|
|
|
|
2010-05-06 01:35:09 +04:00
|
|
|
ifneq (86,$(findstring 86,$(OS_TEST))) # {
|
|
|
|
ifneq (arm,$(findstring arm,$(OS_TEST))) # {
|
2012-01-13 07:18:05 +04:00
|
|
|
ifneq (mips,$(findstring mips,$(OS_TEST))) # {
|
2010-05-06 01:35:09 +04:00
|
|
|
# Use mutex-backed atomics
|
|
|
|
CPPSRCS += atomicops_internals_mutex.cc
|
|
|
|
endif # }
|
|
|
|
endif # }
|
2012-01-13 07:18:05 +04:00
|
|
|
endif # }
|
2010-05-06 01:35:09 +04:00
|
|
|
|
2013-04-08 10:36:01 +04:00
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
OS_CFLAGS += -DUSE_DEBUG
|
|
|
|
endif
|
|
|
|
|
2010-05-13 19:52:59 +04:00
|
|
|
OS_CXXFLAGS += $(TK_CFLAGS)
|
|
|
|
|
2009-06-29 22:31:58 +04:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2010-04-20 11:06:55 +04:00
|
|
|
|
|
|
|
ifdef MOZ_NATIVE_LIBEVENT # {
|
2012-05-03 14:22:33 +04:00
|
|
|
|
2013-03-11 07:03:28 +04:00
|
|
|
export-preqs = \
|
|
|
|
$(call mkdir_deps,$(DIST)/third_party/libevent) \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
export:: $(export-preqs)
|
2010-04-20 11:06:55 +04:00
|
|
|
echo "#include <event.h>" > $(DIST)/third_party/libevent/event.h
|
2012-05-03 14:22:33 +04:00
|
|
|
|
2010-04-20 11:06:55 +04:00
|
|
|
endif # }
|