2009-06-29 11:31:58 -07:00
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
# 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
# http://www.mozilla.org/MPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
# for the specific language governing rights and limitations under the
|
|
|
|
# License.
|
|
|
|
#
|
|
|
|
# The Original Code is the Mozilla platform.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is
|
|
|
|
# the Mozilla Foundation <http://www.mozilla.org/>.
|
|
|
|
# Portions created by the Initial Developer are Copyright (C) 2009
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
# of those above. If you wish to allow use of your version of this file only
|
|
|
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
# use your version of this file under the terms of the MPL, indicate your
|
|
|
|
# decision by deleting the provisions above and replace them with the notice
|
|
|
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
# the provisions above, a recipient may use your version of this file under
|
|
|
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
#
|
|
|
|
# ***** END LICENSE BLOCK *****
|
|
|
|
|
|
|
|
DEPTH = ../..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2009-06-30 09:02:37 -07:00
|
|
|
OS_CXXFLAGS := $(filter-out -fshort-wchar,$(OS_CXXFLAGS))
|
|
|
|
|
2009-06-29 11:31:58 -07:00
|
|
|
LIBRARY_NAME = chromium_s
|
|
|
|
FORCE_STATIC_LIB = 1
|
2009-06-30 09:02:37 -07:00
|
|
|
LIBXUL_LIBRARY = 1
|
|
|
|
EXPORT_LIBRARY = 1
|
2009-06-29 11:31:58 -07:00
|
|
|
|
|
|
|
ACDEFINES =
|
|
|
|
|
2010-04-20 00:06:55 -07:00
|
|
|
ifndef MOZ_NATIVE_LIBEVENT # {
|
2009-06-29 11:31:58 -07:00
|
|
|
vpath %.c \
|
|
|
|
$(srcdir)/src/third_party/libevent \
|
|
|
|
$(NULL)
|
2010-04-20 00:06:55 -07: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 11:31:58 -07:00
|
|
|
|
|
|
|
vpath %.cc \
|
|
|
|
$(srcdir)/src/base \
|
|
|
|
$(srcdir)/src/base/third_party/nspr \
|
|
|
|
$(srcdir)/src/base/third_party/nss \
|
|
|
|
$(srcdir)/src/chrome/common \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
vpath %.mm \
|
|
|
|
$(srcdir)/src/base \
|
|
|
|
$(srcdir)/src/chrome/common \
|
|
|
|
$(NULL)
|
|
|
|
|
2009-06-30 09:02:37 -07:00
|
|
|
include $(topsrcdir)/config/config.mk
|
|
|
|
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
|
|
|
|
2009-06-29 11:31:58 -07:00
|
|
|
CPPSRCS += \
|
|
|
|
prtime.cc \
|
|
|
|
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 \
|
|
|
|
sha2.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 \
|
2010-11-07 01:20:50 -07:00
|
|
|
sha512.cc \
|
2009-06-29 11:31:58 -07:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
ifdef OS_WIN # {
|
|
|
|
|
|
|
|
CPPSRCS += \
|
|
|
|
base_paths_win.cc \
|
|
|
|
cpu.cc \
|
|
|
|
condition_variable_win.cc \
|
|
|
|
debug_on_start.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 01:20:50 -07:00
|
|
|
chrome_constants.cc \
|
2009-06-29 11:31:58 -07:00
|
|
|
ipc_channel_win.cc \
|
|
|
|
process_watcher_win.cc \
|
|
|
|
transport_dib_win.cc \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
endif # } OS_WIN
|
|
|
|
|
|
|
|
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-02 19:09:47 -08:00
|
|
|
process_watcher_posix_sigchld.cc \
|
2009-06-29 11:31:58 -07:00
|
|
|
$(NULL)
|
|
|
|
|
2010-06-25 11:39:02 -07:00
|
|
|
ifeq ($(OS_TARGET),Android)
|
|
|
|
DEFINES += -DANDROID -D_POSIX_MONOTONIC_CLOCK=0
|
|
|
|
CPPSRCS += \
|
|
|
|
message_pump_android.cc \
|
|
|
|
$(NULL)
|
|
|
|
endif # Android
|
|
|
|
|
2009-06-29 11:31:58 -07: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-17 17:10:42 -07:00
|
|
|
chrome_application_mac.mm \
|
2009-06-29 11:31:58 -07: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 \
|
|
|
|
data_pack.cc \
|
|
|
|
file_util_linux.cc \
|
|
|
|
file_version_info_linux.cc \
|
|
|
|
idle_timer_none.cc \
|
|
|
|
process_util_linux.cc \
|
|
|
|
time_posix.cc \
|
|
|
|
$(NULL)
|
|
|
|
|
2010-02-18 13:48:50 -08: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 11:31:58 -07:00
|
|
|
endif # } OS_LINUX
|
|
|
|
|
|
|
|
# libevent
|
|
|
|
|
2010-04-20 00:06:55 -07:00
|
|
|
ifndef MOZ_NATIVE_LIBEVENT # {
|
|
|
|
|
2009-06-29 11:31:58 -07:00
|
|
|
ifdef OS_POSIX # {
|
|
|
|
|
2009-06-30 09:02:37 -07:00
|
|
|
LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent
|
2009-06-29 11:31:58 -07:00
|
|
|
DEFINES += -DHAVE_CONFIG_H
|
|
|
|
|
|
|
|
CSRCS += \
|
|
|
|
buffer.c \
|
|
|
|
evbuffer.c \
|
|
|
|
evdns.c \
|
|
|
|
event.c \
|
|
|
|
event_tagging.c \
|
|
|
|
evrpc.c \
|
|
|
|
evutil.c \
|
|
|
|
http.c \
|
|
|
|
log.c \
|
|
|
|
poll.c \
|
|
|
|
select.c \
|
|
|
|
signal.c \
|
|
|
|
strlcpy.c \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
ifdef OS_MACOSX # {
|
2009-06-30 09:02:37 -07:00
|
|
|
LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/mac
|
2009-06-29 11:31:58 -07:00
|
|
|
CSRCS += kqueue.c
|
|
|
|
endif # }
|
|
|
|
|
|
|
|
ifdef OS_LINUX # {
|
2009-06-30 09:02:37 -07:00
|
|
|
LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/linux
|
2009-06-29 11:31:58 -07:00
|
|
|
CSRCS += \
|
|
|
|
epoll.c \
|
|
|
|
epoll_sub.c \
|
|
|
|
$(NULL)
|
|
|
|
endif # }
|
|
|
|
|
|
|
|
endif # }
|
|
|
|
|
2010-04-20 00:06:55 -07:00
|
|
|
endif # }
|
|
|
|
|
2010-05-05 14:35:09 -07:00
|
|
|
ifneq (86,$(findstring 86,$(OS_TEST))) # {
|
|
|
|
ifneq (arm,$(findstring arm,$(OS_TEST))) # {
|
|
|
|
# Use mutex-backed atomics
|
|
|
|
CPPSRCS += atomicops_internals_mutex.cc
|
|
|
|
endif # }
|
|
|
|
endif # }
|
|
|
|
|
2010-05-13 08:52:59 -07:00
|
|
|
OS_CXXFLAGS += $(TK_CFLAGS)
|
|
|
|
|
2009-06-29 11:31:58 -07:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2010-04-20 00:06:55 -07:00
|
|
|
|
|
|
|
ifdef MOZ_NATIVE_LIBEVENT # {
|
|
|
|
export::
|
|
|
|
mkdir -p $(DIST)/third_party/libevent
|
|
|
|
echo "#include <event.h>" > $(DIST)/third_party/libevent/event.h
|
|
|
|
endif # }
|