summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Android.mk
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/Android.mk')
-rw-r--r--libs/hwui/Android.mk64
1 files changed, 36 insertions, 28 deletions
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index 0444964..1efe6b5 100644
--- a/libs/hwui/Android.mk
+++ b/libs/hwui/Android.mk
@@ -1,33 +1,41 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_SRC_FILES:= \
- FontRenderer.cpp \
- GradientCache.cpp \
- LayerCache.cpp \
- Matrix.cpp \
- OpenGLRenderer.cpp \
- Patch.cpp \
- PatchCache.cpp \
- PathCache.cpp \
- Program.cpp \
- ProgramCache.cpp \
- SkiaColorFilter.cpp \
- SkiaShader.cpp \
- TextureCache.cpp
+# Only build libhwui when USE_OPENGL_RENDERER is
+# defined in the current device/board configuration
+ifeq ($(USE_OPENGL_RENDERER),true)
+ LOCAL_SRC_FILES:= \
+ FontRenderer.cpp \
+ GradientCache.cpp \
+ LayerCache.cpp \
+ Matrix.cpp \
+ OpenGLRenderer.cpp \
+ Patch.cpp \
+ PatchCache.cpp \
+ PathCache.cpp \
+ Program.cpp \
+ ProgramCache.cpp \
+ SkiaColorFilter.cpp \
+ SkiaShader.cpp \
+ TextureCache.cpp
+
+ LOCAL_C_INCLUDES += \
+ $(JNI_H_INCLUDE) \
+ $(LOCAL_PATH)/../../include/utils \
+ external/skia/include/core \
+ external/skia/include/effects \
+ external/skia/include/images \
+ external/skia/src/ports \
+ external/skia/include/utils
-LOCAL_C_INCLUDES += \
- $(JNI_H_INCLUDE) \
- $(LOCAL_PATH)/../../include/utils \
- external/skia/include/core \
- external/skia/include/effects \
- external/skia/include/images \
- external/skia/src/ports \
- external/skia/include/utils
+ LOCAL_CFLAGS += -DUSE_OPENGL_RENDERER
+ LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+ LOCAL_SHARED_LIBRARIES := libcutils libutils libGLESv2 libskia
+ LOCAL_MODULE := libhwui
+ LOCAL_MODULE_TAGS := optional
+ LOCAL_PRELINK_MODULE := false
+
+ include $(BUILD_SHARED_LIBRARY)
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-LOCAL_SHARED_LIBRARIES := libcutils libutils libGLESv2 libskia
-LOCAL_MODULE := libhwui
-LOCAL_PRELINK_MODULE := false
-
-include $(BUILD_SHARED_LIBRARY)
+ include $(call all-makefiles-under,$(LOCAL_PATH))
+endif