OSDN Git Service

i915: Allow allocating ARGB buffers for scanout
[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         drv.c \
13         evdi.c \
14         exynos.c \
15         helpers_array.c \
16         helpers.c \
17         i915.c \
18         marvell.c \
19         mediatek.c \
20         meson.c \
21         msm.c \
22         nouveau.c \
23         radeon.c \
24         rockchip.c \
25         tegra.c \
26         udl.c \
27         vc4.c \
28         vgem.c \
29         virtio_gpu.c
30
31 MINIGBM_CPPFLAGS := -std=c++14 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
32 MINIGBM_CFLAGS := -Wall -Wsign-compare -Wpointer-arith \
33                 -Wcast-qual -Wcast-align \
34                 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
35
36 ifneq ($(filter $(intel_drivers), $(BOARD_GPU_DRIVERS)),)
37 MINIGBM_CPPFLAGS += -DDRV_I915
38 MINIGBM_CFLAGS += -DDRV_I915
39 LOCAL_SHARED_LIBRARIES += libdrm_intel
40 endif
41
42 ifneq ($(filter meson, $(BOARD_GPU_DRIVERS)),)
43 MINIGBM_CPPFLAGS += -DDRV_MESON
44 MINIGBM_CFLAGS += -DDRV_MESON
45 endif
46
47
48 include $(CLEAR_VARS)
49
50 SUBDIRS := cros_gralloc
51
52 LOCAL_SHARED_LIBRARIES := \
53         libcutils \
54         libdrm
55
56 LOCAL_SRC_FILES := $(MINIGBM_SRC)
57
58 include $(MINIGBM_GRALLOC_MK)
59
60 LOCAL_CFLAGS := $(MINIGBM_CFLAGS)
61 LOCAL_CPPFLAGS := $(MINIGBM_CPPFLAGS)
62
63 LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
64 LOCAL_MODULE_TAGS := optional
65 # The preferred path for vendor HALs is /vendor/lib/hw
66 LOCAL_PROPRIETARY_MODULE := true
67 LOCAL_MODULE_RELATIVE_PATH := hw
68 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
69 LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
70 LOCAL_SHARED_LIBRARIES += libnativewindow libsync liblog
71 include $(BUILD_SHARED_LIBRARY)
72
73
74 include $(CLEAR_VARS)
75 LOCAL_SHARED_LIBRARIES := libcutils
76 LOCAL_STATIC_LIBRARIES := libdrm
77
78 LOCAL_SRC_FILES += $(MINIGBM_SRC) gbm.c gbm_helpers.c
79
80 LOCAL_CFLAGS := $(MINIGBM_CFLAGS)
81 LOCAL_CPPFLAGS := $(MINIGBM_CPPFLAGS)
82
83 LOCAL_MODULE := libminigbm
84 LOCAL_MODULE_TAGS := optional
85 include $(BUILD_SHARED_LIBRARY)
86
87 endif