OSDN Git Service

am 3a3100a3: (-s ours) add security fix to webkit
[android-x86/external-webkit.git] / Android.jsc.mk
1 ##
2 ##
3 ## Copyright 2007, The Android Open Source Project
4 ##
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
8 ##
9 ##     http://www.apache.org/licenses/LICENSE-2.0
10 ##
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.
16 ##
17
18 BASE_PATH := $(call my-dir)
19 include $(CLEAR_VARS)
20
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)
25
26 # Using := here prevents recursive expansion
27 WEBKIT_SRC_FILES :=
28
29 # We have to use bison 2.3
30 include $(BASE_PATH)/bison_check.mk
31
32 # Include source files for JavaScriptCore
33 d := 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))
38
39 # Include source files for WebCore
40 d := 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))
45
46 # Include the derived source files for WebCore. Uses the same path as
47 # WebCore
48 include $(LOCAL_PATH)/Android.derived.mk
49 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
50
51 # Include source files for android WebKit port
52 d := WebKit
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))
57
58 # Redefine LOCAL_PATH here so the build system is not confused
59 LOCAL_PATH := $(BASE_PATH)
60
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
66
67 ifeq ($(TARGET_ARCH),arm)
68 LOCAL_CFLAGS += -Darm
69 endif
70
71 ifeq ($(ENABLE_SVG),true)
72 LOCAL_CFLAGS += -DENABLE_SVG=1
73 endif
74
75 # Temporary disable SVG_ANIMATION.
76 ifeq ($(ENABLE_SVG_ANIMATION),true)
77 LOCAL_CFLAGS += -DENABLE_SVG_ANIMATION=1
78 endif
79
80 ifeq ($(WEBCORE_INSTRUMENTATION),true)
81 LOCAL_CFLAGS += -DANDROID_INSTRUMENT
82 endif
83
84 # LOCAL_LDLIBS is used in simulator builds only and simulator builds are only
85 # valid on Linux
86 LOCAL_LDLIBS += -lpthread -ldl
87
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.
92 LOCAL_C_INCLUDES := \
93         $(JNI_H_INCLUDE) \
94         $(LOCAL_PATH)/WebKit/android/icu \
95         external/ \
96         external/icu4c/common \
97         external/icu4c/i18n \
98         external/libxml2/include \
99         external/skia/emoji \
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
183
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
192 endif
193
194 # Build the list of shared libraries
195 LOCAL_SHARED_LIBRARIES := \
196         libandroid_runtime \
197         libnativehelper \
198         libsqlite \
199         libsgl \
200         libcorecg \
201         libutils \
202         libui \
203         libcutils \
204         libicuuc \
205         libicudata \
206         libicui18n \
207         libmedia
208
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
212 endif
213
214 # Build the list of static libraries
215 LOCAL_STATIC_LIBRARIES := libxml2
216
217 # Redefine LOCAL_SRC_FILES to be all the WebKit source files
218 LOCAL_SRC_FILES := $(WEBKIT_SRC_FILES)
219
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)
227
228 # Build the library all at once
229 include $(BUILD_STATIC_LIBRARY)
230
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)
244 LOCAL_SRC_FILES := \
245         WebKit/android/jni/WebCoreJniOnLoad.cpp
246 include $(BUILD_SHARED_LIBRARY)
247
248 # Build the wds client
249 include $(BASE_PATH)/WebKit/android/wds/client/Android.mk
250
251 # Build the performance command line tool.
252 #include $(BASE_PATH)/perf/Android.mk
253
254 # Build the webkit merge tool.
255 include $(BASE_PATH)/WebKitTools/android/webkitmerge/Android.mk