OSDN Git Service

6955627fc18b40bed4b690c6ab99d3b4b8f92140
[android-x86/external-minigbm.git] / Android.mk
1 # 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
5 ifeq ($(strip $(BOARD_USES_MINIGBM)), true)
6
7 MINIGBM_GRALLOC_MK := $(call my-dir)/Android.gralloc.mk
8 LOCAL_PATH := $(call my-dir)
9 intel_drivers := i915 i965
10 include $(CLEAR_VARS)
11
12 SUBDIRS := cros_gralloc
13
14 LOCAL_SHARED_LIBRARIES := \
15         libcutils \
16         liblog \
17         libdrm \
18         libsync
19
20 LOCAL_SRC_FILES := \
21         amdgpu.c \
22         cirrus.c \
23         drv.c \
24         evdi.c \
25         exynos.c \
26         gma500.c \
27         helpers.c \
28         i915.c \
29         marvell.c \
30         mediatek.c \
31         nouveau.c \
32         rockchip.c \
33         tegra.c \
34         udl.c \
35         vc4.c \
36         vgem.c \
37         virtio_gpu.c
38
39 include $(MINIGBM_GRALLOC_MK)
40
41 LOCAL_CPPFLAGS += -std=c++14 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
42 LOCAL_CFLAGS += -Wall -Wsign-compare -Wpointer-arith \
43                 -Wcast-qual -Wcast-align \
44                 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
45
46 ifneq ($(filter $(intel_drivers), $(BOARD_GPU_DRIVERS)),)
47 LOCAL_CPPFLAGS += -DDRV_I915
48 LOCAL_CFLAGS += -DDRV_I915
49 LOCAL_SHARED_LIBRARIES += libdrm_intel
50 endif
51
52 LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
53 LOCAL_MODULE_TAGS := optional
54 # The preferred path for vendor HALs is /vendor/lib/hw
55 LOCAL_PROPRIETARY_MODULE := true
56 LOCAL_MODULE_RELATIVE_PATH := hw
57 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
58 LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
59 include $(BUILD_SHARED_LIBRARY)
60
61 endif