Back out changeset fecc8ed9e813.
[mozilla-central.git] / ipc / chromium / Makefile.in
blob6c4e689af40e4d6ff97669a9e0aa61cf5a667aa4
1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # The Original Code is the Mozilla platform.
16 # The Initial Developer of the Original Code is
17 # the Mozilla Foundation <http://www.mozilla.org/>.
18 # Portions created by the Initial Developer are Copyright (C) 2009
19 # the Initial Developer. All Rights Reserved.
21 # Contributor(s):
23 # Alternatively, the contents of this file may be used under the terms of
24 # either the GNU General Public License Version 2 or later (the "GPL"), or
25 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26 # in which case the provisions of the GPL or the LGPL are applicable instead
27 # of those above. If you wish to allow use of your version of this file only
28 # under the terms of either the GPL or the LGPL, and not to allow others to
29 # use your version of this file under the terms of the MPL, indicate your
30 # decision by deleting the provisions above and replace them with the notice
31 # and other provisions required by the GPL or the LGPL. If you do not delete
32 # the provisions above, a recipient may use your version of this file under
33 # the terms of any one of the MPL, the GPL or the LGPL.
35 # ***** END LICENSE BLOCK *****
37 DEPTH = ../..
38 topsrcdir = @top_srcdir@
39 srcdir = @srcdir@
40 VPATH = @srcdir@
42 include $(DEPTH)/config/autoconf.mk
44 OS_CXXFLAGS := $(filter-out -fshort-wchar,$(OS_CXXFLAGS))
46 LIBRARY_NAME = chromium_s
47 FORCE_STATIC_LIB = 1
48 LIBXUL_LIBRARY = 1
49 EXPORT_LIBRARY = 1
51 ENABLE_CXX_EXCEPTIONS = 1
52 ACDEFINES =
54 ifndef MOZ_NATIVE_LIBEVENT # {
55 vpath %.c \
56 $(srcdir)/src/third_party/libevent \
57 $(NULL)
58 else # } else {
59 # message_pump_libevent.cc includes third_party/libevent/event.h,
60 # which we put in $(DIST), see export rule below
61 LOCAL_INCLUDES += -I$(DIST)
62 endif # }
64 vpath %.cc \
65 $(srcdir)/src/base \
66 $(srcdir)/src/base/third_party/dmg_fp \
67 $(srcdir)/src/base/third_party/nspr \
68 $(srcdir)/src/base/third_party/nss \
69 $(srcdir)/src/chrome/common \
70 $(NULL)
72 vpath %.mm \
73 $(srcdir)/src/base \
74 $(srcdir)/src/chrome/common \
75 $(NULL)
77 include $(topsrcdir)/config/config.mk
78 include $(topsrcdir)/ipc/chromium/chromium-config.mk
80 CPPSRCS += \
81 dtoa.cc \
82 g_fmt.cc \
83 prtime.cc \
84 at_exit.cc \
85 base_paths.cc \
86 base_switches.cc \
87 command_line.cc \
88 debug_util.cc \
89 file_path.cc \
90 file_util.cc \
91 histogram.cc \
92 lazy_instance.cc \
93 lock.cc \
94 logging.cc \
95 memory_debug.cc \
96 message_loop.cc \
97 message_pump_default.cc \
98 non_thread_safe.cc \
99 path_service.cc \
100 pickle.cc \
101 rand_util.cc \
102 ref_counted.cc \
103 revocable_store.cc \
104 scoped_temp_dir.cc \
105 sha2.cc \
106 simple_thread.cc \
107 stats_table.cc \
108 string_escape.cc \
109 string_piece.cc \
110 string_util.cc \
111 system_monitor.cc \
112 thread.cc \
113 thread_collision_warner.cc \
114 time.cc \
115 timer.cc \
116 trace_event.cc \
117 tracked.cc \
118 tracked_objects.cc \
119 child_process.cc \
120 child_process_host.cc \
121 child_process_info.cc \
122 child_thread.cc \
123 chrome_counters.cc \
124 chrome_paths.cc \
125 chrome_switches.cc \
126 debug_flags.cc \
127 env_vars.cc \
128 ipc_channel_proxy.cc \
129 ipc_logging.cc \
130 ipc_message.cc \
131 ipc_message_utils.cc \
132 ipc_sync_channel.cc \
133 ipc_sync_message.cc \
134 message_router.cc \
135 notification_service.cc \
136 task_queue.cc \
137 $(NULL)
139 ifdef OS_WIN # {
141 CPPSRCS += \
142 base_paths_win.cc \
143 cpu.cc \
144 condition_variable_win.cc \
145 debug_on_start.cc \
146 debug_util_win.cc \
147 event_recorder.cc \
148 file_util_win.cc \
149 file_version_info.cc \
150 lock_impl_win.cc \
151 idle_timer.cc \
152 message_pump_win.cc \
153 object_watcher.cc \
154 platform_file_win.cc \
155 platform_thread_win.cc \
156 process_util_win.cc \
157 process_win.cc \
158 rand_util_win.cc \
159 registry.cc \
160 shared_memory_win.cc \
161 sys_info_win.cc \
162 sys_string_conversions_win.cc \
163 system_monitor_win.cc \
164 thread_local_storage_win.cc \
165 thread_local_win.cc \
166 time_win.cc \
167 waitable_event_watcher_win.cc \
168 waitable_event_win.cc \
169 win_util.cc \
170 chrome_paths_win.cc \
171 ipc_channel_win.cc \
172 process_watcher_win.cc \
173 transport_dib_win.cc \
174 $(NULL)
176 endif # } OS_WIN
178 ifdef OS_POSIX # {
180 CPPSRCS += \
181 sha512.cc \
182 condition_variable_posix.cc \
183 debug_util_posix.cc \
184 event_recorder_stubs.cc \
185 file_descriptor_shuffle.cc \
186 file_util_posix.cc \
187 lock_impl_posix.cc \
188 message_pump_libevent.cc \
189 platform_file_posix.cc \
190 platform_thread_posix.cc \
191 process_posix.cc \
192 process_util_posix.cc \
193 rand_util_posix.cc \
194 shared_memory_posix.cc \
195 string16.cc \
196 system_monitor_posix.cc \
197 sys_info_posix.cc \
198 thread_local_posix.cc \
199 thread_local_storage_posix.cc \
200 waitable_event_posix.cc \
201 waitable_event_watcher_posix.cc \
202 file_descriptor_set_posix.cc \
203 ipc_channel_posix.cc \
204 process_watcher_posix_sigchld.cc \
205 $(NULL)
207 endif # } OS_POSIX
209 ifdef OS_MACOSX # {
211 CMMSRCS += \
212 base_paths_mac.mm \
213 file_util_mac.mm \
214 file_version_info_mac.mm \
215 mac_util.mm \
216 message_pump_mac.mm \
217 platform_thread_mac.mm \
218 process_util_mac.mm \
219 scoped_nsautorelease_pool.mm \
220 sys_string_conversions_mac.mm \
221 worker_pool_mac.mm \
222 chrome_paths_mac.mm \
223 mach_ipc_mac.mm \
224 platform_util_mac.mm \
225 chrome_application_mac.mm \
226 $(NULL)
228 CPPSRCS += \
229 debug_util_mac.cc \
230 hmac_mac.cc \
231 idle_timer.cc \
232 sys_info_mac.cc \
233 time_mac.cc \
234 mach_message_source_mac.cc \
235 transport_dib_mac.cc \
236 $(NULL)
238 endif # } OS_MACOSX
240 ifdef OS_LINUX # {
242 CPPSRCS += \
243 atomicops_internals_x86_gcc.cc \
244 base_paths_linux.cc \
245 data_pack.cc \
246 file_util_linux.cc \
247 file_version_info_linux.cc \
248 idle_timer_none.cc \
249 process_util_linux.cc \
250 time_posix.cc \
251 $(NULL)
253 ifdef MOZ_ENABLE_GTK2
254 CPPSRCS += \
255 message_pump_glib.cc \
256 $(NULL)
257 endif
259 ifdef MOZ_ENABLE_QT
260 MOCSRCS = \
261 moc_message_pump_qt.cc \
262 $(NULL)
264 CPPSRCS += \
265 $(MOCSRCS) \
266 message_pump_qt.cc \
267 $(NULL)
268 endif
270 endif # } OS_LINUX
272 # libevent
274 ifndef MOZ_NATIVE_LIBEVENT # {
276 ifdef OS_POSIX # {
278 LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent
279 DEFINES += -DHAVE_CONFIG_H
281 CSRCS += \
282 buffer.c \
283 evbuffer.c \
284 evdns.c \
285 event.c \
286 event_tagging.c \
287 evrpc.c \
288 evutil.c \
289 http.c \
290 log.c \
291 poll.c \
292 select.c \
293 signal.c \
294 strlcpy.c \
295 $(NULL)
297 ifdef OS_MACOSX # {
298 LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/mac
299 CSRCS += kqueue.c
300 endif # }
302 ifdef OS_LINUX # {
303 LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/linux
304 CSRCS += \
305 epoll.c \
306 epoll_sub.c \
307 $(NULL)
308 endif # }
310 endif # }
312 endif # }
314 ifneq (86,$(findstring 86,$(OS_TEST))) # {
315 ifneq (arm,$(findstring arm,$(OS_TEST))) # {
316 # Use mutex-backed atomics
317 CPPSRCS += atomicops_internals_mutex.cc
318 endif # }
319 endif # }
321 OS_CXXFLAGS += $(TK_CFLAGS)
323 include $(topsrcdir)/config/rules.mk
325 ifdef MOZ_NATIVE_LIBEVENT # {
326 export::
327 mkdir -p $(DIST)/third_party/libevent
328 echo "#include <event.h>" > $(DIST)/third_party/libevent/event.h
329 endif # }