summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Marius Negreanu <adrian.m.negreanu@intel.com>2012-11-14 11:29:48 +0200
committerAdrian Marius Negreanu <adrian.m.negreanu@intel.com>2012-11-14 11:33:36 +0200
commit05280dd7af5188e8187fbdcc6bbf5c451d17098d (patch)
treed20665e847a05566a25df204d0e10db0341bb8d1
parentb89d7caffeea06e568e9df7da6c6c39ec63b9a1d (diff)
downloadexternal_drm_gralloc-05280dd7af5188e8187fbdcc6bbf5c451d17098d.zip
external_drm_gralloc-05280dd7af5188e8187fbdcc6bbf5c451d17098d.tar.gz
external_drm_gralloc-05280dd7af5188e8187fbdcc6bbf5c451d17098d.tar.bz2
split gralloc.$(TARGET_PRODUCT)
Some of the functions in gralloc.$(TARGET_PRODUCT) can be reused. Since one should not link against a HAL library, have gralloc.c as gralloc.$(TARGET_PRODUCT) and extract the reusable code into libgralloc_drm. Change-Id: I08a6989bb0b191ec56662aa4a21f6da7aea6b24d Signed-off-by: Adrian Marius Negreanu <adrian.m.negreanu@intel.com>
-rw-r--r--Android.mk42
1 files changed, 33 insertions, 9 deletions
diff --git a/Android.mk b/Android.mk
index e675a00..1b598aa 100644
--- a/Android.mk
+++ b/Android.mk
@@ -53,22 +53,35 @@ ifneq ($(strip $(DRM_GPU_DRIVERS)),)
LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-LOCAL_MODULE := gralloc.$(TARGET_PRODUCT)
-LOCAL_MODULE_TAGS := optional
+# Use the PREBUILT libraries
ifeq ($(strip $(DRM_GPU_DRIVERS)),prebuilt)
+include $(CLEAR_VARS)
+LOCAL_MODULE := libgralloc_drm
+LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := ../../$(BOARD_GPU_DRIVER_BINARY)
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := gralloc.$(TARGET_PRODUCT)
+LOCAL_MODULE_TAGS := optional
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)
+# Use the sources
else
+include $(CLEAR_VARS)
+LOCAL_MODULE := libgralloc_drm
+LOCAL_MODULE_TAGS := optional
+
LOCAL_SRC_FILES := \
- gralloc.c \
gralloc_drm.c \
gralloc_drm_kms.c
@@ -82,10 +95,6 @@ LOCAL_SHARED_LIBRARIES := \
libcutils \
libhardware_legacy \
-# for glFlush/glFinish
-LOCAL_SHARED_LIBRARIES += \
- libGLESv1_CM
-
ifneq ($(filter $(intel_drivers), $(DRM_GPU_DRIVERS)),)
LOCAL_SRC_FILES += gralloc_drm_intel.c
LOCAL_C_INCLUDES += external/drm/intel
@@ -135,9 +144,24 @@ LOCAL_STATIC_LIBRARIES += \
libmesa_gallium
LOCAL_SHARED_LIBRARIES += libdl
endif # DRM_USES_PIPE
+include $(BUILD_SHARED_LIBRARY)
+
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := \
+ gralloc.c \
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
+LOCAL_SHARED_LIBRARIES := \
+ libgralloc_drm \
+ liblog \
+# for glFlush/glFinish
+LOCAL_SHARED_LIBRARIES += \
+ libGLESv1_CM
+
+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