OSDN Git Service

minigbm: stop faking the protected buffers
[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         virtio_gpu.c
31
32 MINIGBM_CPPFLAGS := -std=c++14
33 MINIGBM_CFLAGS := \
34         -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
35         -Wall -Wsign-compare -Wpointer-arith \
36         -Wcast-qual -Wcast-align \
37         -Wno-unused-parameter
38
39 ifneq ($(filter $(intel_drivers), $(BOARD_GPU_DRIVERS)),)
40 MINIGBM_CPPFLAGS += -DDRV_I915
41 MINIGBM_CFLAGS += -DDRV_I915
42 LOCAL_SHARED_LIBRARIES += libdrm_intel
43 endif
44
45 ifneq ($(filter meson, $(BOARD_GPU_DRIVERS)),)
46 MINIGBM_CPPFLAGS += -DDRV_MESON
47 MINIGBM_CFLAGS += -DDRV_MESON
48 endif
49
50 include $(CLEAR_VARS)
51
52 SUBDIRS := cros_gralloc
53
54 LOCAL_SHARED_LIBRARIES := \
55         libcutils \
56         libdrm
57
58 LOCAL_SRC_FILES := $(MINIGBM_SRC)
59
60 include $(MINIGBM_GRALLOC_MK)
61
62 LOCAL_CFLAGS := $(MINIGBM_CFLAGS)
63 LOCAL_CPPFLAGS := $(MINIGBM_CPPFLAGS)
64
65 LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
66 LOCAL_MODULE_TAGS := optional
67 # The preferred path for vendor HALs is /vendor/lib/hw
68 LOCAL_PROPRIETARY_MODULE := true
69 LOCAL_MODULE_RELATIVE_PATH := hw
70 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
71 LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
72 LOCAL_HEADER_LIBRARIES += \
73         libhardware_headers libnativebase_headers libsystem_headers
74 LOCAL_SHARED_LIBRARIES += libnativewindow libsync liblog
75 LOCAL_STATIC_LIBRARIES += libarect
76 include $(BUILD_SHARED_LIBRARY)
77
78
79 include $(CLEAR_VARS)
80 LOCAL_SHARED_LIBRARIES := libcutils
81 LOCAL_STATIC_LIBRARIES := libdrm
82
83 LOCAL_SRC_FILES += $(MINIGBM_SRC) gbm.c gbm_helpers.c
84
85 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
86 LOCAL_CFLAGS := $(MINIGBM_CFLAGS)
87 LOCAL_CPPFLAGS := $(MINIGBM_CPPFLAGS)
88
89 LOCAL_MODULE := libminigbm
90 LOCAL_MODULE_TAGS := optional
91 include $(BUILD_SHARED_LIBRARY)
92
93 endif