summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk16
1 files changed, 14 insertions, 2 deletions
diff --git a/Android.mk b/Android.mk
index 571ec1c..2a61b01 100644
--- a/Android.mk
+++ b/Android.mk
@@ -29,6 +29,7 @@ nouveau_drivers := nouveau
vmwgfx_drivers := vmwgfx
valid_drivers := \
+ prebuilt \
$(intel_drivers) \
$(radeon_drivers) \
$(nouveau_drivers) \
@@ -53,6 +54,18 @@ ifneq ($(strip $(DRM_GPU_DRIVERS)),)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_MODULE := gralloc.$(TARGET_PRODUCT)
+LOCAL_MODULE_TAGS := optional
+
+ifeq ($(strip $(DRM_GPU_DRIVERS)),prebuilt)
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw/
+LOCAL_SRC_FILES := ../../$(BOARD_GPU_DRIVER_BINARY)
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
+include $(BUILD_PREBUILT)
+
+else
LOCAL_SRC_FILES := \
gralloc.c \
@@ -122,10 +135,9 @@ LOCAL_STATIC_LIBRARIES += \
LOCAL_SHARED_LIBRARIES += libdl
endif # DRM_USES_PIPE
-LOCAL_MODULE := gralloc.$(TARGET_PRODUCT)
-LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
include $(BUILD_SHARED_LIBRARY)
+endif # DRM_GPU_DRIVERS=prebuilt
endif # DRM_GPU_DRIVERS