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 -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
36 ifneq ($(filter $(intel_drivers), $(BOARD_GPU_DRIVERS)),)
37 MINIGBM_CPPFLAGS += -DDRV_I915
38 MINIGBM_CFLAGS += -DDRV_I915
39 LOCAL_SHARED_LIBRARIES += libdrm_intel
42 ifneq ($(filter meson, $(BOARD_GPU_DRIVERS)),)
43 MINIGBM_CPPFLAGS += -DDRV_MESON
44 MINIGBM_CFLAGS += -DDRV_MESON
50 SUBDIRS := cros_gralloc
52 LOCAL_SHARED_LIBRARIES := \
56 LOCAL_SRC_FILES := $(MINIGBM_SRC)
58 include $(MINIGBM_GRALLOC_MK)
60 LOCAL_CFLAGS := $(MINIGBM_CFLAGS)
61 LOCAL_CPPFLAGS := $(MINIGBM_CPPFLAGS)
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)
75 LOCAL_SHARED_LIBRARIES := libcutils
76 LOCAL_STATIC_LIBRARIES := libdrm
78 LOCAL_SRC_FILES += $(MINIGBM_SRC) gbm.c gbm_helpers.c
80 LOCAL_CFLAGS := $(MINIGBM_CFLAGS)
81 LOCAL_CPPFLAGS := $(MINIGBM_CPPFLAGS)
83 LOCAL_MODULE := libminigbm
84 LOCAL_MODULE_TAGS := optional
85 include $(BUILD_SHARED_LIBRARY)