Android.mk revision 2810107ae8e48eb50c2048c1e3605e4be7ff62f6
1####################################
2# Build libevent as separate library
3
4LOCAL_PATH := $(call my-dir)
5
6include $(CLEAR_VARS)
7
8LOCAL_MODULE:= libevent
9LOCAL_MODULE_TAGS:= optional
10
11LOCAL_SRC_FILES := \
12    third_party/libevent/event.c \
13    third_party/libevent/evutil.c \
14    third_party/libevent/epoll.c \
15    third_party/libevent/log.c \
16    third_party/libevent/poll.c \
17    third_party/libevent/select.c \
18    third_party/libevent/signal.c
19
20LOCAL_C_INCLUDES := \
21    $(LOCAL_PATH)/third_party/libevent \
22    $(LOCAL_PATH)/third_party/libevent/android \
23
24LOCAL_CFLAGS := -DHAVE_CONFIG_H -DANDROID -fvisibility=hidden
25ifeq ($(TARGET_SIMULATOR),true)
26LOCAL_CFLAGS += -D_EVENT_HAVE_FD_MASK=1
27endif
28
29include $(BUILD_STATIC_LIBRARY)
30
31
32###################################
33# Build the libchromium_net library
34
35include $(CLEAR_VARS)
36
37LOCAL_CPP_EXTENSION := .cc
38
39LOCAL_MODULE := libchromium_net
40LOCAL_MODULE_CLASS := STATIC_LIBRARIES
41INTERMEDIATES := $(call local-intermediates-dir)
42
43LOCAL_SRC_FILES := \
44    googleurl/src/gurl.cc \
45    googleurl/src/url_canon_etc.cc \
46    googleurl/src/url_canon_fileurl.cc \
47    googleurl/src/url_canon_host.cc \
48    googleurl/src/url_canon_icu.cc \
49    googleurl/src/url_canon_internal.cc \
50    googleurl/src/url_canon_ip.cc \
51    googleurl/src/url_canon_mailtourl.cc \
52    googleurl/src/url_canon_path.cc \
53    googleurl/src/url_canon_pathurl.cc \
54    googleurl/src/url_canon_query.cc \
55    googleurl/src/url_canon_relative.cc \
56    googleurl/src/url_canon_stdurl.cc \
57    googleurl/src/url_parse.cc \
58    googleurl/src/url_parse_file.cc \
59    googleurl/src/url_util.cc \
60    \
61    android/app/l10n_util.cc \
62    android/jni/mime_utils.cc \
63    android/jni/jni_utils.cc \
64    \
65    app/sql/connection.cc \
66    app/sql/meta_table.cc \
67    app/sql/statement.cc \
68    app/sql/transaction.cc \
69    \
70    base/at_exit.cc \
71    base/base64.cc \
72    base/cancellation_flag.cc \
73    base/condition_variable_posix.cc \
74    base/debug_util_posix.cc \
75    base/field_trial.cc \
76    base/file_descriptor_shuffle.cc \
77    base/file_path.cc \
78    base/file_util.cc \
79    base/file_util_android.cc \
80    base/file_util_posix.cc \
81    base/histogram.cc \
82    base/lazy_instance.cc \
83    base/lock.cc \
84    base/lock_impl_posix.cc \
85    base/logging.cc \
86    base/message_loop.cc \
87    base/message_loop_proxy.cc \
88    base/message_loop_proxy_impl.cc \
89    base/message_pump.cc \
90    base/message_pump_default.cc \
91    base/message_pump_libevent.cc \
92    base/md5.cc \
93    base/native_library_linux.cc \
94    base/non_thread_safe.cc \
95    base/pickle.cc \
96    base/platform_file_posix.cc \
97    base/platform_thread_posix.cc \
98    base/process_util.cc \
99    base/process_util_linux.cc \
100    base/process_util_posix.cc \
101    base/rand_util.cc \
102    base/rand_util_posix.cc \
103    base/ref_counted.cc \
104    base/safe_strerror_posix.cc \
105    base/sha1_portable.cc \
106    base/sha2.cc \
107    base/stats_counters.cc \
108    base/stats_table.cc \
109    base/string_number_conversions.cc \
110    base/string_piece.cc \
111    base/string_split.cc \
112    base/string_util.cc \
113    base/string16.cc \
114    base/stringprintf.cc \
115    base/sys_info_linux.cc \
116    base/sys_info_posix.cc \
117    base/sys_string_conversions_linux.cc \
118    base/task.cc \
119    base/thread.cc \
120    base/thread_checker.cc \
121    base/thread_collision_warner.cc \
122    base/thread_local_posix.cc \
123    base/thread_local_storage_posix.cc \
124    base/time.cc \
125    base/time_posix.cc \
126    base/timer.cc \
127    base/trace_event.cc \
128    base/tracked.cc \
129    base/tracked_objects.cc \
130    base/waitable_event_posix.cc \
131    base/utf_offset_string_conversions.cc \
132    base/utf_string_conversions.cc \
133    base/utf_string_conversion_utils.cc \
134    base/values.cc \
135    base/weak_ptr.cc \
136    base/worker_pool_linux.cc \
137    \
138    base/i18n/file_util_icu.cc \
139    base/i18n/time_formatting.cc \
140    \
141    base/json/json_reader.cc \
142    base/json/json_writer.cc \
143    base/json/string_escape.cc \
144    \
145    base/i18n/icu_string_conversions.cc \
146    \
147    base/third_party/dmg_fp/dtoa.cc \
148    base/third_party/dmg_fp/g_fmt.cc \
149    \
150    base/third_party/icu/icu_utf.cc \
151    \
152    base/third_party/nspr/prtime.cc \
153    \
154    base/third_party/nss/sha512.cc \
155    \
156    chrome/browser/net/sqlite_persistent_cookie_store.cc \
157    \
158    third_party/modp_b64/modp_b64.cc \
159    \
160    net/base/address_list.cc \
161    net/base/address_list_net_log_param.cc \
162    net/base/auth.cc \
163    net/base/capturing_net_log.cc \
164    net/base/cert_status_flags.cc \
165    net/base/connection_type_histograms.cc \
166    net/base/cookie_monster.cc \
167    net/base/data_url.cc \
168    net/base/directory_lister.cc \
169    net/base/dns_util.cc \
170    net/base/dnsrr_resolver.cc \
171    net/base/escape.cc \
172    net/base/file_stream_posix.cc \
173    net/base/filter.cc \
174    net/base/forwarding_net_log.cc \
175    net/base/gzip_filter.cc \
176    net/base/gzip_header.cc \
177    net/base/host_cache.cc \
178    net/base/host_mapping_rules.cc \
179    net/base/host_port_pair.cc \
180    net/base/host_resolver.cc \
181    net/base/host_resolver_impl.cc \
182    net/base/host_resolver_proc.cc \
183    net/base/io_buffer.cc \
184    net/base/mime_util.cc \
185    net/base/net_errors.cc \
186    net/base/net_log.cc \
187    net/base/net_module.cc \
188    net/base/net_util.cc \
189    net/base/net_util_posix.cc \
190    net/base/network_change_notifier.cc \
191    net/base/network_change_notifier_linux.cc \
192    net/base/network_change_notifier_netlink_linux.cc \
193    net/base/pem_tokenizer.cc \
194    net/base/platform_mime_util_android.cc \
195    net/base/registry_controlled_domain.cc \
196    net/base/sdch_manager.cc \
197    net/base/sdch_filter.cc \
198    net/base/ssl_cert_request_info.cc \
199    net/base/ssl_client_auth_cache.cc \
200    net/base/ssl_config_service.cc \
201    net/base/ssl_config_service_defaults.cc \
202    net/base/ssl_info.cc \
203    net/base/transport_security_state.cc \
204    net/base/upload_data.cc \
205    net/base/upload_data_stream.cc \
206    net/base/x509_cert_types.cc \
207    net/base/x509_certificate.cc \
208    net/base/x509_certificate_openssl.cc \
209    \
210    net/disk_cache/addr.cc \
211    net/disk_cache/backend_impl.cc \
212    net/disk_cache/bitmap.cc \
213    net/disk_cache/block_files.cc \
214    net/disk_cache/cache_util_posix.cc \
215    net/disk_cache/entry_impl.cc \
216    net/disk_cache/eviction.cc \
217    net/disk_cache/file_lock.cc \
218    net/disk_cache/file_posix.cc \
219    net/disk_cache/hash.cc \
220    net/disk_cache/in_flight_backend_io.cc \
221    net/disk_cache/in_flight_io.cc \
222    net/disk_cache/mapped_file_posix.cc \
223    net/disk_cache/mem_backend_impl.cc \
224    net/disk_cache/mem_entry_impl.cc \
225    net/disk_cache/mem_rankings.cc \
226    net/disk_cache/rankings.cc \
227    net/disk_cache/stats.cc \
228    net/disk_cache/stats_histogram.cc \
229    net/disk_cache/sparse_control.cc \
230    net/disk_cache/trace.cc \
231    \
232    net/spdy/spdy_framer.cc \
233    net/spdy/spdy_frame_builder.cc \
234    net/spdy/spdy_http_stream.cc \
235    net/spdy/spdy_http_utils.cc \
236    net/spdy/spdy_io_buffer.cc \
237    net/spdy/spdy_session.cc \
238    net/spdy/spdy_session_pool.cc \
239    net/spdy/spdy_settings_storage.cc \
240    net/spdy/spdy_stream.cc \
241    \
242    net/http/des.cc \
243    net/http/http_alternate_protocols.cc \
244    net/http/http_auth.cc \
245    net/http/http_auth_cache.cc \
246    net/http/http_auth_controller.cc \
247    net/http/http_auth_gssapi_posix.cc \
248    net/http/http_auth_handler.cc \
249    net/http/http_auth_handler_basic.cc \
250    net/http/http_auth_handler_digest.cc \
251    net/http/http_auth_handler_factory.cc \
252    net/http/http_auth_handler_negotiate.cc \
253    net/http/http_auth_handler_ntlm.cc \
254    net/http/http_auth_handler_ntlm_portable.cc \
255    net/http/http_basic_stream.cc \
256    net/http/http_byte_range.cc \
257    net/http/http_cache.cc \
258    net/http/http_cache_transaction.cc \
259    net/http/http_chunked_decoder.cc \
260    net/http/http_network_layer.cc \
261    net/http/http_network_session.cc \
262    net/http/http_network_transaction.cc \
263    net/http/http_proxy_client_socket.cc \
264    net/http/http_proxy_client_socket_pool.cc \
265    net/http/http_request_headers.cc \
266    net/http/http_response_body_drainer.cc \
267    net/http/http_response_headers.cc \
268    net/http/http_response_info.cc \
269    net/http/http_stream_factory.cc \
270    net/http/http_stream_parser.cc \
271    net/http/http_stream_request.cc \
272    net/http/http_util.cc \
273    net/http/http_util_icu.cc \
274    net/http/http_vary_data.cc \
275    net/http/md4.cc \
276    net/http/partial_data.cc \
277    \
278    net/proxy/init_proxy_resolver.cc \
279    net/proxy/proxy_bypass_rules.cc \
280    net/proxy/proxy_config.cc \
281    net/proxy/proxy_info.cc \
282    net/proxy/proxy_list.cc \
283    net/proxy/multi_threaded_proxy_resolver.cc \
284    net/proxy/proxy_resolver_js_bindings.cc \
285    net/proxy/proxy_resolver_script_data.cc \
286    net/proxy/proxy_resolver_v8.cc \
287    net/proxy/proxy_script_fetcher.cc \
288    net/proxy/proxy_server.cc \
289    net/proxy/proxy_service.cc \
290    net/proxy/sync_host_resolver_bridge.cc \
291    \
292    net/socket/client_socket.cc \
293    net/socket/client_socket_handle.cc \
294    net/socket/client_socket_factory.cc \
295    net/socket/client_socket_pool.cc \
296    net/socket/client_socket_pool_base.cc \
297    net/socket/client_socket_pool_histograms.cc \
298    net/socket/client_socket_pool_manager.cc \
299    net/socket/socks_client_socket.cc \
300    net/socket/socks_client_socket_pool.cc \
301    net/socket/socks5_client_socket.cc \
302    net/socket/ssl_client_socket_openssl.cc \
303    net/socket/ssl_client_socket_pool.cc \
304    net/socket/tcp_client_socket_libevent.cc \
305    net/socket/tcp_client_socket_pool.cc \
306    \
307    net/url_request/https_prober.cc \
308    net/url_request/url_request.cc \
309    net/url_request/url_request_context.cc \
310    net/url_request/url_request_file_job.cc \
311    net/url_request/url_request_file_dir_job.cc \
312    net/url_request/url_request_http_job.cc \
313    net/url_request/url_request_error_job.cc \
314    net/url_request/url_request_job.cc \
315    net/url_request/url_request_job_manager.cc \
316    net/url_request/url_request_job_tracker.cc \
317    net/url_request/url_request_netlog_params.cc \
318    net/url_request/url_request_redirect_job.cc \
319    \
320    sdch/open-vcdiff/src/addrcache.cc \
321    sdch/open-vcdiff/src/blockhash.cc \
322    sdch/open-vcdiff/src/codetable.cc \
323    sdch/open-vcdiff/src/encodetable.cc \
324    sdch/open-vcdiff/src/decodetable.cc \
325    sdch/open-vcdiff/src/headerparser.cc \
326    sdch/open-vcdiff/src/instruction_map.cc \
327    sdch/open-vcdiff/src/logging.cc \
328    sdch/open-vcdiff/src/varint_bigendian.cc \
329    sdch/open-vcdiff/src/vcdecoder.cc \
330    sdch/open-vcdiff/src/vcdiffengine.cc \
331    sdch/open-vcdiff/src/vcencoder.cc \
332
333# AutoFill++ source files.
334LOCAL_SRC_FILES += \
335    android/autofill/android_url_request_context_getter.cc \
336    android/autofill/profile_android.cc \
337    \
338    base/base_paths.cc \
339    base/base_paths_posix.cc \
340    base/path_service.cc \
341    \
342    chrome/browser/autofill/address.cc \
343    chrome/browser/autofill/address_field.cc \
344    chrome/browser/autofill/autofill_download.cc \
345    chrome/browser/autofill/autofill_field.cc \
346    chrome/browser/autofill/autofill_manager.cc \
347    chrome/browser/autofill/autofill_profile.cc \
348    chrome/browser/autofill/autofill_type.cc \
349    chrome/browser/autofill/autofill_xml_parser.cc \
350    chrome/browser/autofill/contact_info.cc \
351    chrome/browser/autofill/credit_card.cc \
352    chrome/browser/autofill/credit_card_field.cc \
353    chrome/browser/autofill/fax_field.cc \
354    chrome/browser/autofill/form_field.cc \
355    chrome/browser/autofill/form_group.cc \
356    chrome/browser/autofill/form_structure.cc \
357    chrome/browser/autofill/name_field.cc \
358    chrome/browser/autofill/personal_data_manager.cc \
359    chrome/browser/autofill/phone_field.cc \
360    chrome/browser/autofill/phone_number.cc \
361    chrome/browser/autofill/select_control_handler.cc \
362    \
363    chrome/browser/prefs/default_pref_store.cc \
364    chrome/browser/prefs/pref_service.cc \
365    chrome/browser/prefs/pref_value_store.cc \
366    \
367    chrome/common/json_value_serializer.cc \
368    chrome/common/pref_names.cc \
369    chrome/common/url_constants.cc \
370    \
371    chrome/common/net/url_fetcher.cc \
372    chrome/common/net/url_fetcher_protect.cc \
373    chrome/common/net/url_request_context_getter.cc \
374    \
375    third_party/libjingle/overrides/talk/xmllite/qname.cc \
376    third_party/libjingle/source/talk/xmllite/xmlbuilder.cc \
377    third_party/libjingle/source/talk/xmllite/xmlconstants.cc \
378    third_party/libjingle/source/talk/xmllite/xmlelement.cc \
379    third_party/libjingle/source/talk/xmllite/xmlnsstack.cc \
380    third_party/libjingle/source/talk/xmllite/xmlparser.cc \
381    third_party/libjingle/source/talk/xmllite/xmlprinter.cc \
382    \
383    webkit/glue/form_data.cc
384
385LOCAL_C_INCLUDES := \
386    $(LOCAL_PATH) \
387    $(LOCAL_PATH)/chrome \
388    $(LOCAL_PATH)/chrome/browser \
389    $(LOCAL_PATH)/sdch/open-vcdiff/src \
390    $(LOCAL_PATH)/third_party/libevent/compat \
391    external/expat \
392    external/icu4c/common \
393    external/icu4c/i18n \
394    external/openssl/include \
395    external/skia \
396    external/sqlite/dist \
397    external/webkit/WebKit/chromium \
398    external/webkit/WebKit/android \
399    external/webkit/WebKit/android/WebCoreSupport \
400    external/zlib \
401    external \
402    $(LOCAL_PATH)/base/third_party/dmg_fp \
403    $(LOCAL_PATH)/third_party/icu/public/common \
404    $(LOCAL_PATH)/third_party/libevent/android \
405    $(LOCAL_PATH)/third_party/libevent \
406    $(LOCAL_PATH)/third_party/libjingle/overrides \
407    $(LOCAL_PATH)/third_party/libjingle/source \
408    vendor/google/libraries/autofill
409
410# Chromium uses several third party libraries and headers that are already
411# present on Android, but in different include paths. Generate a set of
412# forwarding headers in the location that Chromium expects.
413
414THIRD_PARTY = $(INTERMEDIATES)/third_party
415SCRIPT := $(LOCAL_PATH)/android/generateAndroidForwardingHeader.pl
416CHECK_INTERNAL_HEADER_SCRIPT := $(LOCAL_PATH)/android/haveAutofillInternal.pl
417
418GEN := $(THIRD_PARTY)/expat/files/lib/expat.h
419$(GEN): $(SCRIPT)
420$(GEN):
421	perl $(SCRIPT) $@ "lib/expat.h"
422LOCAL_GENERATED_SOURCES += $(GEN)
423
424GEN := $(THIRD_PARTY)/skia/include/core/SkBitmap.h
425$(GEN): $(SCRIPT)
426$(GEN):
427	perl $(SCRIPT) $@ "include/core/SkBitmap.h"
428LOCAL_GENERATED_SOURCES += $(GEN)
429
430GEN := $(THIRD_PARTY)/WebKit/WebKit/chromium/public/WebFormControlElement.h
431$(GEN): $(SCRIPT)
432$(GEN):
433	perl $(SCRIPT) $@ "public/WebFormControlElement.h"
434LOCAL_GENERATED_SOURCES += $(GEN)
435
436GEN := $(THIRD_PARTY)/WebKit/WebKit/chromium/public/WebRegularExpression.h
437$(GEN): $(SCRIPT)
438$(GEN):
439	perl $(SCRIPT) $@ "public/WebRegularExpression.h"
440LOCAL_GENERATED_SOURCES += $(GEN)
441
442GEN := $(THIRD_PARTY)/WebKit/WebKit/chromium/public/WebString.h
443$(GEN): $(SCRIPT)
444$(GEN):
445	perl $(SCRIPT) $@ "public/WebString.h"
446LOCAL_GENERATED_SOURCES += $(GEN)
447
448GEN = $(INTERMEDIATES)/HaveAutofillInternal.h
449$(GEN): $(CHECK_INTERNAL_HEADER_SCRIPT)
450$(GEN):
451	perl $(CHECK_INTERNAL_HEADER_SCRIPT) $@
452LOCAL_GENERATED_SOURCES += $(GEN)
453
454LOCAL_SRC_FILES += $(LOCAL_GENERATED_SOURCES)
455
456LOCAL_CFLAGS := -DHAVE_CONFIG_H -DANDROID -fvisibility=hidden -DEXPAT_RELATIVE_PATH
457LOCAL_CPPFLAGS := -Wno-sign-promo
458
459ifneq ($(TARGET_SIMULATOR),true)
460# Just a few definitions not provided by bionic.
461LOCAL_CFLAGS += -include "android/prefix.h"
462
463# external/chromium/android is a directory to intercept stl headers that we do
464# not support yet.
465LOCAL_C_INCLUDES := \
466	$(LOCAL_PATH)/android \
467	$(LOCAL_C_INCLUDES)
468
469#LOCAL_STATIC_LIBRARIES += libevent
470LOCAL_WHOLE_STATIC_LIBRARIES += libevent
471
472# Including this will modify the include path
473include external/stlport/libstlport.mk
474endif
475
476include $(BUILD_STATIC_LIBRARY)
477