minigbm: Cleanup Android.bp
Goals:
1. Cleanup
2. Allow the declaration and configuration of targets outside the tree
Out-of-tree Android.bp example:
'''
cc_binary {
name: "android.hardware.graphics.allocator@4.0-service.minigbm_vc4",
init_rc: ["allocator.minigbm_vc4.rc"],
defaults: ["minigbm_gralloc4_allocator_defaults"],
cflags: ["-DDRV_VC4"],
}
cc_library_shared {
name: "android.hardware.graphics.mapper@4.0-impl.minigbm_vc4",
defaults: ["minigbm_gralloc4_common_defaults"],
cflags: ["-DDRV_VC4"],
srcs: [":minigbm_gralloc4_mapper_files"],
}
'''
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: Ia535814c361d3625aa7f31c79674ff1ad965e1c0
This commit is contained in:
parent
548dcc013c
commit
a264847ff5
3 changed files with 129 additions and 188 deletions
92
Android.bp
92
Android.bp
|
|
@ -32,8 +32,8 @@ license {
|
|||
],
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
name: "minigbm_defaults",
|
||||
filegroup {
|
||||
name: "minigbm_core_files",
|
||||
|
||||
srcs: [
|
||||
"amdgpu.c",
|
||||
|
|
@ -51,6 +51,27 @@ cc_defaults {
|
|||
"virtgpu_cross_domain.c",
|
||||
"virtgpu_virgl.c",
|
||||
],
|
||||
}
|
||||
|
||||
filegroup {
|
||||
name: "minigbm_gralloc_common_files",
|
||||
|
||||
srcs: [
|
||||
"cros_gralloc/cros_gralloc_buffer.cc",
|
||||
"cros_gralloc/cros_gralloc_helpers.cc",
|
||||
"cros_gralloc/cros_gralloc_driver.cc",
|
||||
],
|
||||
}
|
||||
|
||||
filegroup {
|
||||
name: "minigbm_gralloc0_files",
|
||||
srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
name: "minigbm_defaults",
|
||||
|
||||
srcs: [":minigbm_core_files"],
|
||||
|
||||
cflags: [
|
||||
"-D_GNU_SOURCE=1",
|
||||
|
|
@ -62,8 +83,13 @@ cc_defaults {
|
|||
"-Wcast-align",
|
||||
"-Wno-unused-parameter",
|
||||
],
|
||||
}
|
||||
|
||||
cppflags: ["-std=c++14"],
|
||||
cc_library_headers {
|
||||
name: "minigbm_headers",
|
||||
host_supported: true,
|
||||
vendor_available: true,
|
||||
export_include_dirs: ["."],
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
|
|
@ -71,30 +97,18 @@ cc_defaults {
|
|||
|
||||
defaults: ["minigbm_defaults"],
|
||||
|
||||
srcs: [":minigbm_gralloc_common_files"],
|
||||
|
||||
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",
|
||||
"minigbm_headers",
|
||||
],
|
||||
|
||||
static_libs: ["libarect"],
|
||||
|
||||
export_static_lib_headers: ["libarect"],
|
||||
|
||||
vendor: true,
|
||||
|
||||
shared_libs: [
|
||||
|
|
@ -108,24 +122,16 @@ cc_defaults {
|
|||
relative_install_path: "hw",
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
name: "gbm_defaults",
|
||||
|
||||
cc_library {
|
||||
name: "libgbm",
|
||||
defaults: ["minigbm_defaults"],
|
||||
host_supported: true,
|
||||
|
||||
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
|
||||
|
|
@ -145,26 +151,14 @@ cc_library {
|
|||
"//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"],
|
||||
srcs: [":minigbm_gralloc0_files"],
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
|
|
@ -180,27 +174,19 @@ cc_library_shared {
|
|||
},
|
||||
},
|
||||
cflags: ["-DDRV_I915"],
|
||||
srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
|
||||
srcs: [":minigbm_gralloc0_files"],
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
name: "gralloc.minigbm_meson",
|
||||
defaults: ["minigbm_cros_gralloc_defaults"],
|
||||
cflags: ["-DDRV_MESON"],
|
||||
srcs: ["cros_gralloc/gralloc0/gralloc0.cc"],
|
||||
srcs: [":minigbm_gralloc0_files"],
|
||||
}
|
||||
|
||||
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"],
|
||||
srcs: [":minigbm_gralloc0_files"],
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue