OSDN Git Service

am 3a3100a3: (-s ours) add security fix to webkit
[android-x86/external-webkit.git] / Android.v8.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 d := V8Binding
33 LOCAL_PATH := $(BASE_PATH)/$d
34 WEBCORE_PATH := $(BASE_PATH)/WebCore
35 intermediates := $(base_intermediates)/WebCore
36 JAVASCRIPTCORE_PATH := $(BASE_PATH)/JavaScriptCore
37 include $(LOCAL_PATH)/V8Binding.derived.mk
38 WEBKIT_SRC_FILES += $(addprefix $d/, $(LOCAL_SRC_FILES))
39 WEBKIT_SRC_FILES += $(addprefix WebCore/, $(WEBCORE_SRC_FILES))
40
41 # Include WTF source file.
42 d := JavaScriptCore
43 LOCAL_PATH := $(BASE_PATH)/$d
44 intermediates := $(base_intermediates)/$d
45 include $(LOCAL_PATH)/Android.wtf.mk
46 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
47
48 # Include source files for WebCore
49 d := WebCore
50 LOCAL_PATH := $(BASE_PATH)/$d
51 intermediates := $(base_intermediates)/$d
52 include $(LOCAL_PATH)/Android.v8.mk
53 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
54
55 # Include the derived source files for WebCore. Uses the same path as
56 # WebCore
57 include $(LOCAL_PATH)/Android.v8.derived.mk
58 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
59
60 # Include source files for android WebKit port
61 d := WebKit
62 LOCAL_PATH := $(BASE_PATH)/$d
63 intermediates := $(base_intermediates)/$d
64 include $(LOCAL_PATH)/Android.mk
65 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
66
67 # Redefine LOCAL_PATH here so the build system is not confused
68 LOCAL_PATH := $(BASE_PATH)
69
70 # Define our compiler flags
71 LOCAL_CFLAGS += -Wno-endif-labels -Wno-import -Wno-format
72 LOCAL_CFLAGS += -fno-strict-aliasing
73 LOCAL_CFLAGS += -include "WebCorePrefixAndroid.h"
74 LOCAL_CFLAGS += -fvisibility=hidden
75
76 ifeq ($(TARGET_ARCH),arm)
77 LOCAL_CFLAGS += -Darm
78 endif
79
80 ifeq ($(ENABLE_SVG),true)
81 LOCAL_CFLAGS += -DENABLE_SVG=1
82 endif
83
84 # Temporary disable SVG_ANIMATION.
85 ifeq ($(ENABLE_SVG_ANIMATION),true)
86 LOCAL_CFLAGS += -DENABLE_SVG_ANIMATION=1
87 endif
88
89 ifeq ($(WEBCORE_INSTRUMENTATION),true)
90 LOCAL_CFLAGS += -DANDROID_INSTRUMENT
91 endif
92
93 # LOCAL_LDLIBS is used in simulator builds only and simulator builds are only
94 # valid on Linux
95 LOCAL_LDLIBS += -lpthread -ldl
96
97 # Build our list of include paths. We include WebKit/android/icu first so that
98 # any files that include <unicode/ucnv.h> will include our ucnv.h first. We
99 # also add external/ as an include directory so that we can specify the real
100 # icu header directory as a more exact reference to avoid including our ucnv.h.
101 LOCAL_C_INCLUDES := \
102         $(JNI_H_INCLUDE) \
103         $(LOCAL_PATH)/WebKit/android/icu \
104         external/ \
105         external/icu4c/common \
106         external/icu4c/i18n \
107         external/libxml2/include \
108         external/skia/emoji \
109         external/skia/include/core \
110         external/skia/include/effects \
111         external/skia/include/images \
112         external/skia/include/ports \
113         external/skia/include/utils \
114         external/skia/src/ports \
115         external/sqlite/dist \
116         frameworks/base/core/jni/android/graphics \
117         $(LOCAL_PATH) \
118         $(LOCAL_PATH)/WebCore \
119         $(LOCAL_PATH)/WebCore/css \
120         $(LOCAL_PATH)/WebCore/dom \
121         $(LOCAL_PATH)/WebCore/editing \
122         $(LOCAL_PATH)/WebCore/history \
123         $(LOCAL_PATH)/WebCore/html \
124         $(LOCAL_PATH)/WebCore/inspector \
125         $(LOCAL_PATH)/WebCore/loader \
126         $(LOCAL_PATH)/WebCore/loader/appcache \
127         $(LOCAL_PATH)/WebCore/loader/icon \
128         $(LOCAL_PATH)/WebCore/page \
129         $(LOCAL_PATH)/WebCore/page/android \
130         $(LOCAL_PATH)/WebCore/page/animation \
131         $(LOCAL_PATH)/WebCore/platform \
132         $(LOCAL_PATH)/WebCore/platform/android \
133         $(LOCAL_PATH)/WebCore/platform/animation \
134         $(LOCAL_PATH)/WebCore/platform/graphics \
135         $(LOCAL_PATH)/WebCore/platform/graphics/android \
136         $(LOCAL_PATH)/WebCore/platform/graphics/network \
137         $(LOCAL_PATH)/WebCore/platform/graphics/skia \
138         $(LOCAL_PATH)/WebCore/platform/graphics/transforms \
139         $(LOCAL_PATH)/WebCore/platform/image-decoders \
140         $(LOCAL_PATH)/WebCore/platform/network \
141         $(LOCAL_PATH)/WebCore/platform/network/android \
142         $(LOCAL_PATH)/WebCore/platform/sql \
143         $(LOCAL_PATH)/WebCore/platform/text \
144         $(LOCAL_PATH)/WebCore/plugins \
145         $(LOCAL_PATH)/WebCore/plugins/android \
146         $(LOCAL_PATH)/WebCore/rendering \
147         $(LOCAL_PATH)/WebCore/rendering/style \
148         $(LOCAL_PATH)/WebCore/storage \
149         $(LOCAL_PATH)/WebCore/workers \
150         $(LOCAL_PATH)/WebCore/xml \
151         $(LOCAL_PATH)/WebKit/android \
152         $(LOCAL_PATH)/WebKit/android/WebCoreSupport \
153         $(LOCAL_PATH)/WebKit/android/jni \
154         $(LOCAL_PATH)/WebKit/android/nav \
155         $(LOCAL_PATH)/WebKit/android/plugins \
156         $(LOCAL_PATH)/WebKit/android/stl \
157         $(LOCAL_PATH)/JavaScriptCore/wtf \
158         $(LOCAL_PATH)/JavaScriptCore/wtf/unicode \
159         $(LOCAL_PATH)/JavaScriptCore/wtf/unicode/icu \
160         $(BINDING_C_INCLUDES) \
161         $(base_intermediates)/WebCore/ \
162         $(base_intermediates)/WebCore/css \
163         $(base_intermediates)/WebCore/dom \
164         $(base_intermediates)/WebCore/html \
165         $(base_intermediates)/WebCore/inspector \
166         $(base_intermediates)/WebCore/loader/appcache \
167         $(base_intermediates)/WebCore/page \
168         $(base_intermediates)/WebCore/platform \
169         $(base_intermediates)/WebCore/plugins \
170         $(base_intermediates)/WebCore/storage \
171         $(base_intermediates)/WebCore/xml \
172         $(base_intermediates)/JavaScriptCore
173
174 ifeq ($(ENABLE_SVG), true)
175 LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
176         $(LOCAL_PATH)/WebCore/platform/graphics/filters \
177         $(LOCAL_PATH)/WebCore/svg \
178         $(LOCAL_PATH)/WebCore/svg/animation \
179         $(LOCAL_PATH)/WebCore/svg/graphics \
180         $(LOCAL_PATH)/WebCore/svg/graphics/filters \
181         $(base_intermediates)/WebCore/svg
182 endif
183
184 # Build the list of shared libraries
185 LOCAL_SHARED_LIBRARIES := \
186         libandroid_runtime \
187         libnativehelper \
188         libsqlite \
189         libsgl \
190         libcorecg \
191         libutils \
192         libui \
193         libcutils \
194         libicuuc \
195         libicudata \
196         libicui18n \
197         libmedia
198
199 # We have to use the android version of libdl when we are not on the simulator
200 ifneq ($(TARGET_SIMULATOR),true)
201 LOCAL_SHARED_LIBRARIES += libdl
202 endif
203
204 # Build the list of static libraries
205 LOCAL_STATIC_LIBRARIES := libxml2 libv8
206
207 # Redefine LOCAL_SRC_FILES to be all the WebKit source files
208 LOCAL_SRC_FILES := $(WEBKIT_SRC_FILES)
209
210 # Define this for use in other makefiles.
211 WEBKIT_C_INCLUDES := $(LOCAL_C_INCLUDES)
212 WEBKIT_CFLAGS := $(LOCAL_CFLAGS)
213 WEBKIT_GENERATED_SOURCES := $(LOCAL_GENERATED_SOURCES)
214 WEBKIT_LDLIBS := $(LOCAL_LDLIBS)
215 WEBKIT_SHARED_LIBRARIES := $(LOCAL_SHARED_LIBRARIES)
216 WEBKIT_STATIC_LIBRARIES := $(LOCAL_STATIC_LIBRARIES)
217
218 # Build the library all at once
219 include $(BUILD_STATIC_LIBRARY)
220
221 # Now build the shared library using only the exported jni entry point. This
222 # will strip out any unused code from the entry point.
223 include $(CLEAR_VARS)
224 # if you need to make webcore huge (for debugging), enable this line
225 #LOCAL_PRELINK_MODULE := false
226 LOCAL_MODULE := libwebcore
227 LOCAL_LDLIBS := $(WEBKIT_LDLIBS)
228 LOCAL_SHARED_LIBRARIES := $(WEBKIT_SHARED_LIBRARIES)
229 LOCAL_STATIC_LIBRARIES := libwebcore $(WEBKIT_STATIC_LIBRARIES)
230 LOCAL_LDFLAGS := -fvisibility=hidden
231 LOCAL_CFLAGS := $(WEBKIT_CFLAGS)
232 LOCAL_C_INCLUDES := $(WEBKIT_C_INCLUDES)
233 LOCAL_PATH := $(BASE_PATH)
234 LOCAL_SRC_FILES := \
235         WebKit/android/jni/WebCoreJniOnLoad.cpp
236 include $(BUILD_SHARED_LIBRARY)
237
238 # Build the wds client
239 include $(BASE_PATH)/WebKit/android/wds/client/Android.mk
240
241 # Build the performance command line tool.
242 #include $(BASE_PATH)/perf/Android.mk
243
244 # Build the webkit merge tool.
245 include $(BASE_PATH)/WebKitTools/android/webkitmerge/Android.mk
246
247 # Build libv8 and v8shell
248 include $(BASE_PATH)/v8/Android.mk
249 include $(BASE_PATH)/v8/Android.v8shell.mk