# can be set to true, so that two builds can be different but without
# specifying which JS engine to use.
+# To enable JIT in Android's JSC, please set ENABLE_JSC_JIT environment
+# variable to true.
+
# Read JS_ENGINE environment variable
JAVASCRIPT_ENGINE = $(JS_ENGINE)
+# The default / alternative engine depends on the device class.
+# On devices with a lot of memory (e.g. Passion/Sholes), the
+# default is V8. On everything else, the only choice is JSC.
+# TODO: use ARCH_ARM_HAVE_ARMV7 once that variable is added to
+# the build system.
+ifeq ($(ARCH_ARM_HAVE_VFP),true)
+ DEFAULT_ENGINE = v8
+ ALT_ENGINE = jsc
+else
+ DEFAULT_ENGINE = jsc
+ ALT_ENGINE = jsc
+endif
+
ifneq ($(JAVASCRIPT_ENGINE),jsc)
ifneq ($(JAVASCRIPT_ENGINE),v8)
# No JS engine is specified, pickup the one we want as default.
ifeq ($(USE_ALT_JS_ENGINE),true)
- JAVASCRIPT_ENGINE = v8
+ JAVASCRIPT_ENGINE = $(ALT_ENGINE)
else
- JAVASCRIPT_ENGINE = jsc
+ JAVASCRIPT_ENGINE = $(DEFAULT_ENGINE)
endif
endif
endif
LOCAL_C_INCLUDES := \
$(JNI_H_INCLUDE) \
$(LOCAL_PATH)/WebKit/android/icu \
- bionic/ \
external/ \
external/icu4c/common \
external/icu4c/i18n \
LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
$(LOCAL_PATH)/WebCore \
$(LOCAL_PATH)/WebCore/accessibility \
+ $(LOCAL_PATH)/WebCore/bindings/generic \
$(LOCAL_PATH)/WebCore/css \
$(LOCAL_PATH)/WebCore/dom \
$(LOCAL_PATH)/WebCore/editing \
$(LOCAL_PATH)/WebCore/platform/animation \
$(LOCAL_PATH)/WebCore/platform/graphics \
$(LOCAL_PATH)/WebCore/platform/graphics/android \
+ $(LOCAL_PATH)/WebCore/platform/graphics/filters \
$(LOCAL_PATH)/WebCore/platform/graphics/network \
$(LOCAL_PATH)/WebCore/platform/graphics/skia \
$(LOCAL_PATH)/WebCore/platform/graphics/transforms \
$(LOCAL_PATH)/WebCore/platform/image-decoders \
+ $(LOCAL_PATH)/WebCore/platform/image-decoders/bmp \
+ $(LOCAL_PATH)/WebCore/platform/image-decoders/gif \
+ $(LOCAL_PATH)/WebCore/platform/image-decoders/ico \
+ $(LOCAL_PATH)/WebCore/platform/image-decoders/jpeg \
+ $(LOCAL_PATH)/WebCore/platform/image-decoders/png \
$(LOCAL_PATH)/WebCore/platform/mock \
$(LOCAL_PATH)/WebCore/platform/network \
$(LOCAL_PATH)/WebCore/platform/network/android \
$(LOCAL_PATH)/WebCore/rendering \
$(LOCAL_PATH)/WebCore/rendering/style \
$(LOCAL_PATH)/WebCore/storage \
+ $(LOCAL_PATH)/WebCore/svg \
+ $(LOCAL_PATH)/WebCore/svg/animation \
+ $(LOCAL_PATH)/WebCore/svg/graphics \
+ $(LOCAL_PATH)/WebCore/svg/graphics/filters \
+ $(LOCAL_PATH)/WebCore/websockets \
$(LOCAL_PATH)/WebCore/workers \
$(LOCAL_PATH)/WebCore/xml
$(base_intermediates)/WebCore/html \
$(base_intermediates)/WebCore/platform
-ifeq ($(ENABLE_SVG), true)
-LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
- $(LOCAL_PATH)/WebCore/platform/graphics/filters \
- $(LOCAL_PATH)/WebCore/svg \
- $(LOCAL_PATH)/WebCore/svg/animation \
- $(LOCAL_PATH)/WebCore/svg/graphics \
- $(LOCAL_PATH)/WebCore/svg/graphics/filters \
- $(base_intermediates)/WebCore/svg
-endif
-
ifeq ($(JAVASCRIPT_ENGINE),v8)
# Include WTF source file.
d := JavaScriptCore
endif
ifeq ($(JAVASCRIPT_ENGINE),v8)
include $(LOCAL_PATH)/Android.v8bindings.mk
-# TODO: We should use the WebCore JNI code instead.
-JNI_PATH := V8Binding/jni
-# bridge/jni path must be listed after V8Bindings, so files are preferentially
-# included from V8bindings.
-BINDING_C_INCLUDES += \
- $(BASE_PATH)/$(JNI_PATH) \
- $(LOCAL_PATH)/bridge/jni \
- $(LOCAL_PATH)/bridge/jni/v8
-JNI_SRC_FILES := \
- jni_class.cpp \
- jni_instance.cpp \
- jni_npobject.cpp \
- jni_runtime.cpp
-WEBKIT_SRC_FILES += $(addprefix $(JNI_PATH)/,$(JNI_SRC_FILES))
endif
WEBKIT_SRC_FILES += $(addprefix $d/,$(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES += $(BINDING_C_INCLUDES)
LOCAL_CFLAGS += -include "WebCorePrefix.h"
LOCAL_CFLAGS += -fvisibility=hidden
+# Enable JSC JIT if JSC is used and ENABLE_JSC_JIT environment
+# variable is set to true
+ifeq ($(JAVASCRIPT_ENGINE),jsc)
+ifeq ($(ENABLE_JSC_JIT),true)
+LOCAL_CFLAGS += -DENABLE_ANDROID_JSC_JIT=1
+endif
+endif
+
ifeq ($(TARGET_ARCH),arm)
LOCAL_CFLAGS += -Darm
# remove this warning: "note: the mangling of 'va_list' has changed in GCC 4.4"
LOCAL_CFLAGS += -Wno-psabi
endif
+# need a flag to tell the C side when we're on devices with large memory
+# budgets (i.e. larger than the low-end devices that initially shipped)
+ifeq ($(ARCH_ARM_HAVE_VFP),true)
+LOCAL_CFLAGS += -DANDROID_LARGE_MEMORY_DEVICE
+endif
+
ifeq ($(ENABLE_SVG),true)
LOCAL_CFLAGS += -DENABLE_SVG=1
endif
+ifeq ($(ENABLE_WTF_USE_ACCELERATED_COMPOSITING),false)
+LOCAL_CFLAGS += -DWTF_USE_ACCELERATED_COMPOSITING=0
+endif
+
+ifeq ($(ENABLE_WTF_USE_ACCELERATED_COMPOSITING),true)
+LOCAL_CFLAGS += -DWTF_USE_ACCELERATED_COMPOSITING=1
+endif
+
# Temporary disable SVG_ANIMATION.
ifeq ($(ENABLE_SVG_ANIMATION),true)
LOCAL_CFLAGS += -DENABLE_SVG_ANIMATION=1
libui \
libcutils \
libicuuc \
- libicudata \
libicui18n \
- libmedia
+ libmedia \
+ libsurfaceflinger_client
ifeq ($(WEBCORE_INSTRUMENTATION),true)
LOCAL_SHARED_LIBRARIES += libhardware_legacy
# We have to use the android version of libdl when we are not on the simulator
ifneq ($(TARGET_SIMULATOR),true)
-LOCAL_SHARED_LIBRARIES += libdl
-LOCAL_C_INCLUDES += \
- $(LOCAL_PATH)/WebKit/android/stlport
+LOCAL_SHARED_LIBRARIES += libdl libstlport
+include external/stlport/libstlport.mk
endif
# Build the list of static libraries