OSDN Git Service

auto import from //branches/cupcake_rel/...@140373
[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
82 LOCAL_C_INCLUDES := \
83         $(JNI_H_INCLUDE) \
84         external/icu4c/common \
85         external/icu4c/i18n \
86         external/libxml2/include \
87         external/skia/emoji \
88         external/skia/include/core \
89         external/skia/include/effects \
90         external/skia/include/images \
91         external/skia/include/ports \
92         external/skia/include/utils \
93         external/skia/src/ports \
94         external/sqlite/dist \
95         frameworks/base/core/jni/android/graphics \
96         $(LOCAL_PATH)/WebCore \
97         $(LOCAL_PATH)/WebCore/bindings/js \
98         $(LOCAL_PATH)/WebCore/bridge \
99         $(LOCAL_PATH)/WebCore/bridge/c \
100         $(LOCAL_PATH)/WebCore/bridge/jni \
101         $(LOCAL_PATH)/WebCore/css \
102         $(LOCAL_PATH)/WebCore/dom \
103         $(LOCAL_PATH)/WebCore/editing \
104         $(LOCAL_PATH)/WebCore/history \
105         $(LOCAL_PATH)/WebCore/html \
106         $(LOCAL_PATH)/WebCore/inspector \
107         $(LOCAL_PATH)/WebCore/loader \
108         $(LOCAL_PATH)/WebCore/loader/appcache \
109         $(LOCAL_PATH)/WebCore/loader/icon \
110         $(LOCAL_PATH)/WebCore/page \
111         $(LOCAL_PATH)/WebCore/page/android \
112         $(LOCAL_PATH)/WebCore/page/animation \
113         $(LOCAL_PATH)/WebCore/platform \
114         $(LOCAL_PATH)/WebCore/platform/android \
115         $(LOCAL_PATH)/WebCore/platform/animation \
116         $(LOCAL_PATH)/WebCore/platform/graphics \
117         $(LOCAL_PATH)/WebCore/platform/graphics/android \
118         $(LOCAL_PATH)/WebCore/platform/graphics/network \
119         $(LOCAL_PATH)/WebCore/platform/graphics/transforms \
120         $(LOCAL_PATH)/WebCore/platform/image-decoders \
121         $(LOCAL_PATH)/WebCore/platform/network \
122         $(LOCAL_PATH)/WebCore/platform/network/android \
123         $(LOCAL_PATH)/WebCore/platform/sql \
124         $(LOCAL_PATH)/WebCore/platform/text \
125         $(LOCAL_PATH)/WebCore/plugins \
126         $(LOCAL_PATH)/WebCore/rendering \
127         $(LOCAL_PATH)/WebCore/rendering/style \
128         $(LOCAL_PATH)/WebCore/storage \
129         $(LOCAL_PATH)/WebCore/xml \
130         $(LOCAL_PATH)/WebKit/android \
131         $(LOCAL_PATH)/WebKit/android/WebCoreSupport \
132         $(LOCAL_PATH)/WebKit/android/jni \
133         $(LOCAL_PATH)/WebKit/android/nav \
134         $(LOCAL_PATH)/WebKit/android/plugins \
135         $(LOCAL_PATH)/WebKit/android/stl \
136         $(LOCAL_PATH)/JavaScriptCore \
137         $(LOCAL_PATH)/JavaScriptCore/API \
138         $(LOCAL_PATH)/JavaScriptCore/assembler \
139         $(LOCAL_PATH)/JavaScriptCore/bytecode \
140         $(LOCAL_PATH)/JavaScriptCore/bytecompiler \
141         $(LOCAL_PATH)/JavaScriptCore/debugger \
142         $(LOCAL_PATH)/JavaScriptCore/parser \
143         $(LOCAL_PATH)/JavaScriptCore/jit \
144         $(LOCAL_PATH)/JavaScriptCore/interpreter \
145         $(LOCAL_PATH)/JavaScriptCore/pcre \
146         $(LOCAL_PATH)/JavaScriptCore/profiler \
147         $(LOCAL_PATH)/JavaScriptCore/runtime \
148         $(LOCAL_PATH)/JavaScriptCore/wrec \
149         $(LOCAL_PATH)/JavaScriptCore/wtf \
150         $(LOCAL_PATH)/JavaScriptCore/wtf/unicode \
151         $(LOCAL_PATH)/JavaScriptCore/wtf/unicode/icu \
152         $(LOCAL_PATH)/JavaScriptCore/ForwardingHeaders \
153         $(base_intermediates)/JavaScriptCore \
154         $(base_intermediates)/JavaScriptCore/parser \
155         $(base_intermediates)/JavaScriptCore/runtime \
156         $(base_intermediates)/WebCore/ \
157         $(base_intermediates)/WebCore/bindings/js \
158         $(base_intermediates)/WebCore/css \
159         $(base_intermediates)/WebCore/dom \
160         $(base_intermediates)/WebCore/html \
161         $(base_intermediates)/WebCore/inspector \
162         $(base_intermediates)/WebCore/loader/appcache \
163         $(base_intermediates)/WebCore/page \
164         $(base_intermediates)/WebCore/platform \
165         $(base_intermediates)/WebCore/plugins \
166         $(base_intermediates)/WebCore/xml
167
168 # Build the list of shared libraries
169 LOCAL_SHARED_LIBRARIES := \
170         libandroid_runtime \
171         libnativehelper \
172         libsqlite \
173         libsgl \
174         libcorecg \
175         libutils \
176         libui \
177         libcutils \
178         libicuuc \
179         libicudata \
180         libicui18n \
181         libmedia
182
183 # We have to use the android version of libdl when we are not on the simulator
184 ifneq ($(TARGET_SIMULATOR),true)
185 LOCAL_SHARED_LIBRARIES += libdl
186 endif
187
188 # Build the list of static libraries
189 LOCAL_STATIC_LIBRARIES := libxml2
190
191 # Redefine LOCAL_SRC_FILES to be all the WebKit source files
192 LOCAL_SRC_FILES := $(WEBKIT_SRC_FILES)
193
194 # Build the library all at once
195 include $(BUILD_SHARED_LIBRARY)
196
197 # Build the plugin test separately from libwebcore
198 include $(BASE_PATH)/WebKit/android/plugins/sample/Android.mk
199
200 # Build the wds client
201 include $(BASE_PATH)/WebKit/android/wds/client/Android.mk
202
203 # Build the performance command line tool.
204 # XXX: Uncomment this include to build webcore_test. In order for the test to
205 # link with libwebcore, remove -fvisibility=hidden from LOCAL_CFLAGS above
206 #include $(BASE_PATH)/perf/Android.mk