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