summaryrefslogtreecommitdiffstats
path: root/Android.mk
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2011-06-12 16:21:30 +0800
committerChia-I Wu <olvaffe@gmail.com>2011-06-12 16:21:30 +0800
commit2ec32d4f949f04d0006fff50065c904626c2e581 (patch)
tree7971ee3431e97f7fe7c0bc6ae17948866e10de1e /Android.mk
downloadexternal_drm_gralloc-2ec32d4f949f04d0006fff50065c904626c2e581.zip
external_drm_gralloc-2ec32d4f949f04d0006fff50065c904626c2e581.tar.gz
external_drm_gralloc-2ec32d4f949f04d0006fff50065c904626c2e581.tar.bz2
initial commit
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk77
1 files changed, 77 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..8aec666
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,77 @@
+# Copyright (C) 2010 Chia-I Wu <olvaffe@gmail.com>
+# Copyright (C) 2010-2011 LunarG Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+# Android.mk for drm_gralloc
+
+ifeq ($(strip $(BOARD_USES_DRM)),true)
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+DRM_USES_INTEL := $(findstring true, \
+ $(BOARD_USES_I915C) \
+ $(BOARD_USES_I965C) \
+ $(BOARD_USES_I915G) \
+ $(BOARD_USES_I965G))
+
+DRM_USES_RADEON := $(findstring true, \
+ $(BOARD_USES_R300G) \
+ $(BOARD_USES_R600G))
+
+LOCAL_SRC_FILES := \
+ gralloc.c \
+ gralloc_drm.c \
+ gralloc_drm_kms.c
+
+LOCAL_C_INCLUDES := \
+ external/drm \
+ external/drm/include/drm
+
+LOCAL_SHARED_LIBRARIES := \
+ libdrm \
+ liblog \
+ libcutils \
+
+# for glFlush/glFinish
+LOCAL_SHARED_LIBRARIES += \
+ libGLESv1_CM
+
+ifeq ($(strip $(DRM_USES_INTEL)),true)
+LOCAL_SRC_FILES += gralloc_drm_intel.c
+LOCAL_C_INCLUDES += external/drm/intel
+LOCAL_CFLAGS += -DENABLE_INTEL
+LOCAL_SHARED_LIBRARIES += libdrm_intel
+endif # DRM_USES_INTEL
+
+ifeq ($(strip $(DRM_USES_RADEON)),true)
+LOCAL_SRC_FILES += gralloc_drm_radeon.c
+LOCAL_C_INCLUDES += external/drm/radeon
+LOCAL_CFLAGS += -DENABLE_RADEON
+LOCAL_SHARED_LIBRARIES += libdrm_radeon
+endif # DRM_USES_RADEON
+
+LOCAL_MODULE := gralloc.$(TARGET_PRODUCT)
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
+
+include $(BUILD_SHARED_LIBRARY)
+
+endif # BOARD_USES_DRM