1 # Copyright (C) 2010 Chia-I Wu <olvaffe@gmail.com>
2 # Copyright (C) 2010-2011 LunarG Inc.
4 # Permission is hereby granted, free of charge, to any person obtaining a
5 # copy of this software and associated documentation files (the "Software"),
6 # to deal in the Software without restriction, including without limitation
7 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 # and/or sell copies of the Software, and to permit persons to whom the
9 # Software is furnished to do so, subject to the following conditions:
11 # The above copyright notice and this permission notice shall be included
12 # in all copies or substantial portions of the Software.
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 # DEALINGS IN THE SOFTWARE.
22 # Android.mk for drm_gralloc
24 ifeq ($(strip $(BOARD_USES_DRM)),true)
26 LOCAL_PATH := $(call my-dir)
29 DRM_USES_INTEL := $(findstring true, \
35 DRM_USES_RADEON := $(findstring true, \
46 external/drm/include/drm
48 LOCAL_SHARED_LIBRARIES := \
53 # for glFlush/glFinish
54 LOCAL_SHARED_LIBRARIES += \
57 ifeq ($(strip $(DRM_USES_INTEL)),true)
58 LOCAL_SRC_FILES += gralloc_drm_intel.c
59 LOCAL_C_INCLUDES += external/drm/intel
60 LOCAL_CFLAGS += -DENABLE_INTEL
61 LOCAL_SHARED_LIBRARIES += libdrm_intel
62 endif # DRM_USES_INTEL
64 ifeq ($(strip $(DRM_USES_RADEON)),true)
65 LOCAL_SRC_FILES += gralloc_drm_radeon.c
66 LOCAL_C_INCLUDES += external/drm/radeon
67 LOCAL_CFLAGS += -DENABLE_RADEON
68 LOCAL_SHARED_LIBRARIES += libdrm_radeon
69 endif # DRM_USES_RADEON
71 LOCAL_MODULE := gralloc.$(TARGET_PRODUCT)
72 LOCAL_MODULE_TAGS := optional
73 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
75 include $(BUILD_SHARED_LIBRARY)
77 endif # BOARD_USES_DRM