OSDN Git Service

Merge Android R
[android-x86/external-minigbm.git] / Android.bp
1 // Use of this source code is governed by a BSD-style license that can be
2 // found in the LICENSE file.
3
4 cc_defaults {
5     name: "minigbm_defaults",
6
7     srcs: [
8         "amdgpu.c",
9         "drv.c",
10         "evdi.c",
11         "exynos.c",
12         "helpers_array.c",
13         "helpers.c",
14         "i915.c",
15         "marvell.c",
16         "mediatek.c",
17         "meson.c",
18         "msm.c",
19         "nouveau.c",
20         "radeon.c",
21         "rockchip.c",
22         "tegra.c",
23         "udl.c",
24         "vc4.c",
25         "vgem.c",
26         "virtio_gpu.c",
27     ],
28
29     cflags: [
30         "-D_GNU_SOURCE=1",
31         "-D_FILE_OFFSET_BITS=64",
32         "-Wall",
33         "-Wsign-compare",
34         "-Wpointer-arith",
35         "-Wcast-qual",
36         "-Wcast-align",
37         "-Wno-unused-parameter",
38     ],
39
40     cppflags: ["-std=c++14"],
41 }
42
43 cc_defaults {
44     name: "minigbm_cros_gralloc_defaults",
45
46     defaults: ["minigbm_defaults"],
47
48     header_libs: [
49         "libhardware_headers",
50         "libnativebase_headers",
51         "libnativewindow_headers",
52         "libsystem_headers",
53     ],
54
55     export_header_lib_headers: [
56         "libhardware_headers",
57         "libnativebase_headers",
58         "libnativewindow_headers",
59         "libsystem_headers",
60     ],
61
62     srcs: [
63         "cros_gralloc/cros_gralloc_buffer.cc",
64         "cros_gralloc/cros_gralloc_helpers.cc",
65         "cros_gralloc/cros_gralloc_driver.cc",
66     ],
67
68     static_libs: ["libarect"],
69
70     export_static_lib_headers: ["libarect"],
71
72     vendor: true,
73
74     shared_libs: [
75         "libcutils",
76         "libdrm",
77         "libnativewindow",
78         "libsync",
79         "liblog",
80     ],
81 }
82
83 cc_defaults {
84     name: "gbm_defaults",
85
86     defaults: ["minigbm_defaults"],
87
88     srcs: [
89         "gbm.c",
90         "gbm_helpers.c",
91     ],
92
93     export_include_dirs: ["."],
94 }
95
96 cc_library {
97     name: "libgbm",
98     defaults: ["gbm_defaults"],
99     host_supported: true,
100
101     target: {
102         host: {
103             // Avoid linking to another host copy of libdrm; this library will cause
104             // binary GPU drivers to be loaded from the host, which might be linked
105             // to a system copy of libdrm, which conflicts with the AOSP one
106             allow_undefined_symbols: true,
107             header_libs: ["libdrm"],
108         },
109         android: {
110             shared_libs: [
111                 "libdrm",
112                 "liblog"
113             ],
114         },
115     },
116 }
117
118 cc_library_static {
119     name: "libminigbm_cros_gralloc",
120     defaults: ["minigbm_cros_gralloc_defaults"],
121     shared_libs: ["liblog"],
122     static_libs: ["libdrm"],
123
124     export_include_dirs: ["."],
125 }
126
127 cc_library_shared {
128     name: "gralloc.minigbm",
129     defaults: ["minigbm_cros_gralloc_defaults"],
130     srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
131 }
132
133 cc_library_shared {
134     name: "gralloc.minigbm_intel",
135     defaults: ["minigbm_cros_gralloc_defaults"],
136     enabled: false,
137     arch: {
138         x86: {
139             enabled: true,
140         },
141         x86_64: {
142             enabled: true,
143         },
144     },
145     cflags: ["-DDRV_I915"],
146     srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
147 }
148
149 cc_library_shared {
150     name: "gralloc.minigbm_meson",
151     defaults: ["minigbm_cros_gralloc_defaults"],
152     cflags: ["-DDRV_MESON"],
153     srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
154 }