summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Boie <andrew.p.boie@intel.com>2012-09-25 16:19:24 -0700
committerAndrew Boie <andrew.p.boie@intel.com>2012-09-25 16:19:24 -0700
commitd58b0dea2afeaa2cfefd6e89d9bffdf6ca8a3165 (patch)
tree579a38b2b03c6c04d91733be1c5a065bd5d0d525
parentb56dc927f1a8797b1b7fe356ae89ce18d42731dd (diff)
downloadexternal_drm_gralloc-d58b0dea2afeaa2cfefd6e89d9bffdf6ca8a3165.zip
external_drm_gralloc-d58b0dea2afeaa2cfefd6e89d9bffdf6ca8a3165.tar.gz
external_drm_gralloc-d58b0dea2afeaa2cfefd6e89d9bffdf6ca8a3165.tar.bz2
gralloc: Add support for prebuilt gralloc libs
If the user sets BOARD_GPU_DRIVERS to 'prebuilt' and passes a path to the prebuilt gralloc binary via BOARD_GPU_DRIVER_BINARY, then that prebuilt gralloc image will be used instead of building it from source here. Change-Id: I0fe3bc1919cacc38087afe3f76e4b8391975edbd Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
-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