Kalyan Kondapally | bc7dc78 | 2017-02-04 12:10:50 -0800 | [diff] [blame] | 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 |
Kalyan Kondapally | bc7dc78 | 2017-02-04 12:10:50 -0800 | [diff] [blame] | 9 | |
Albert Chaulk | d8c0455 | 2018-04-05 16:56:53 -0400 | [diff] [blame] | 10 | MINIGBM_SRC := \ |
Kalyan Kondapally | bc7dc78 | 2017-02-04 12:10:50 -0800 | [diff] [blame] | 11 | amdgpu.c \ |
Ludovico de Nittis | 490ba38 | 2019-05-28 16:03:34 +0200 | [diff] [blame] | 12 | dri.c \ |
Kalyan Kondapally | bc7dc78 | 2017-02-04 12:10:50 -0800 | [diff] [blame] | 13 | drv.c \ |
| 14 | evdi.c \ |
| 15 | exynos.c \ |
Alistair Strachan | 5932c4c | 2018-03-19 14:06:39 -0700 | [diff] [blame] | 16 | helpers_array.c \ |
Kalyan Kondapally | bc7dc78 | 2017-02-04 12:10:50 -0800 | [diff] [blame] | 17 | helpers.c \ |
| 18 | i915.c \ |
| 19 | marvell.c \ |
| 20 | mediatek.c \ |
Sergey Volk | 6eca368 | 2018-03-06 13:29:32 -0800 | [diff] [blame] | 21 | meson.c \ |
Rajesh Yadav | 7f79cb5 | 2018-01-22 18:29:06 +0530 | [diff] [blame] | 22 | msm.c \ |
Kalyan Kondapally | bc7dc78 | 2017-02-04 12:10:50 -0800 | [diff] [blame] | 23 | nouveau.c \ |
Alistair Strachan | 5932c4c | 2018-03-19 14:06:39 -0700 | [diff] [blame] | 24 | radeon.c \ |
Kalyan Kondapally | bc7dc78 | 2017-02-04 12:10:50 -0800 | [diff] [blame] | 25 | rockchip.c \ |
| 26 | tegra.c \ |
| 27 | udl.c \ |
| 28 | vc4.c \ |
Lepton Wu | 249e863 | 2018-04-05 12:50:03 -0700 | [diff] [blame] | 29 | virtio_gpu.c |
Kalyan Kondapally | bc7dc78 | 2017-02-04 12:10:50 -0800 | [diff] [blame] | 30 | |
Alistair Strachan | 65141c2 | 2018-04-09 18:50:30 -0700 | [diff] [blame] | 31 | MINIGBM_CPPFLAGS := -std=c++14 |
| 32 | MINIGBM_CFLAGS := \ |
| 33 | -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \ |
| 34 | -Wall -Wsign-compare -Wpointer-arith \ |
| 35 | -Wcast-qual -Wcast-align \ |
| 36 | -Wno-unused-parameter |
Kalyan Kondapally | bc7dc78 | 2017-02-04 12:10:50 -0800 | [diff] [blame] | 37 | |
| 38 | ifneq ($(filter $(intel_drivers), $(BOARD_GPU_DRIVERS)),) |
Albert Chaulk | d8c0455 | 2018-04-05 16:56:53 -0400 | [diff] [blame] | 39 | MINIGBM_CPPFLAGS += -DDRV_I915 |
| 40 | MINIGBM_CFLAGS += -DDRV_I915 |
Kalyan Kondapally | bc7dc78 | 2017-02-04 12:10:50 -0800 | [diff] [blame] | 41 | LOCAL_SHARED_LIBRARIES += libdrm_intel |
| 42 | endif |
| 43 | |
Albert Chaulk | d8c0455 | 2018-04-05 16:56:53 -0400 | [diff] [blame] | 44 | ifneq ($(filter meson, $(BOARD_GPU_DRIVERS)),) |
| 45 | MINIGBM_CPPFLAGS += -DDRV_MESON |
| 46 | MINIGBM_CFLAGS += -DDRV_MESON |
| 47 | endif |
| 48 | |
Albert Chaulk | d8c0455 | 2018-04-05 16:56:53 -0400 | [diff] [blame] | 49 | include $(CLEAR_VARS) |
| 50 | |
| 51 | SUBDIRS := cros_gralloc |
| 52 | |
| 53 | LOCAL_SHARED_LIBRARIES := \ |
| 54 | libcutils \ |
| 55 | libdrm |
| 56 | |
| 57 | LOCAL_SRC_FILES := $(MINIGBM_SRC) |
| 58 | |
| 59 | include $(MINIGBM_GRALLOC_MK) |
| 60 | |
| 61 | LOCAL_CFLAGS := $(MINIGBM_CFLAGS) |
| 62 | LOCAL_CPPFLAGS := $(MINIGBM_CPPFLAGS) |
| 63 | |
Kalyan Kondapally | bc7dc78 | 2017-02-04 12:10:50 -0800 | [diff] [blame] | 64 | LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM) |
| 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) |
Alistair Strachan | 65141c2 | 2018-04-09 18:50:30 -0700 | [diff] [blame] | 71 | LOCAL_HEADER_LIBRARIES += \ |
| 72 | libhardware_headers libnativebase_headers libsystem_headers |
Alistair Strachan | 5932c4c | 2018-03-19 14:06:39 -0700 | [diff] [blame] | 73 | LOCAL_SHARED_LIBRARIES += libnativewindow libsync liblog |
Alistair Strachan | 65141c2 | 2018-04-09 18:50:30 -0700 | [diff] [blame] | 74 | LOCAL_STATIC_LIBRARIES += libarect |
Kalyan Kondapally | bc7dc78 | 2017-02-04 12:10:50 -0800 | [diff] [blame] | 75 | include $(BUILD_SHARED_LIBRARY) |
| 76 | |
Albert Chaulk | d8c0455 | 2018-04-05 16:56:53 -0400 | [diff] [blame] | 77 | |
| 78 | include $(CLEAR_VARS) |
| 79 | LOCAL_SHARED_LIBRARIES := libcutils |
| 80 | LOCAL_STATIC_LIBRARIES := libdrm |
| 81 | |
| 82 | LOCAL_SRC_FILES += $(MINIGBM_SRC) gbm.c gbm_helpers.c |
| 83 | |
Daniel Nicoara | f4e12f5 | 2018-05-10 17:58:03 -0400 | [diff] [blame] | 84 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
Albert Chaulk | d8c0455 | 2018-04-05 16:56:53 -0400 | [diff] [blame] | 85 | LOCAL_CFLAGS := $(MINIGBM_CFLAGS) |
| 86 | LOCAL_CPPFLAGS := $(MINIGBM_CPPFLAGS) |
| 87 | |
| 88 | LOCAL_MODULE := libminigbm |
| 89 | LOCAL_MODULE_TAGS := optional |
| 90 | include $(BUILD_SHARED_LIBRARY) |
| 91 | |
Alistair Strachan | 5932c4c | 2018-03-19 14:06:39 -0700 | [diff] [blame] | 92 | endif |