OSDN Git Service

initial commit
[android-x86/external-drm_gralloc.git] / Android.mk
1 # Copyright (C) 2010 Chia-I Wu <olvaffe@gmail.com>
2 # Copyright (C) 2010-2011 LunarG Inc.
3
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:
10
11 # The above copyright notice and this permission notice shall be included
12 # in all copies or substantial portions of the Software.
13
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.
21
22 # Android.mk for drm_gralloc
23
24 ifeq ($(strip $(BOARD_USES_DRM)),true)
25
26 LOCAL_PATH := $(call my-dir)
27 include $(CLEAR_VARS)
28
29 DRM_USES_INTEL := $(findstring true, \
30         $(BOARD_USES_I915C) \
31         $(BOARD_USES_I965C) \
32         $(BOARD_USES_I915G) \
33         $(BOARD_USES_I965G))
34
35 DRM_USES_RADEON := $(findstring true, \
36         $(BOARD_USES_R300G) \
37         $(BOARD_USES_R600G))
38
39 LOCAL_SRC_FILES := \
40         gralloc.c \
41         gralloc_drm.c \
42         gralloc_drm_kms.c
43
44 LOCAL_C_INCLUDES := \
45         external/drm \
46         external/drm/include/drm
47
48 LOCAL_SHARED_LIBRARIES := \
49         libdrm \
50         liblog \
51         libcutils \
52
53 # for glFlush/glFinish
54 LOCAL_SHARED_LIBRARIES += \
55         libGLESv1_CM
56
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
63
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
70
71 LOCAL_MODULE := gralloc.$(TARGET_PRODUCT)
72 LOCAL_MODULE_TAGS := optional
73 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
74
75 include $(BUILD_SHARED_LIBRARY)
76
77 endif # BOARD_USES_DRM