OSDN Git Service

cros_gralloc: Add new perform op for getting buffer info
[android-x86/external-minigbm.git] / Android.mk
1 # Use of this source code is governed by a BSD-style license that can be
2 # found in the LICENSE file.
3
4 ifeq ($(strip $(BOARD_USES_MINIGBM)), true)
5
6 MINIGBM_GRALLOC_MK := $(call my-dir)/Android.gralloc.mk
7 LOCAL_PATH := $(call my-dir)
8 intel_drivers := i915 i965
9
10 MINIGBM_SRC := \
11         amdgpu.c \
12         dri.c \
13         drv.c \
14         evdi.c \
15         exynos.c \
16         helpers_array.c \
17         helpers.c \
18         i915.c \
19         marvell.c \
20         mediatek.c \
21         meson.c \
22         msm.c \
23         nouveau.c \
24         radeon.c \
25         rockchip.c \
26         synaptics.c \
27         tegra.c \
28         udl.c \
29         vc4.c \
30         vgem.c \
31         virtio_gpu.c
32
33 MINIGBM_CPPFLAGS := -std=c++14
34 MINIGBM_CFLAGS := \
35         -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
36         -Wall -Wsign-compare -Wpointer-arith \
37         -Wcast-qual -Wcast-align \
38         -Wno-unused-parameter
39
40 ifneq ($(filter $(intel_drivers), $(BOARD_GPU_DRIVERS)),)
41 MINIGBM_CPPFLAGS += -DDRV_I915
42 MINIGBM_CFLAGS += -DDRV_I915
43 LOCAL_SHARED_LIBRARIES += libdrm_intel
44 endif
45
46 ifneq ($(filter meson, $(BOARD_GPU_DRIVERS)),)
47 MINIGBM_CPPFLAGS += -DDRV_MESON
48 MINIGBM_CFLAGS += -DDRV_MESON
49 endif
50
51 include $(CLEAR_VARS)
52
53 SUBDIRS := cros_gralloc
54
55 LOCAL_SHARED_LIBRARIES := \
56         libcutils \
57         libdrm
58
59 LOCAL_SRC_FILES := $(MINIGBM_SRC)
60
61 include $(MINIGBM_GRALLOC_MK)
62
63 LOCAL_CFLAGS := $(MINIGBM_CFLAGS)
64 LOCAL_CPPFLAGS := $(MINIGBM_CPPFLAGS)
65
66 LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
67 LOCAL_MODULE_TAGS := optional
68 # The preferred path for vendor HALs is /vendor/lib/hw
69 LOCAL_PROPRIETARY_MODULE := true
70 LOCAL_MODULE_RELATIVE_PATH := hw
71 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
72 LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
73 LOCAL_HEADER_LIBRARIES += \
74         libhardware_headers libnativebase_headers libsystem_headers
75 LOCAL_SHARED_LIBRARIES += libnativewindow libsync liblog
76 LOCAL_STATIC_LIBRARIES += libarect
77 include $(BUILD_SHARED_LIBRARY)
78
79
80 include $(CLEAR_VARS)
81 LOCAL_SHARED_LIBRARIES := libcutils
82 LOCAL_STATIC_LIBRARIES := libdrm
83
84 LOCAL_SRC_FILES += $(MINIGBM_SRC) gbm.c gbm_helpers.c
85
86 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
87 LOCAL_CFLAGS := $(MINIGBM_CFLAGS)
88 LOCAL_CPPFLAGS := $(MINIGBM_CPPFLAGS)
89
90 LOCAL_MODULE := libminigbm
91 LOCAL_MODULE_TAGS := optional
92 include $(BUILD_SHARED_LIBRARY)
93
94 endif