1 # Use of this source code is governed by a BSD-style license that can be
2 # found in the LICENSE file.
4 ifeq ($(strip $(BOARD_USES_MINIGBM)), true)
6 MINIGBM_GRALLOC_MK := $(call my-dir)/Android.gralloc.mk
7 LOCAL_PATH := $(call my-dir)
8 intel_drivers := i915 i965
31 MINIGBM_CPPFLAGS := -std=c++14
33 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
34 -Wall -Wsign-compare -Wpointer-arith \
35 -Wcast-qual -Wcast-align \
38 ifneq ($(filter $(intel_drivers), $(BOARD_GPU_DRIVERS)),)
39 MINIGBM_CPPFLAGS += -DDRV_I915
40 MINIGBM_CFLAGS += -DDRV_I915
41 LOCAL_SHARED_LIBRARIES += libdrm_intel
44 ifneq ($(filter meson, $(BOARD_GPU_DRIVERS)),)
45 MINIGBM_CPPFLAGS += -DDRV_MESON
46 MINIGBM_CFLAGS += -DDRV_MESON
51 SUBDIRS := cros_gralloc
53 LOCAL_SHARED_LIBRARIES := \
57 LOCAL_SRC_FILES := $(MINIGBM_SRC)
59 include $(MINIGBM_GRALLOC_MK)
61 LOCAL_CFLAGS := $(MINIGBM_CFLAGS)
62 LOCAL_CPPFLAGS := $(MINIGBM_CPPFLAGS)
64 LOCAL_MODULE := gralloc.minigbm
65 LOCAL_MODULE_TAGS := optional
66 # The preferred path for vendor HALs is /vendor/lib/hw
67 LOCAL_PROPRIETARY_MODULE := true
68 LOCAL_MODULE_RELATIVE_PATH := hw
69 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
70 LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
71 LOCAL_HEADER_LIBRARIES += \
72 libhardware_headers libnativebase_headers libsystem_headers
73 LOCAL_SHARED_LIBRARIES += libnativewindow libsync liblog
74 LOCAL_STATIC_LIBRARIES += libarect
75 include $(BUILD_SHARED_LIBRARY)
79 LOCAL_SHARED_LIBRARIES := liblog
80 LOCAL_STATIC_LIBRARIES := libdrm
82 LOCAL_SRC_FILES += $(MINIGBM_SRC) gbm.c gbm_helpers.c
84 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
85 LOCAL_CFLAGS := $(MINIGBM_CFLAGS)
86 LOCAL_CPPFLAGS := $(MINIGBM_CPPFLAGS)
88 LOCAL_MODULE := libminigbm
89 LOCAL_MODULE_TAGS := optional
90 include $(BUILD_SHARED_LIBRARY)