OSDN Git Service

minigbm: Add dri_generic driver to Android.bp
[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         "dri.c",
10         "dri_generic_driver.c",
11         "drv.c",
12         "dumb_driver.c",
13         "exynos.c",
14         "helpers_array.c",
15         "helpers.c",
16         "i915.c",
17         "mediatek.c",
18         "msm.c",
19         "rockchip.c",
20         "tegra.c",
21         "vc4.c",
22         "virtio_gpu.c",
23     ],
24
25     include_dirs: ["external/mesa3d/include"],
26
27     cflags: [
28         "-DDRI_GENERIC_DRV",
29         "-D_GNU_SOURCE=1",
30         "-D_FILE_OFFSET_BITS=64",
31         "-Wall",
32         "-Wsign-compare",
33         "-Wpointer-arith",
34         "-Wcast-qual",
35         "-Wcast-align",
36         "-Wno-unused-parameter",
37     ],
38
39     cppflags: ["-std=c++14"],
40
41     multilib: {
42         lib32: {
43             cflags: ["-DDRI_DRIVER_DIR=/vendor/lib/dri"],
44         },
45         lib64: {
46             cflags: ["-DDRI_DRIVER_DIR=/vendor/lib64/dri"],
47         },
48     },
49 }
50
51 cc_defaults {
52     name: "minigbm_cros_gralloc_defaults",
53
54     defaults: ["minigbm_defaults"],
55
56     header_libs: [
57         "libhardware_headers",
58         "libnativebase_headers",
59         "libnativewindow_headers",
60         "libsystem_headers",
61     ],
62
63     export_header_lib_headers: [
64         "libhardware_headers",
65         "libnativebase_headers",
66         "libnativewindow_headers",
67         "libsystem_headers",
68     ],
69
70     srcs: [
71         "cros_gralloc/cros_gralloc_buffer.cc",
72         "cros_gralloc/cros_gralloc_helpers.cc",
73         "cros_gralloc/cros_gralloc_driver.cc",
74     ],
75
76     static_libs: ["libarect"],
77
78     whole_static_libs: ["libmesa_loader"],
79
80     export_static_lib_headers: ["libarect"],
81
82     vendor: true,
83
84     shared_libs: [
85         "libcutils",
86         "libdrm",
87         "libnativewindow",
88         "libsync",
89         "liblog",
90     ],
91 }
92
93 cc_defaults {
94     name: "gbm_defaults",
95
96     defaults: ["minigbm_defaults"],
97
98     srcs: [
99         "gbm.c",
100         "gbm_helpers.c",
101     ],
102
103     export_include_dirs: ["."],
104 }
105
106 cc_library_static {
107     name: "libminigbm_cros_gralloc",
108     defaults: ["minigbm_cros_gralloc_defaults"],
109     shared_libs: ["liblog"],
110     static_libs: ["libdrm"],
111
112     export_include_dirs: ["."],
113 }
114
115 cc_library_shared {
116     name: "gralloc.minigbm",
117     defaults: ["minigbm_cros_gralloc_defaults"],
118     srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
119     relative_install_path: "hw",
120 }
121
122 cc_library_shared {
123     name: "gralloc.minigbm_intel",
124     defaults: ["minigbm_cros_gralloc_defaults"],
125     enabled: false,
126     arch: {
127         x86: {
128             enabled: true,
129         },
130         x86_64: {
131             enabled: true,
132         },
133     },
134     relative_install_path: "hw",
135     cflags: ["-DDRV_I915"],
136     srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
137 }
138
139 cc_library_shared {
140     name: "gralloc.minigbm_meson",
141     defaults: ["minigbm_cros_gralloc_defaults"],
142     relative_install_path: "hw",
143     cflags: ["-DDRV_MESON"],
144     srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
145 }