blob: 6ab3800472e6697f916d34deb756a855003d4f6f [file] [log] [blame]
/*
* Copyright (C) 2020 Samsung Electronics Co. Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
soong_config_module_type {
name: "exynosgraphicbuffercore_cc_defaults",
module_type: "cc_defaults",
config_namespace: "exynosgraphicbuffer",
variables: [
"gralloc_version",
],
properties: [
"srcs", "include_dirs",
],
}
soong_config_module_type {
name: "exynosgraphicbuffer_cc_defaults",
module_type: "cc_defaults",
config_namespace: "exynosgraphicbuffer",
variables: [
"gralloc_version",
],
properties: [
"srcs", "include_dirs", "shared_libs", "static_libs",
],
}
soong_config_string_variable {
name: "gralloc_version",
values: ["three", "four", "four_sgr"],
}
exynosgraphicbuffercore_cc_defaults {
name: "exynosgraphicbuffercore_defaults",
shared_libs: [
"libcutils",
"liblog",
"libhardware",
"libgralloctypes",
"libhidlbase",
],
export_include_dirs: [
"include",
],
defaults: [
"libexynos_headers_c2_defaults",
],
soong_config_variables: {
gralloc_version: {
three: {
include_dirs: [
"hardware/samsung_slsi/exynos/include",
"hardware/samsung_slsi/exynos/gralloc3/src",
],
srcs: [
"gralloc3/exynos_graphicbuffer_meta.cpp",
],
},
four: {
include_dirs: [
"hardware/samsung_slsi/exynos/include",
"hardware/samsung_slsi/exynos/gralloc4/src",
],
srcs: [
"gralloc4/exynos_graphicbuffer_meta.cpp",
],
},
four_sgr: {
include_dirs: [
"hardware/samsung_slsi/exynos/include",
"hardware/samsung_slsi/sgpu/sgpu_gralloc/src/interface",
],
srcs: [
"sgr/exynos_graphicbuffer_meta.cpp",
],
},
},
},
}
exynosgraphicbuffer_cc_defaults {
name: "exynosgraphicbuffer_defaults",
defaults: [
"exynosgraphicbuffercore_defaults",
],
shared_libs: [
"libui",
"android.hardware.graphics.allocator@2.0",
"android.hardware.graphics.allocator@3.0",
"android.hardware.graphics.allocator@4.0",
"android.hardware.graphics.common@1.2",
"android.hardware.graphics.mapper@2.0",
"android.hardware.graphics.mapper@2.1",
"android.hardware.graphics.mapper@3.0",
"android.hardware.graphics.mapper@4.0",
],
soong_config_variables: {
gralloc_version: {
three: {
srcs: [
"gralloc3/exynos_graphicbuffer_mapper.cpp",
"gralloc3/ion_helper.cpp",
],
},
four: {
srcs: [
"gralloc4/exynos_graphicbuffer_mapper.cpp",
"gralloc4/ion_helper.cpp",
],
},
four_sgr: {
srcs: [
"sgr/exynos_graphicbuffer_mapper.cpp",
],
},
},
},
}
exynosgraphicbuffer_cc_defaults {
name: "exynosgraphicbuffer_mali_defaults",
soong_config_variables: {
gralloc_version: {
three: {
srcs: [
"gralloc3/exynos_graphicbuffer_mali.cpp",
],
static_libs: [
"libgralloc3_drmutils",
],
},
four: {
srcs: [
"gralloc4/exynos_graphicbuffer_mali.cpp",
],
static_libs: [
"libgralloc_drmutils",
],
shared_libs: [
"android.hardware.graphics.mapper@4.0-impl",
],
},
},
},
}
cc_library_shared {
name: "libexynosgraphicbuffer_core",
defaults: [
"exynosgraphicbuffercore_defaults",
"exynosgraphicbuffer_mali_defaults",
],
vendor: true,
}
cc_library_shared {
name: "libexynosgraphicbuffer",
defaults: [
"exynosgraphicbuffer_defaults",
],
shared_libs: [
"libion_exynos",
],
vendor: true,
}
cc_library_shared {
name: "libexynosgraphicbuffer_public",
defaults: [
"exynosgraphicbuffer_defaults",
],
cflags: ["-DNO_ION_HELPER"],
vendor_available: true,
}