blob: c4798adb1977d8843d16d2960a485dc70cd4a829 [file] [log] [blame]
Kalyan Kondapallybc7dc782017-02-04 12:10:50 -08001# Copyright 2017 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5ifeq ($(strip $(BOARD_USES_MINIGBM)), true)
6
7MINIGBM_GRALLOC_MK := $(call my-dir)/Android.gralloc.mk
8LOCAL_PATH := $(call my-dir)
9intel_drivers := i915 i965
10include $(CLEAR_VARS)
11
12SUBDIRS := cros_gralloc
13
14LOCAL_SHARED_LIBRARIES := \
15 libcutils \
16 libdrm
17
18LOCAL_SRC_FILES := \
19 amdgpu.c \
20 cirrus.c \
21 drv.c \
22 evdi.c \
23 exynos.c \
24 gma500.c \
25 helpers.c \
26 i915.c \
27 marvell.c \
28 mediatek.c \
29 nouveau.c \
30 rockchip.c \
31 tegra.c \
32 udl.c \
33 vc4.c \
34 vgem.c \
35 virtio_gpu.c
36
37include $(MINIGBM_GRALLOC_MK)
38
Gurchetan Singhd6b8b032017-05-31 14:31:31 -070039LOCAL_CPPFLAGS += -std=c++14 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
Kalyan Kondapallybc7dc782017-02-04 12:10:50 -080040LOCAL_CFLAGS += -Wall -Wsign-compare -Wpointer-arith \
41 -Wcast-qual -Wcast-align \
42 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
43
44ifneq ($(filter $(intel_drivers), $(BOARD_GPU_DRIVERS)),)
45LOCAL_CPPFLAGS += -DDRV_I915
46LOCAL_CFLAGS += -DDRV_I915
47LOCAL_SHARED_LIBRARIES += libdrm_intel
48endif
49
50LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
51LOCAL_MODULE_TAGS := optional
52# The preferred path for vendor HALs is /vendor/lib/hw
53LOCAL_PROPRIETARY_MODULE := true
54LOCAL_MODULE_RELATIVE_PATH := hw
55LOCAL_MODULE_CLASS := SHARED_LIBRARIES
56LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
57include $(BUILD_SHARED_LIBRARY)
58
59#endif