1
2/*
3 * Copyright (C) 2020 Samsung Electronics Co. Ltd.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18package {
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22soong_config_module_type {
23	name: "libvendorgraphicbuffer_cc_defaults",
24	module_type: "cc_defaults",
25	config_namespace: "arm_gralloc",
26	variables: [
27		"mapper_version",
28	],
29	properties: [
30		"srcs",
31		"shared_libs",
32		"header_libs",
33	],
34}
35
36soong_config_string_variable {
37	name: "mapper_version",
38	values: [
39		"mapper4",
40		"mapper5",
41	],
42}
43
44libvendorgraphicbuffer_cc_defaults {
45	name: "libvendorgraphicbuffer_src_defaults",
46	soong_config_variables: {
47		mapper_version: {
48			mapper5: {
49				srcs: ["gralloc5/vendor_graphicbuffer_meta.cpp"],
50				shared_libs: [
51					"libvndksupport",
52				],
53				header_libs: [
54					"libimapper_providerutils",
55					"libimapper_stablec",
56				],
57			},
58			mapper4: {
59				srcs: ["gralloc4/vendor_graphicbuffer_meta.cpp"],
60			},
61			conditions_default: {
62				srcs: ["gralloc4/vendor_graphicbuffer_meta.cpp"],
63			},
64		},
65	},
66}
67
68cc_library_shared {
69	name: "libvendorgraphicbuffer",
70	defaults: [
71		"libvendorgraphicbuffer_src_defaults",
72	],
73	shared_libs: [
74		"libdrm",
75		"libutils",
76		"libui",
77		"liblog",
78		"libhardware",
79		"android.hardware.graphics.allocator@2.0",
80		"android.hardware.graphics.allocator@3.0",
81		"android.hardware.graphics.allocator@4.0",
82		"android.hardware.graphics.common@1.2",
83		"android.hardware.graphics.mapper@2.0",
84		"android.hardware.graphics.mapper@2.1",
85		"android.hardware.graphics.mapper@3.0",
86		"android.hardware.graphics.mapper@4.0",
87		"libgralloctypes",
88		"libhidlbase",
89	],
90	header_libs: [
91		"libgralloc_headers",
92		"pixel-gralloc-headers",
93	],
94	include_dirs: [
95		"hardware/google/gchips/include",
96	],
97	export_include_dirs: [
98		"include",
99	],
100	vendor: true,
101}
102