3 ## Copyright 2007, The Android Open Source Project
5 ## Licensed under the Apache License, Version 2.0 (the "License");
6 ## you may not use this file except in compliance with the License.
7 ## You may obtain a copy of the License at
9 ## http://www.apache.org/licenses/LICENSE-2.0
11 ## Unless required by applicable law or agreed to in writing, software
12 ## distributed under the License is distributed on an "AS IS" BASIS,
13 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ## See the License for the specific language governing permissions and
15 ## limitations under the License.
18 BASE_PATH := $(call my-dir)
21 # Define our module and find the intermediates directory
22 LOCAL_MODULE := libwebcore
23 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
24 base_intermediates := $(call local-intermediates-dir)
26 # Using := here prevents recursive expansion
29 # We have to use bison 2.3
30 include $(BASE_PATH)/bison_check.mk
32 # Include source files for JavaScriptCore
34 LOCAL_PATH := $(BASE_PATH)/$d
35 intermediates := $(base_intermediates)/$d
36 include $(LOCAL_PATH)/Android.mk
37 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
39 # Include source files for WebCore
41 LOCAL_PATH := $(BASE_PATH)/$d
42 intermediates := $(base_intermediates)/$d
43 include $(LOCAL_PATH)/Android.mk
44 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
46 # Include the derived source files for WebCore. Uses the same path as
48 include $(LOCAL_PATH)/Android.derived.mk
49 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
51 # Include source files for android WebKit port
53 LOCAL_PATH := $(BASE_PATH)/$d
54 intermediates := $(base_intermediates)/$d
55 include $(LOCAL_PATH)/Android.mk
56 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
58 # Redefine LOCAL_PATH here so the build system is not confused
59 LOCAL_PATH := $(BASE_PATH)
61 # Define our compiler flags
62 LOCAL_CFLAGS += -Wno-endif-labels -Wno-import -Wno-format
63 LOCAL_CFLAGS += -fno-strict-aliasing
64 LOCAL_CFLAGS += -include "WebCorePrefixAndroid.h"
65 LOCAL_CFLAGS += -fvisibility=hidden
67 ifeq ($(TARGET_ARCH),arm)
71 ifeq ($(ENABLE_SVG),true)
72 LOCAL_CFLAGS += -DENABLE_SVG=1
75 # Temporary disable SVG_ANIMATION.
76 ifeq ($(ENABLE_SVG_ANIMATION),true)
77 LOCAL_CFLAGS += -DENABLE_SVG_ANIMATION=1
80 ifeq ($(WEBCORE_INSTRUMENTATION),true)
81 LOCAL_CFLAGS += -DANDROID_INSTRUMENT
84 # LOCAL_LDLIBS is used in simulator builds only and simulator builds are only
86 LOCAL_LDLIBS += -lpthread -ldl
88 # Build our list of include paths. We include WebKit/android/icu first so that
89 # any files that include <unicode/ucnv.h> will include our ucnv.h first. We
90 # also add external/ as an include directory so that we can specify the real
91 # icu header directory as a more exact reference to avoid including our ucnv.h.
94 $(LOCAL_PATH)/WebKit/android/icu \
96 external/icu4c/common \
98 external/libxml2/include \
100 external/skia/include/core \
101 external/skia/include/effects \
102 external/skia/include/images \
103 external/skia/include/ports \
104 external/skia/include/utils \
105 external/skia/src/ports \
106 external/sqlite/dist \
107 frameworks/base/core/jni/android/graphics \
108 $(LOCAL_PATH)/WebCore \
109 $(LOCAL_PATH)/WebCore/bindings/js \
110 $(LOCAL_PATH)/WebCore/bridge \
111 $(LOCAL_PATH)/WebCore/bridge/c \
112 $(LOCAL_PATH)/WebCore/bridge/jni \
113 $(LOCAL_PATH)/WebCore/css \
114 $(LOCAL_PATH)/WebCore/dom \
115 $(LOCAL_PATH)/WebCore/editing \
116 $(LOCAL_PATH)/WebCore/history \
117 $(LOCAL_PATH)/WebCore/html \
118 $(LOCAL_PATH)/WebCore/inspector \
119 $(LOCAL_PATH)/WebCore/loader \
120 $(LOCAL_PATH)/WebCore/loader/appcache \
121 $(LOCAL_PATH)/WebCore/loader/icon \
122 $(LOCAL_PATH)/WebCore/page \
123 $(LOCAL_PATH)/WebCore/page/android \
124 $(LOCAL_PATH)/WebCore/page/animation \
125 $(LOCAL_PATH)/WebCore/platform \
126 $(LOCAL_PATH)/WebCore/platform/android \
127 $(LOCAL_PATH)/WebCore/platform/animation \
128 $(LOCAL_PATH)/WebCore/platform/graphics \
129 $(LOCAL_PATH)/WebCore/platform/graphics/android \
130 $(LOCAL_PATH)/WebCore/platform/graphics/network \
131 $(LOCAL_PATH)/WebCore/platform/graphics/skia \
132 $(LOCAL_PATH)/WebCore/platform/graphics/transforms \
133 $(LOCAL_PATH)/WebCore/platform/image-decoders \
134 $(LOCAL_PATH)/WebCore/platform/network \
135 $(LOCAL_PATH)/WebCore/platform/network/android \
136 $(LOCAL_PATH)/WebCore/platform/sql \
137 $(LOCAL_PATH)/WebCore/platform/text \
138 $(LOCAL_PATH)/WebCore/plugins \
139 $(LOCAL_PATH)/WebCore/plugins/android \
140 $(LOCAL_PATH)/WebCore/rendering \
141 $(LOCAL_PATH)/WebCore/rendering/style \
142 $(LOCAL_PATH)/WebCore/storage \
143 $(LOCAL_PATH)/WebCore/workers \
144 $(LOCAL_PATH)/WebCore/xml \
145 $(LOCAL_PATH)/WebKit/android \
146 $(LOCAL_PATH)/WebKit/android/WebCoreSupport \
147 $(LOCAL_PATH)/WebKit/android/jni \
148 $(LOCAL_PATH)/WebKit/android/nav \
149 $(LOCAL_PATH)/WebKit/android/plugins \
150 $(LOCAL_PATH)/WebKit/android/stl \
151 $(LOCAL_PATH)/JavaScriptCore \
152 $(LOCAL_PATH)/JavaScriptCore/API \
153 $(LOCAL_PATH)/JavaScriptCore/assembler \
154 $(LOCAL_PATH)/JavaScriptCore/bytecode \
155 $(LOCAL_PATH)/JavaScriptCore/bytecompiler \
156 $(LOCAL_PATH)/JavaScriptCore/debugger \
157 $(LOCAL_PATH)/JavaScriptCore/parser \
158 $(LOCAL_PATH)/JavaScriptCore/jit \
159 $(LOCAL_PATH)/JavaScriptCore/interpreter \
160 $(LOCAL_PATH)/JavaScriptCore/pcre \
161 $(LOCAL_PATH)/JavaScriptCore/profiler \
162 $(LOCAL_PATH)/JavaScriptCore/runtime \
163 $(LOCAL_PATH)/JavaScriptCore/wrec \
164 $(LOCAL_PATH)/JavaScriptCore/wtf \
165 $(LOCAL_PATH)/JavaScriptCore/wtf/unicode \
166 $(LOCAL_PATH)/JavaScriptCore/wtf/unicode/icu \
167 $(LOCAL_PATH)/JavaScriptCore/ForwardingHeaders \
168 $(base_intermediates)/JavaScriptCore \
169 $(base_intermediates)/JavaScriptCore/parser \
170 $(base_intermediates)/JavaScriptCore/runtime \
171 $(base_intermediates)/WebCore/ \
172 $(base_intermediates)/WebCore/bindings/js \
173 $(base_intermediates)/WebCore/css \
174 $(base_intermediates)/WebCore/dom \
175 $(base_intermediates)/WebCore/html \
176 $(base_intermediates)/WebCore/inspector \
177 $(base_intermediates)/WebCore/loader/appcache \
178 $(base_intermediates)/WebCore/page \
179 $(base_intermediates)/WebCore/platform \
180 $(base_intermediates)/WebCore/plugins \
181 $(base_intermediates)/WebCore/storage \
182 $(base_intermediates)/WebCore/xml
184 ifeq ($(ENABLE_SVG), true)
185 LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
186 $(LOCAL_PATH)/WebCore/platform/graphics/filters \
187 $(LOCAL_PATH)/WebCore/svg \
188 $(LOCAL_PATH)/WebCore/svg/animation \
189 $(LOCAL_PATH)/WebCore/svg/graphics \
190 $(LOCAL_PATH)/WebCore/svg/graphics/filters \
191 $(base_intermediates)/WebCore/svg
194 # Build the list of shared libraries
195 LOCAL_SHARED_LIBRARIES := \
209 # We have to use the android version of libdl when we are not on the simulator
210 ifneq ($(TARGET_SIMULATOR),true)
211 LOCAL_SHARED_LIBRARIES += libdl
214 # Build the list of static libraries
215 LOCAL_STATIC_LIBRARIES := libxml2
217 # Redefine LOCAL_SRC_FILES to be all the WebKit source files
218 LOCAL_SRC_FILES := $(WEBKIT_SRC_FILES)
220 # Define this for use in other makefiles.
221 WEBKIT_C_INCLUDES := $(LOCAL_C_INCLUDES)
222 WEBKIT_CFLAGS := $(LOCAL_CFLAGS)
223 WEBKIT_GENERATED_SOURCES := $(LOCAL_GENERATED_SOURCES)
224 WEBKIT_LDLIBS := $(LOCAL_LDLIBS)
225 WEBKIT_SHARED_LIBRARIES := $(LOCAL_SHARED_LIBRARIES)
226 WEBKIT_STATIC_LIBRARIES := $(LOCAL_STATIC_LIBRARIES)
228 # Build the library all at once
229 include $(BUILD_STATIC_LIBRARY)
231 # Now build the shared library using only the exported jni entry point. This
232 # will strip out any unused code from the entry point.
233 include $(CLEAR_VARS)
234 # if you need to make webcore huge (for debugging), enable this line
235 #LOCAL_PRELINK_MODULE := false
236 LOCAL_MODULE := libwebcore
237 LOCAL_LDLIBS := $(WEBKIT_LDLIBS)
238 LOCAL_SHARED_LIBRARIES := $(WEBKIT_SHARED_LIBRARIES)
239 LOCAL_STATIC_LIBRARIES := libwebcore $(WEBKIT_STATIC_LIBRARIES)
240 LOCAL_LDFLAGS := -fvisibility=hidden
241 LOCAL_CFLAGS := $(WEBKIT_CFLAGS)
242 LOCAL_C_INCLUDES := $(WEBKIT_C_INCLUDES)
243 LOCAL_PATH := $(BASE_PATH)
245 WebKit/android/jni/WebCoreJniOnLoad.cpp
246 include $(BUILD_SHARED_LIBRARY)
248 # Build the wds client
249 include $(BASE_PATH)/WebKit/android/wds/client/Android.mk
251 # Build the performance command line tool.
252 #include $(BASE_PATH)/perf/Android.mk
254 # Build the webkit merge tool.
255 include $(BASE_PATH)/WebKitTools/android/webkitmerge/Android.mk