OSDN Git Service

Merge WebKit at r75315: Initial merge by git.
[android-x86/external-webkit.git] / Android.mk
1 ##
2 ## Copyright 2009, The Android Open Source Project
3 ##
4 ## Redistribution and use in source and binary forms, with or without
5 ## modification, are permitted provided that the following conditions
6 ## are met:
7 ##  * Redistributions of source code must retain the above copyright
8 ##    notice, this list of conditions and the following disclaimer.
9 ##  * Redistributions in binary form must reproduce the above copyright
10 ##    notice, this list of conditions and the following disclaimer in the
11 ##    documentation and/or other materials provided with the distribution.
12 ##
13 ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
14 ## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 ## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 ## PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 ## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 ## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 ## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 ## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 ## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 ## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 ##
25
26 # Control SVG compiling in webkit.
27 # Default is true unless explictly disabled.
28 ifneq ($(ENABLE_SVG),false)
29     ENABLE_SVG = true
30 endif
31
32 # Control complex scripts support compiling in webkit.
33 # Default is true unless explictly disabled.
34 ifneq ($(SUPPORT_COMPLEX_SCRIPTS),false)
35     SUPPORT_COMPLEX_SCRIPTS = true
36 endif
37
38 # Two ways to control which JS engine is used:
39 # 1. use JS_ENGINE environment variable, value can be either 'jsc' or 'v8'
40 #    This is the preferred way.
41 # 2. if JS_ENGINE is not set, or is not 'jsc' or 'v8', this makefile picks
42 #    up a default engine to build.
43 #    To help setup buildbot, a new environment variable, USE_ALT_JS_ENGINE,
44 #    can be set to true, so that two builds can be different but without
45 #    specifying which JS engine to use.
46 # To enable JIT in Android's JSC, please set ENABLE_JSC_JIT environment
47 # variable to true.
48
49 # To enable JIT in Android's JSC, please set ENABLE_JSC_JIT environment
50 # variable to true.
51
52 # Read JS_ENGINE environment variable
53 JAVASCRIPT_ENGINE = $(JS_ENGINE)
54
55 # We default to the V8 JS engine.
56 DEFAULT_ENGINE = v8
57 ALT_ENGINE = jsc
58
59 ifneq ($(JAVASCRIPT_ENGINE),jsc)
60   ifneq ($(JAVASCRIPT_ENGINE),v8)
61     # No JS engine is specified, pickup the one we want as default.
62     ifeq ($(USE_ALT_JS_ENGINE),true)
63       JAVASCRIPT_ENGINE = $(ALT_ENGINE)
64     else
65       JAVASCRIPT_ENGINE = $(DEFAULT_ENGINE)
66     endif
67   endif
68 endif
69 # We can't use V8 on the simulator
70 ifeq ($(TARGET_SIMULATOR),true)
71   JAVASCRIPT_ENGINE = jsc
72 endif
73
74 # V8 also requires an ARMv7 CPU, and since we must use jsc, we cannot
75 # use the Chrome http stack either.
76 ifneq ($(strip $(ARCH_ARM_HAVE_ARMV7A)),true)
77   JAVASCRIPT_ENGINE := jsc
78   USE_ALT_HTTP := true
79 endif
80
81 # See if the user has specified a stack they want to use
82 HTTP_STACK = $(HTTP)
83 # We default to the Chrome HTTP stack.
84 DEFAULT_HTTP = chrome
85 ALT_HTTP = android
86
87 ifneq ($(HTTP_STACK),chrome)
88   ifneq ($(HTTP_STACK),android)
89     # No HTTP stack is specified, pickup the one we want as default.
90     ifeq ($(USE_ALT_HTTP),true)
91       HTTP_STACK = $(ALT_HTTP)
92     else
93       HTTP_STACK = $(DEFAULT_HTTP)
94     endif
95   endif
96 endif
97
98 # The Chrome stack can not be used with JSC and hence can not be used be used
99 # with the simulator.
100 ifeq ($(JAVASCRIPT_ENGINE),jsc)
101   ifeq ($(HTTP_STACK),chrome)
102     $(error Can not build with JSC and the Chrome HTTP stack)
103   endif
104 endif
105
106 # Read the environment variable to determine if Autofill is compiled.
107 # The default is on. Chrome HTTP stack must be used when Autofill
108 # is turned on.
109 ifneq ($(ENABLE_AUTOFILL),false)
110   ENABLE_AUTOFILL = true
111 endif
112 ifneq ($(HTTP_STACK),chrome)
113   ENABLE_AUTOFILL = false
114 endif
115
116 BASE_PATH := $(call my-dir)
117 include $(CLEAR_VARS)
118
119 # Define our module and find the intermediates directory
120 LOCAL_MODULE := libwebcore
121 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
122 base_intermediates := $(call local-intermediates-dir)
123
124 # Using := here prevents recursive expansion
125 WEBKIT_SRC_FILES :=
126
127 # We have to use bison 2.3
128 include $(BASE_PATH)/bison_check.mk
129
130 WEBCORE_PATH := $(BASE_PATH)/WebCore
131 WEBKIT_PATH := $(BASE_PATH)/WebKit
132 JAVASCRIPTCORE_PATH := $(BASE_PATH)/JavaScriptCore
133 WEBCORE_INTERMEDIATES_PATH := $(base_intermediates)/WebCore
134
135 # Build our list of include paths. We include WebKit/android/icu first so that
136 # any files that include <unicode/ucnv.h> will include our ucnv.h first. We
137 # also add external/ as an include directory so that we can specify the real
138 # icu header directory as a more exact reference to avoid including our ucnv.h.
139 #
140 # Note that JavasCriptCore/ must be included after WebCore/, so that we pick up
141 # the right config.h.
142 LOCAL_C_INCLUDES := \
143         $(JNI_H_INCLUDE) \
144         $(WEBKIT_PATH)/android/icu \
145         external/ \
146         external/icu4c/common \
147         external/icu4c/i18n \
148         external/jpeg \
149         external/libxml2/include \
150         external/libxslt \
151         external/hyphenation \
152         external/skia/emoji \
153         external/skia/include/core \
154         external/skia/include/effects \
155         external/skia/include/images \
156         external/skia/include/ports \
157         external/skia/include/utils \
158         external/skia/src/ports \
159         external/sqlite/dist \
160         frameworks/base/core/jni/android/graphics \
161         frameworks/base/include
162
163 LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
164 <<<<<<< HEAD
165         $(WEBCORE_PATH) \
166         $(WEBCORE_PATH)/accessibility \
167         $(WEBCORE_PATH)/bindings/ \
168         $(WEBCORE_PATH)/bindings/generic \
169         $(WEBCORE_PATH)/css \
170         $(WEBCORE_PATH)/dom \
171         $(WEBCORE_PATH)/editing \
172         $(WEBCORE_PATH)/fileapi \
173         $(WEBCORE_PATH)/history \
174         $(WEBCORE_PATH)/history/android \
175         $(WEBCORE_PATH)/html \
176         $(WEBCORE_PATH)/html/canvas \
177         $(WEBCORE_PATH)/html/parser \
178         $(WEBCORE_PATH)/html/shadow \
179         $(WEBCORE_PATH)/inspector \
180         $(WEBCORE_PATH)/loader \
181         $(WEBCORE_PATH)/loader/appcache \
182         $(WEBCORE_PATH)/loader/archive \
183         $(WEBCORE_PATH)/loader/archive/android \
184         $(WEBCORE_PATH)/loader/cache \
185         $(WEBCORE_PATH)/loader/icon \
186         $(WEBCORE_PATH)/notifications \
187         $(WEBCORE_PATH)/page \
188         $(WEBCORE_PATH)/page/android \
189         $(WEBCORE_PATH)/page/animation \
190         $(WEBCORE_PATH)/platform \
191         $(WEBCORE_PATH)/platform/android \
192         $(WEBCORE_PATH)/platform/animation \
193         $(WEBCORE_PATH)/platform/graphics \
194         $(WEBCORE_PATH)/platform/graphics/android \
195         $(WEBCORE_PATH)/platform/graphics/filters \
196         $(WEBCORE_PATH)/platform/graphics/gpu \
197         $(WEBCORE_PATH)/platform/graphics/network \
198         $(WEBCORE_PATH)/platform/graphics/skia \
199         $(WEBCORE_PATH)/platform/graphics/transforms \
200         $(WEBCORE_PATH)/platform/image-decoders \
201         $(WEBCORE_PATH)/platform/image-decoders/bmp \
202         $(WEBCORE_PATH)/platform/image-decoders/gif \
203         $(WEBCORE_PATH)/platform/image-decoders/ico \
204         $(WEBCORE_PATH)/platform/image-decoders/jpeg \
205         $(WEBCORE_PATH)/platform/image-decoders/png \
206         $(WEBCORE_PATH)/platform/image-decoders/webp \
207         $(WEBCORE_PATH)/platform/mock \
208         $(WEBCORE_PATH)/platform/network \
209         $(WEBCORE_PATH)/platform/network/android \
210         $(WEBCORE_PATH)/platform/sql \
211         $(WEBCORE_PATH)/platform/text \
212         $(WEBCORE_PATH)/platform/text/transcoder \
213         $(WEBCORE_PATH)/plugins \
214         $(WEBCORE_PATH)/plugins/android \
215         $(WEBCORE_PATH)/rendering \
216         $(WEBCORE_PATH)/rendering/style \
217         $(WEBCORE_PATH)/rendering/svg \
218         $(WEBCORE_PATH)/storage \
219         $(WEBCORE_PATH)/svg \
220         $(WEBCORE_PATH)/svg/animation \
221         $(WEBCORE_PATH)/svg/graphics \
222         $(WEBCORE_PATH)/svg/graphics/filters \
223         $(WEBCORE_PATH)/svg/properties \
224         $(WEBCORE_PATH)/websockets \
225         $(WEBCORE_PATH)/workers \
226         $(WEBCORE_PATH)/xml
227 =======
228         $(LOCAL_PATH)/Source/WebCore \
229         $(LOCAL_PATH)/Source/WebCore/accessibility \
230         $(LOCAL_PATH)/Source/WebCore/bindings/generic \
231         $(LOCAL_PATH)/Source/WebCore/css \
232         $(LOCAL_PATH)/Source/WebCore/dom \
233         $(LOCAL_PATH)/Source/WebCore/editing \
234         $(LOCAL_PATH)/Source/WebCore/history \
235         $(LOCAL_PATH)/Source/WebCore/history/android \
236         $(LOCAL_PATH)/Source/WebCore/html \
237         $(LOCAL_PATH)/Source/WebCore/html/canvas \
238         $(LOCAL_PATH)/Source/WebCore/inspector \
239         $(LOCAL_PATH)/Source/WebCore/loader \
240         $(LOCAL_PATH)/Source/WebCore/loader/appcache \
241         $(LOCAL_PATH)/Source/WebCore/loader/icon \
242         $(LOCAL_PATH)/Source/WebCore/notifications \
243         $(LOCAL_PATH)/Source/WebCore/page \
244         $(LOCAL_PATH)/Source/WebCore/page/android \
245         $(LOCAL_PATH)/Source/WebCore/page/animation \
246         $(LOCAL_PATH)/Source/WebCore/platform \
247         $(LOCAL_PATH)/Source/WebCore/platform/android \
248         $(LOCAL_PATH)/Source/WebCore/platform/animation \
249         $(LOCAL_PATH)/Source/WebCore/platform/graphics \
250         $(LOCAL_PATH)/Source/WebCore/platform/graphics/android \
251         $(LOCAL_PATH)/Source/WebCore/platform/graphics/network \
252         $(LOCAL_PATH)/Source/WebCore/platform/graphics/skia \
253         $(LOCAL_PATH)/Source/WebCore/platform/graphics/transforms \
254         $(LOCAL_PATH)/Source/WebCore/platform/image-decoders \
255         $(LOCAL_PATH)/Source/WebCore/platform/mock \
256         $(LOCAL_PATH)/Source/WebCore/platform/network \
257         $(LOCAL_PATH)/Source/WebCore/platform/network/android \
258         $(LOCAL_PATH)/Source/WebCore/platform/sql \
259         $(LOCAL_PATH)/Source/WebCore/platform/text \
260         $(LOCAL_PATH)/Source/WebCore/plugins \
261         $(LOCAL_PATH)/Source/WebCore/plugins/android \
262         $(LOCAL_PATH)/Source/WebCore/rendering \
263         $(LOCAL_PATH)/Source/WebCore/rendering/style \
264         $(LOCAL_PATH)/Source/WebCore/storage \
265         $(LOCAL_PATH)/Source/WebCore/workers \
266         $(LOCAL_PATH)/Source/WebCore/xml
267 >>>>>>> webkit.org at r75315
268
269 LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
270         $(WEBKIT_PATH)/android \
271         $(WEBKIT_PATH)/android/WebCoreSupport \
272         $(WEBKIT_PATH)/android/jni \
273         $(WEBKIT_PATH)/android/nav \
274         $(WEBKIT_PATH)/android/plugins
275
276 LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
277 <<<<<<< HEAD
278         $(JAVASCRIPTCORE_PATH) \
279         $(JAVASCRIPTCORE_PATH)/wtf \
280         $(JAVASCRIPTCORE_PATH)/wtf/unicode \
281         $(JAVASCRIPTCORE_PATH)/wtf/unicode/icu
282
283 LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
284         $(WEBCORE_INTERMEDIATES_PATH) \
285         $(WEBCORE_INTERMEDIATES_PATH)/css \
286         $(WEBCORE_INTERMEDIATES_PATH)/html \
287         $(WEBCORE_INTERMEDIATES_PATH)/platform
288 =======
289         $(LOCAL_PATH)/Source/JavaScriptCore \
290         $(LOCAL_PATH)/Source/JavaScriptCore/wtf \
291         $(LOCAL_PATH)/Source/JavaScriptCore/wtf/unicode \
292         $(LOCAL_PATH)/Source/JavaScriptCore/wtf/unicode/icu
293
294 LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
295         $(base_intermediates)/Source/WebCore/ \
296         $(base_intermediates)/Source/WebCore/css \
297         $(base_intermediates)/Source/WebCore/html \
298         $(base_intermediates)/Source/WebCore/platform
299 >>>>>>> webkit.org at r75315
300
301 # The following includes are needed by the AutoFill feature, or the chrome http
302 # stack
303 LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
304 <<<<<<< HEAD
305         $(WEBKIT_PATH)/chromium \
306         $(WEBKIT_PATH)/chromium/public \
307         external/chromium/chrome/browser \
308         external/chromium/chrome/renderer \
309         external/chromium \
310         external/chromium/chrome \
311         external/skia
312
313 ifeq ($(JAVASCRIPT_ENGINE),v8)
314 # Include WTF source file.
315 d := JavaScriptCore
316 LOCAL_PATH := $(JAVASCRIPTCORE_PATH)
317 =======
318         $(LOCAL_PATH)/Source/WebCore/platform/graphics/filters \
319         $(LOCAL_PATH)/Source/WebCore/svg \
320         $(LOCAL_PATH)/Source/WebCore/svg/animation \
321         $(LOCAL_PATH)/Source/WebCore/svg/graphics \
322         $(LOCAL_PATH)/Source/WebCore/svg/graphics/filters \
323         $(base_intermediates)/Source/WebCore/svg
324 endif
325
326 ifeq ($(JAVASCRIPT_ENGINE),v8)
327 # Include WTF source file.
328 d := Source/JavaScriptCore
329 LOCAL_PATH := $(BASE_PATH)/$d
330 >>>>>>> webkit.org at r75315
331 intermediates := $(base_intermediates)/$d
332 include $(LOCAL_PATH)/Android.v8.wtf.mk
333 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
334 endif  # JAVASCRIPT_ENGINE == v8
335
336 # Include source files for WebCore
337 d := WebCore
338 <<<<<<< HEAD
339 LOCAL_PATH := $(WEBCORE_PATH)
340 =======
341 LOCAL_PATH := $(BASE_PATH)/$d
342 JAVASCRIPTCORE_PATH := $(BASE_PATH)/Source/JavaScriptCore
343 >>>>>>> webkit.org at r75315
344 intermediates := $(base_intermediates)/$d
345 include $(LOCAL_PATH)/Android.mk
346 ifeq ($(JAVASCRIPT_ENGINE),jsc)
347 include $(LOCAL_PATH)/Android.jscbindings.mk
348 endif
349 ifeq ($(JAVASCRIPT_ENGINE),v8)
350 include $(LOCAL_PATH)/Android.v8bindings.mk
351 endif
352 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
353 LOCAL_C_INCLUDES += $(BINDING_C_INCLUDES)
354
355 # Include the derived source files for WebCore. Uses the same path as
356 # WebCore
357 include $(LOCAL_PATH)/Android.derived.mk
358 ifeq ($(JAVASCRIPT_ENGINE),jsc)
359 include $(LOCAL_PATH)/Android.derived.jscbindings.mk
360 endif
361 ifeq ($(JAVASCRIPT_ENGINE),v8)
362 include $(LOCAL_PATH)/Android.derived.v8bindings.mk
363 endif
364
365 # Include source files for android WebKit port
366 d := WebKit
367 LOCAL_PATH := $(WEBKIT_PATH)
368 intermediates := $(base_intermediates)/$d
369 include $(LOCAL_PATH)/Android.mk
370 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
371
372 # Redefine LOCAL_PATH here so the build system is not confused
373 LOCAL_PATH := $(BASE_PATH)
374
375 # Define our compiler flags
376 LOCAL_CFLAGS += -Wno-endif-labels -Wno-import -Wno-format
377 LOCAL_CFLAGS += -fno-strict-aliasing
378 LOCAL_CFLAGS += -include "WebCorePrefix.h"
379 LOCAL_CFLAGS += -fvisibility=hidden
380 LOCAL_CFLAGS += -DALWAYS_INLINE=inline
381 # Make sure assert.h is included before assert is defined
382 LOCAL_CFLAGS += -include "assert.h"
383 ifeq ($(HTTP_STACK),chrome)
384 LOCAL_CFLAGS += -DGOOGLEURL
385 LOCAL_CFLAGS += -DWTF_USE_CHROME_NETWORK_STACK
386 endif # HTTP_STACK == chrome
387 LOCAL_CPPFLAGS := -Wno-sign-promo
388
389 # Adds GL and EGL extensions for the GL backend
390 LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
391
392 # Enable JSC JIT if JSC is used and ENABLE_JSC_JIT environment
393 # variable is set to true
394 ifeq ($(JAVASCRIPT_ENGINE),jsc)
395 ifeq ($(ENABLE_JSC_JIT),true)
396 LOCAL_CFLAGS += -DENABLE_ANDROID_JSC_JIT=1
397 endif
398 endif
399
400 ifeq ($(TARGET_ARCH),arm)
401 LOCAL_CFLAGS += -Darm
402 # remove this warning: "note: the mangling of 'va_list' has changed in GCC 4.4"
403 LOCAL_CFLAGS += -Wno-psabi
404 endif
405
406 # need a flag to tell the C side when we're on devices with large memory
407 # budgets (i.e. larger than the low-end devices that initially shipped)
408 ifeq ($(ARCH_ARM_HAVE_VFP),true)
409 LOCAL_CFLAGS += -DANDROID_LARGE_MEMORY_DEVICE
410 endif
411
412 ifeq ($(ENABLE_SVG),true)
413 LOCAL_CFLAGS += -DENABLE_SVG=1 -DENABLE_SVG_ANIMATION=1
414 endif
415
416 ifeq ($(ENABLE_WTF_USE_ACCELERATED_COMPOSITING),false)
417 LOCAL_CFLAGS += -DWTF_USE_ACCELERATED_COMPOSITING=0
418 endif
419
420 ifeq ($(ENABLE_WTF_USE_ACCELERATED_COMPOSITING),true)
421 LOCAL_CFLAGS += -DWTF_USE_ACCELERATED_COMPOSITING=1
422 endif
423
424 ifeq ($(WEBCORE_INSTRUMENTATION),true)
425 LOCAL_CFLAGS += -DANDROID_INSTRUMENT
426 endif
427
428 # LOCAL_LDLIBS is used in simulator builds only and simulator builds are only
429 # valid on Linux
430 LOCAL_LDLIBS += -lpthread -ldl
431
432 # Build the list of shared libraries
433 LOCAL_SHARED_LIBRARIES := \
434         libandroid_runtime \
435         libnativehelper \
436         libsqlite \
437         libskia \
438         libutils \
439         libui \
440         libcutils \
441         libicuuc \
442         libicui18n \
443         libmedia \
444         libsurfaceflinger_client \
445         libEGL \
446         libGLESv2 \
447         libgui
448
449 ifeq ($(WEBCORE_INSTRUMENTATION),true)
450 LOCAL_SHARED_LIBRARIES += libhardware_legacy
451 endif
452
453 # We have to use the android version of libdl when we are not on the simulator
454 ifneq ($(TARGET_SIMULATOR),true)
455 LOCAL_SHARED_LIBRARIES += libdl libstlport
456 # We have to fake out some headers when using stlport.
457 LOCAL_C_INCLUDES += \
458         external/chromium/android
459 include external/stlport/libstlport.mk
460 endif
461
462 # We need Harfbuzz library to support complex scripts(Arabic, Thai, Hindi...).
463 ifeq ($(SUPPORT_COMPLEX_SCRIPTS),true)
464 LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
465         external/harfbuzz/src \
466         external/harfbuzz/contrib
467 LOCAL_SHARED_LIBRARIES += libharfbuzz
468 LOCAL_CFLAGS += -DSUPPORT_COMPLEX_SCRIPTS=1
469 endif
470
471 # Build the list of static libraries
472 LOCAL_STATIC_LIBRARIES := libxml2 libxslt libhyphenation
473 ifeq ($(JAVASCRIPT_ENGINE),v8)
474 LOCAL_STATIC_LIBRARIES += libv8
475 endif
476
477 ifeq ($(HTTP_STACK),chrome)
478 LOCAL_STATIC_LIBRARIES += libchromium_net
479 LOCAL_SHARED_LIBRARIES += libcrypto libssl libz
480 endif # HTTP_STACK == chrome
481
482 ifeq ($(ENABLE_AUTOFILL),true)
483 LOCAL_SHARED_LIBRARIES += libexpat
484 endif
485
486 # Redefine LOCAL_SRC_FILES to be all the WebKit source files
487 LOCAL_SRC_FILES := $(WEBKIT_SRC_FILES)
488
489 # Define this for use in other makefiles.
490 WEBKIT_C_INCLUDES := $(LOCAL_C_INCLUDES)
491 WEBKIT_CFLAGS := $(LOCAL_CFLAGS)
492 WEBKIT_CPPFLAGS := $(LOCAL_CPPFLAGS)
493 WEBKIT_GENERATED_SOURCES := $(LOCAL_GENERATED_SOURCES)
494 WEBKIT_LDLIBS := $(LOCAL_LDLIBS)
495 WEBKIT_SHARED_LIBRARIES := $(LOCAL_SHARED_LIBRARIES)
496 WEBKIT_STATIC_LIBRARIES := $(LOCAL_STATIC_LIBRARIES)
497
498 # Build the library all at once
499 include $(BUILD_STATIC_LIBRARY)
500
501 ifeq ($(JAVASCRIPT_ENGINE),jsc)
502 # Now build libjs as a static library.
503 include $(CLEAR_VARS)
504 LOCAL_MODULE := libjs
505 LOCAL_LDLIBS := $(WEBKIT_LDLIBS)
506 LOCAL_SHARED_LIBRARIES := $(WEBKIT_SHARED_LIBRARIES)
507 LOCAL_STATIC_LIBRARIES := $(WEBKIT_STATIC_LIBRARIES)
508 LOCAL_CFLAGS := $(WEBKIT_CFLAGS)
509 # Include source files for JavaScriptCore
510 <<<<<<< HEAD
511 d := JavaScriptCore
512 LOCAL_PATH := $(JAVASCRIPTCORE_PATH)
513 =======
514 d := Source/JavaScriptCore
515 LOCAL_PATH := $(BASE_PATH)/$d
516 >>>>>>> webkit.org at r75315
517 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
518 # Cannot use base_intermediates as this is a new module
519 intermediates := $(call local-intermediates-dir)
520 include $(LOCAL_PATH)/Android.mk
521 # Redefine LOCAL_SRC_FILES with the correct prefix
522 LOCAL_SRC_FILES := $(addprefix $d/,$(LOCAL_SRC_FILES))
523 # Use the base path to resolve file names
524 LOCAL_PATH := $(BASE_PATH)
525 # Append jsc intermediate include paths to the WebKit include list.
526 LOCAL_C_INCLUDES := $(WEBKIT_C_INCLUDES) \
527         $(intermediates) \
528         $(intermediates)/parser \
529         $(intermediates)/runtime \
530 # Build libjs
531 include $(BUILD_STATIC_LIBRARY)
532 endif  # JAVASCRIPT_ENGINE == jsc
533
534 # Now build the shared library using only the exported jni entry point. This
535 # will strip out any unused code from the entry point.
536 include $(CLEAR_VARS)
537 # if you need to make webcore huge (for debugging), enable this line
538 LOCAL_MODULE := libwebcore
539 LOCAL_LDLIBS := $(WEBKIT_LDLIBS)
540 LOCAL_SHARED_LIBRARIES := $(WEBKIT_SHARED_LIBRARIES)
541 LOCAL_STATIC_LIBRARIES := libwebcore $(WEBKIT_STATIC_LIBRARIES)
542 ifeq ($(JAVASCRIPT_ENGINE),jsc)
543 LOCAL_STATIC_LIBRARIES += libjs
544 endif
545 LOCAL_LDFLAGS := -fvisibility=hidden
546 LOCAL_CFLAGS := $(WEBKIT_CFLAGS)
547 LOCAL_CPPFLAGS := $(WEBKIT_CPPFLAGS)
548 LOCAL_C_INCLUDES := $(WEBKIT_C_INCLUDES)
549 LOCAL_PATH := $(BASE_PATH)
550 LOCAL_SRC_FILES := \
551         WebKit/android/jni/WebCoreJniOnLoad.cpp
552
553 ifeq ($(ENABLE_AUTOFILL),true)
554 # AutoFill requires some cpp files from Chromium to link with
555 # libchromium_net. We cannot compile them into libchromium_net
556 # because they have cpp file extensions, not .cc.
557 LOCAL_CFLAGS += -DWEBKIT_IMPLEMENTATION=1
558 LOCAL_SRC_FILES += \
559         WebKit/android/WebCoreSupport/autofill/MainThreadProxy.cpp \
560         WebKit/chromium/src/WebCString.cpp \
561         WebKit/chromium/src/WebRegularExpression.cpp \
562         WebKit/chromium/src/WebString.cpp
563 endif
564
565 # Do this dependency by hand. The reason we have to do this is because the
566 # headers that this file pulls in are generated during the build of webcore.
567 # We make all of our object files depend on those files so that they are built
568 # before we try to compile the file.
569 LOCAL_ADDITIONAL_DEPENDENCIES := $(filter %.h, $(WEBKIT_GENERATED_SOURCES))
570 include $(BUILD_SHARED_LIBRARY)
571
572 # Build the wds client
573 include $(BASE_PATH)/WebKit/android/wds/client/Android.mk
574
575 # Build the performance command line tool.
576 include $(BASE_PATH)/WebKit/android/benchmark/Android.mk
577
578 # Build the webkit merge tool.
579 include $(BASE_PATH)/Tools/android/webkitmerge/Android.mk