OSDN Git Service

Merge branch 'readonly-p4-master'
[android-x86/external-webkit.git] / Android.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 # if you need to make webcore huge (for debugging), enable this line
22 #LOCAL_PRELINK_MODULE := false
23
24 # Define our module and find the intermediates directory
25 LOCAL_MODULE := libwebcore
26 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
27 base_intermediates := $(call local-intermediates-dir)
28
29 # Using := here prevents recursive expansion
30 WEBKIT_SRC_FILES :=
31
32 # We have to use bison 2.3
33 include $(BASE_PATH)/bison_check.mk
34
35 # Include source files for JavaScriptCore
36 d := JavaScriptCore
37 LOCAL_PATH := $(BASE_PATH)/$d
38 intermediates := $(base_intermediates)/$d
39 include $(LOCAL_PATH)/Android.mk
40 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
41
42 # Include source files for WebCore
43 d := WebCore
44 LOCAL_PATH := $(BASE_PATH)/$d
45 intermediates := $(base_intermediates)/$d
46 include $(LOCAL_PATH)/Android.mk
47 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
48
49 # Include the derived source files for WebCore. Uses the same path as
50 # WebCore
51 include $(LOCAL_PATH)/Android.derived.mk
52 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
53
54 # Include source files for android WebKit port
55 d := WebKit
56 LOCAL_PATH := $(BASE_PATH)/$d
57 intermediates := $(base_intermediates)/$d
58 include $(LOCAL_PATH)/Android.mk
59 WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
60
61 # Redefine LOCAL_PATH here so the build system is not confused
62 LOCAL_PATH := $(BASE_PATH)
63
64 # Define our compiler flags
65 LOCAL_CFLAGS += -Wno-endif-labels -Wno-import -Wno-format
66 LOCAL_CFLAGS += -fno-strict-aliasing
67 LOCAL_CFLAGS += -include "WebCorePrefixAndroid.h"
68
69 ifeq ($(TARGET_ARCH),arm)
70 LOCAL_CFLAGS += -Darm -fvisibility=hidden
71 endif
72
73 ifeq ($(WEBCORE_INSTRUMENTATION),true)
74 LOCAL_CFLAGS += -DANDROID_INSTRUMENT
75 endif
76
77 # LOCAL_LDLIBS is used in simulator builds only and simulator builds are only
78 # valid on Linux
79 LOCAL_LDLIBS += -lpthread -ldl
80
81 # Build our list of include paths. We include WebKit/android/icu first so that
82 # any files that include <unicode/ucnv.h> will include our ucnv.h first. We
83 # also add external/ as an include directory so that we can specify the real
84 # icu header directory as a more exact reference to avoid including our ucnv.h.
85 LOCAL_C_INCLUDES := \
86         $(JNI_H_INCLUDE) \
87         $(LOCAL_PATH)/WebKit/android/icu \
88         external/ \
89         external/icu4c/common \
90         external/icu4c/i18n \
91         external/libxml2/include \
92         external/skia/emoji \
93         external/skia/include/core \
94         external/skia/include/effects \
95         external/skia/include/images \
96         external/skia/include/ports \
97         external/skia/include/utils \
98         external/skia/src/ports \
99         external/sqlite/dist \
100         frameworks/base/core/jni/android/graphics \
101         $(LOCAL_PATH)/WebCore \
102         $(LOCAL_PATH)/WebCore/bindings/js \
103         $(LOCAL_PATH)/WebCore/bridge \
104         $(LOCAL_PATH)/WebCore/bridge/c \
105         $(LOCAL_PATH)/WebCore/bridge/jni \
106         $(LOCAL_PATH)/WebCore/css \
107         $(LOCAL_PATH)/WebCore/dom \
108         $(LOCAL_PATH)/WebCore/editing \
109         $(LOCAL_PATH)/WebCore/history \
110         $(LOCAL_PATH)/WebCore/html \
111         $(LOCAL_PATH)/WebCore/inspector \
112         $(LOCAL_PATH)/WebCore/loader \
113         $(LOCAL_PATH)/WebCore/loader/appcache \
114         $(LOCAL_PATH)/WebCore/loader/icon \
115         $(LOCAL_PATH)/WebCore/page \
116         $(LOCAL_PATH)/WebCore/page/android \
117         $(LOCAL_PATH)/WebCore/page/animation \
118         $(LOCAL_PATH)/WebCore/platform \
119         $(LOCAL_PATH)/WebCore/platform/android \
120         $(LOCAL_PATH)/WebCore/platform/animation \
121         $(LOCAL_PATH)/WebCore/platform/graphics \
122         $(LOCAL_PATH)/WebCore/platform/graphics/android \
123         $(LOCAL_PATH)/WebCore/platform/graphics/network \
124         $(LOCAL_PATH)/WebCore/platform/graphics/skia \
125         $(LOCAL_PATH)/WebCore/platform/graphics/transforms \
126         $(LOCAL_PATH)/WebCore/platform/image-decoders \
127         $(LOCAL_PATH)/WebCore/platform/network \
128         $(LOCAL_PATH)/WebCore/platform/network/android \
129         $(LOCAL_PATH)/WebCore/platform/sql \
130         $(LOCAL_PATH)/WebCore/platform/text \
131         $(LOCAL_PATH)/WebCore/plugins \
132         $(LOCAL_PATH)/WebCore/rendering \
133         $(LOCAL_PATH)/WebCore/rendering/style \
134         $(LOCAL_PATH)/WebCore/storage \
135         $(LOCAL_PATH)/WebCore/xml \
136         $(LOCAL_PATH)/WebKit/android \
137         $(LOCAL_PATH)/WebKit/android/WebCoreSupport \
138         $(LOCAL_PATH)/WebKit/android/jni \
139         $(LOCAL_PATH)/WebKit/android/nav \
140         $(LOCAL_PATH)/WebKit/android/plugins \
141         $(LOCAL_PATH)/WebKit/android/stl \
142         $(LOCAL_PATH)/JavaScriptCore \
143         $(LOCAL_PATH)/JavaScriptCore/API \
144         $(LOCAL_PATH)/JavaScriptCore/assembler \
145         $(LOCAL_PATH)/JavaScriptCore/bytecode \
146         $(LOCAL_PATH)/JavaScriptCore/bytecompiler \
147         $(LOCAL_PATH)/JavaScriptCore/debugger \
148         $(LOCAL_PATH)/JavaScriptCore/parser \
149         $(LOCAL_PATH)/JavaScriptCore/jit \
150         $(LOCAL_PATH)/JavaScriptCore/interpreter \
151         $(LOCAL_PATH)/JavaScriptCore/pcre \
152         $(LOCAL_PATH)/JavaScriptCore/profiler \
153         $(LOCAL_PATH)/JavaScriptCore/runtime \
154         $(LOCAL_PATH)/JavaScriptCore/wrec \
155         $(LOCAL_PATH)/JavaScriptCore/wtf \
156         $(LOCAL_PATH)/JavaScriptCore/wtf/unicode \
157         $(LOCAL_PATH)/JavaScriptCore/wtf/unicode/icu \
158         $(LOCAL_PATH)/JavaScriptCore/ForwardingHeaders \
159         $(base_intermediates)/JavaScriptCore \
160         $(base_intermediates)/JavaScriptCore/parser \
161         $(base_intermediates)/JavaScriptCore/runtime \
162         $(base_intermediates)/WebCore/ \
163         $(base_intermediates)/WebCore/bindings/js \
164         $(base_intermediates)/WebCore/css \
165         $(base_intermediates)/WebCore/dom \
166         $(base_intermediates)/WebCore/html \
167         $(base_intermediates)/WebCore/inspector \
168         $(base_intermediates)/WebCore/loader/appcache \
169         $(base_intermediates)/WebCore/page \
170         $(base_intermediates)/WebCore/platform \
171         $(base_intermediates)/WebCore/plugins \
172         $(base_intermediates)/WebCore/xml
173
174 # Build the list of shared libraries
175 LOCAL_SHARED_LIBRARIES := \
176         libandroid_runtime \
177         libnativehelper \
178         libsqlite \
179         libsgl \
180         libcorecg \
181         libutils \
182         libui \
183         libcutils \
184         libicuuc \
185         libicudata \
186         libicui18n \
187         libmedia
188
189 # We have to use the android version of libdl when we are not on the simulator
190 ifneq ($(TARGET_SIMULATOR),true)
191 LOCAL_SHARED_LIBRARIES += libdl
192 endif
193
194 # Build the list of static libraries
195 LOCAL_STATIC_LIBRARIES := libxml2
196
197 # Redefine LOCAL_SRC_FILES to be all the WebKit source files
198 LOCAL_SRC_FILES := $(WEBKIT_SRC_FILES)
199
200 # Build the library all at once
201 include $(BUILD_SHARED_LIBRARY)
202
203 # Build the plugin test separately from libwebcore
204 include $(BASE_PATH)/WebKit/android/plugins/sample/Android.mk
205
206 # Build the wds client
207 include $(BASE_PATH)/WebKit/android/wds/client/Android.mk
208
209 # Build the performance command line tool.
210 # XXX: Uncomment this include to build webcore_test. In order for the test to
211 # link with libwebcore, remove -fvisibility=hidden from LOCAL_CFLAGS above
212 #include $(BASE_PATH)/perf/Android.mk
213
214 # Build the webkit merge tool.
215 include $(BASE_PATH)/WebKitTools/android/webkitmerge/Android.mk