blob: e7dfff8f54d4e12a9cf98b24a8ab83dacf9dbad5 [file] [log] [blame]
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package {
default_applicable_licenses: ["external_minigbm_license"],
}
// Added automatically by a large-scale-change that took the approach of
// 'apply every license found to every target'. While this makes sure we respect
// every license restriction, it may not be entirely correct.
//
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
//
// Please consider splitting the single license below into multiple licenses,
// taking care not to lose any license_kind information, and overriding the
// default license using the 'licenses: [...]' property on targets as needed.
//
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
// to attach the license to, and including a comment whether the files may be
// used in the current project.
// See: http://go/android-license-faq
license {
name: "external_minigbm_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
"SPDX-license-identifier-BSD",
"SPDX-license-identifier-MIT",
],
license_text: [
"LICENSE",
],
}
cc_defaults {
name: "minigbm_defaults",
srcs: [
"amdgpu.c",
"drv.c",
"dumb_driver.c",
"exynos.c",
"helpers_array.c",
"helpers.c",
"i915.c",
"mediatek.c",
"msm.c",
"rockchip.c",
"vc4.c",
"virtgpu.c",
"virtgpu_cross_domain.c",
"virtgpu_virgl.c",
],
cflags: [
"-D_GNU_SOURCE=1",
"-D_FILE_OFFSET_BITS=64",
"-Wall",
"-Wsign-compare",
"-Wpointer-arith",
"-Wcast-qual",
"-Wcast-align",
"-Wno-unused-parameter",
],
cppflags: ["-std=c++14"],
}
cc_defaults {
name: "minigbm_cros_gralloc_defaults",
defaults: ["minigbm_defaults"],
header_libs: [
"libhardware_headers",
"libnativebase_headers",
"libnativewindow_headers",
"libsystem_headers",
],
export_header_lib_headers: [
"libhardware_headers",
"libnativebase_headers",
"libnativewindow_headers",
"libsystem_headers",
],
srcs: [
"cros_gralloc/cros_gralloc_buffer.cc",
"cros_gralloc/cros_gralloc_helpers.cc",
"cros_gralloc/cros_gralloc_driver.cc",
],
static_libs: ["libarect"],
export_static_lib_headers: ["libarect"],
vendor: true,
shared_libs: [
"libcutils",
"libdrm",
"libnativewindow",
"libsync",
"liblog",
],
relative_install_path: "hw",
}
cc_defaults {
name: "gbm_defaults",
defaults: ["minigbm_defaults"],
srcs: [
"gbm.c",
"gbm_helpers.c",
],
export_include_dirs: ["."],
}
cc_library {
name: "libgbm",
defaults: ["gbm_defaults"],
host_supported: true,
target: {
host: {
// Avoid linking to another host copy of libdrm; this library will cause
// binary GPU drivers to be loaded from the host, which might be linked
// to a system copy of libdrm, which conflicts with the AOSP one
allow_undefined_symbols: true,
header_libs: ["libdrm_headers"],
},
android: {
shared_libs: [
"libdrm",
"liblog"
],
},
},
apex_available: [
"//apex_available:platform",
"com.android.virt",
],
}
cc_defaults {
name: "libminigbm_cros_gralloc_defaults",
defaults: ["minigbm_cros_gralloc_defaults"],
shared_libs: ["liblog"],
static_libs: ["libdrm"],
export_include_dirs: ["."],
}
cc_library_static {
name: "libminigbm_cros_gralloc",
defaults: ["libminigbm_cros_gralloc_defaults"],
}
cc_library_shared {
name: "gralloc.minigbm",
defaults: ["minigbm_cros_gralloc_defaults"],
srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
}
cc_library_shared {
name: "gralloc.minigbm_intel",
defaults: ["minigbm_cros_gralloc_defaults"],
enabled: false,
arch: {
x86: {
enabled: true,
},
x86_64: {
enabled: true,
},
},
cflags: ["-DDRV_I915"],
srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
}
cc_library_shared {
name: "gralloc.minigbm_meson",
defaults: ["minigbm_cros_gralloc_defaults"],
cflags: ["-DDRV_MESON"],
srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
}
cc_library_shared {
name: "gralloc.minigbm_msm",
defaults: ["minigbm_cros_gralloc_defaults"],
cflags: ["-DDRV_MSM"],
srcs: [
"cros_gralloc/gralloc0/gralloc0.cc",
],
}
cc_library_static {
name: "libminigbm_cros_gralloc_msm",
defaults: ["libminigbm_cros_gralloc_defaults"],
cflags: ["-DDRV_MSM"],
}