1// Use of this source code is governed by a BSD-style license that can be 2// found in the LICENSE file. 3 4package { 5 default_applicable_licenses: ["external_minigbm_license"], 6} 7 8// Added automatically by a large-scale-change that took the approach of 9// 'apply every license found to every target'. While this makes sure we respect 10// every license restriction, it may not be entirely correct. 11// 12// e.g. GPL in an MIT project might only apply to the contrib/ directory. 13// 14// Please consider splitting the single license below into multiple licenses, 15// taking care not to lose any license_kind information, and overriding the 16// default license using the 'licenses: [...]' property on targets as needed. 17// 18// For unused files, consider creating a 'fileGroup' with "//visibility:private" 19// to attach the license to, and including a comment whether the files may be 20// used in the current project. 21// See: http://go/android-license-faq 22license { 23 name: "external_minigbm_license", 24 visibility: [":__subpackages__"], 25 license_kinds: [ 26 "SPDX-license-identifier-Apache-2.0", 27 "SPDX-license-identifier-BSD", 28 "SPDX-license-identifier-MIT", 29 ], 30 license_text: [ 31 "LICENSE", 32 ], 33} 34 35cc_defaults { 36 name: "minigbm_defaults", 37 38 srcs: [ 39 "amdgpu.c", 40 "drv.c", 41 "dumb_driver.c", 42 "exynos.c", 43 "helpers_array.c", 44 "helpers.c", 45 "i915.c", 46 "mediatek.c", 47 "msm.c", 48 "rockchip.c", 49 "vc4.c", 50 "virtgpu.c", 51 "virtgpu_cross_domain.c", 52 "virtgpu_virgl.c", 53 ], 54 55 cflags: [ 56 "-D_GNU_SOURCE=1", 57 "-D_FILE_OFFSET_BITS=64", 58 "-Wall", 59 "-Wsign-compare", 60 "-Wpointer-arith", 61 "-Wcast-qual", 62 "-Wcast-align", 63 "-Wno-unused-parameter", 64 ], 65 66 cppflags: ["-std=c++14"], 67} 68 69cc_defaults { 70 name: "minigbm_cros_gralloc_defaults", 71 72 defaults: ["minigbm_defaults"], 73 74 header_libs: [ 75 "libhardware_headers", 76 "libnativebase_headers", 77 "libnativewindow_headers", 78 "libsystem_headers", 79 ], 80 81 export_header_lib_headers: [ 82 "libhardware_headers", 83 "libnativebase_headers", 84 "libnativewindow_headers", 85 "libsystem_headers", 86 ], 87 88 srcs: [ 89 "cros_gralloc/cros_gralloc_buffer.cc", 90 "cros_gralloc/cros_gralloc_helpers.cc", 91 "cros_gralloc/cros_gralloc_driver.cc", 92 ], 93 94 static_libs: ["libarect"], 95 96 export_static_lib_headers: ["libarect"], 97 98 vendor: true, 99 100 shared_libs: [ 101 "libcutils", 102 "libdrm", 103 "libnativewindow", 104 "libsync", 105 "liblog", 106 ], 107 108 relative_install_path: "hw", 109} 110 111cc_defaults { 112 name: "gbm_defaults", 113 114 defaults: ["minigbm_defaults"], 115 116 srcs: [ 117 "gbm.c", 118 "gbm_helpers.c", 119 ], 120 121 export_include_dirs: ["."], 122} 123 124cc_library { 125 name: "libgbm", 126 defaults: ["gbm_defaults"], 127 host_supported: true, 128 129 target: { 130 host: { 131 // Avoid linking to another host copy of libdrm; this library will cause 132 // binary GPU drivers to be loaded from the host, which might be linked 133 // to a system copy of libdrm, which conflicts with the AOSP one 134 allow_undefined_symbols: true, 135 header_libs: ["libdrm_headers"], 136 }, 137 android: { 138 shared_libs: [ 139 "libdrm", 140 "liblog" 141 ], 142 }, 143 }, 144 apex_available: [ 145 "//apex_available:platform", 146 "com.android.virt", 147 ], 148} 149 150cc_defaults { 151 name: "libminigbm_cros_gralloc_defaults", 152 defaults: ["minigbm_cros_gralloc_defaults"], 153 shared_libs: ["liblog"], 154 static_libs: ["libdrm"], 155 156 export_include_dirs: ["."], 157} 158 159cc_library_static { 160 name: "libminigbm_cros_gralloc", 161 defaults: ["libminigbm_cros_gralloc_defaults"], 162} 163 164cc_library_shared { 165 name: "gralloc.minigbm", 166 defaults: ["minigbm_cros_gralloc_defaults"], 167 srcs: ["cros_gralloc/gralloc0/gralloc0.cc"], 168} 169 170cc_library_shared { 171 name: "gralloc.minigbm_intel", 172 defaults: ["minigbm_cros_gralloc_defaults"], 173 enabled: false, 174 arch: { 175 x86: { 176 enabled: true, 177 }, 178 x86_64: { 179 enabled: true, 180 }, 181 }, 182 cflags: ["-DDRV_I915"], 183 srcs: ["cros_gralloc/gralloc0/gralloc0.cc"], 184} 185 186cc_library_shared { 187 name: "gralloc.minigbm_meson", 188 defaults: ["minigbm_cros_gralloc_defaults"], 189 cflags: ["-DDRV_MESON"], 190 srcs: ["cros_gralloc/gralloc0/gralloc0.cc"], 191} 192 193cc_library_shared { 194 name: "gralloc.minigbm_msm", 195 defaults: ["minigbm_cros_gralloc_defaults"], 196 cflags: ["-DDRV_MSM"], 197 srcs: [ 198 "cros_gralloc/gralloc0/gralloc0.cc", 199 ], 200} 201 202cc_library_static { 203 name: "libminigbm_cros_gralloc_msm", 204 defaults: ["libminigbm_cros_gralloc_defaults"], 205 cflags: ["-DDRV_MSM"], 206} 207