xref: /aosp_15_r20/hardware/interfaces/graphics/mapper/stable-c/Android.bp (revision 4d7e907c777eeecc4c5bd7cf640a754fac206ff7)
1/**
2 * Copyright (c) 2022, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package {
18    default_team: "trendy_team_android_core_graphics_stack",
19    // See: http://go/android-license-faq
20    // A large-scale-change added 'default_applicable_licenses' to import
21    // all of the 'license_kinds' from "hardware_interfaces_license"
22    // to get the below license kinds:
23    //   SPDX-license-identifier-Apache-2.0
24    default_applicable_licenses: ["hardware_interfaces_license"],
25}
26
27cc_library_headers {
28    name: "libimapper_stablec",
29    export_include_dirs: ["include"],
30    vendor_available: true,
31    header_libs: [
32        "libarect_headers",
33    ],
34    export_header_lib_headers: [
35        "libarect_headers",
36    ],
37    // TODO(b/214400477) Remove apex_available
38    apex_available: [
39        "//apex_available:platform",
40        "com.android.media.swcodec",
41        "test_com.android.media.swcodec",
42    ],
43    min_sdk_version: "29",
44}
45
46cc_library_shared {
47    name: "libimapper_stablec_abicheck",
48    visibility: ["//visibility:private"],
49    defaults: [
50        "android.hardware.graphics.allocator-ndk_shared",
51        "android.hardware.graphics.common-ndk_shared",
52    ],
53    header_libs: [
54        "libimapper_stablec",
55    ],
56    srcs: [
57        "imapper5_abicheck.cpp",
58    ],
59    header_abi_checker: {
60        enabled: true,
61        symbol_file: "imapper.map.txt",
62        ref_dump_dirs: ["abi-dumps"],
63    },
64}
65
66cc_library_headers {
67    name: "libimapper_providerutils",
68    vendor_available: true,
69    export_include_dirs: ["implutils/include"],
70    header_libs: [
71        "libbase_headers",
72        "libimapper_stablec",
73    ],
74    export_header_lib_headers: [
75        "libbase_headers",
76        "libimapper_stablec",
77    ],
78    // TODO(b/214400477) Remove apex_available
79    apex_available: [
80        "//apex_available:platform",
81        "com.android.media.swcodec",
82        "test_com.android.media.swcodec",
83    ],
84    min_sdk_version: "29",
85}
86
87cc_test {
88    name: "libimapper_providerutils_tests",
89    defaults: [
90        "android.hardware.graphics.allocator-ndk_shared",
91        "android.hardware.graphics.common-ndk_shared",
92    ],
93    header_libs: [
94        "libimapper_providerutils",
95    ],
96    srcs: [
97        "implutils/impltests.cpp",
98    ],
99    shared_libs: [
100        "libgralloctypes",
101        "libhidlbase",
102    ],
103    visibility: [":__subpackages__"],
104    cpp_std: "experimental",
105}
106
107cc_test {
108    name: "VtsHalGraphicsMapperStableC_TargetTest",
109    cpp_std: "experimental",
110    defaults: [
111        "VtsHalTargetTestDefaults",
112        "use_libaidlvintf_gtest_helper_static",
113        "android.hardware.graphics.allocator-ndk_shared",
114        "android.hardware.graphics.common-ndk_static",
115    ],
116    srcs: [
117        "vts/VtsHalGraphicsMapperStableC_TargetTest.cpp",
118    ],
119
120    shared_libs: [
121        "libbinder_ndk",
122        "libbase",
123        "libsync",
124        "libvndksupport",
125    ],
126    static_libs: [
127        "libaidlcommonsupport",
128        "libgralloctypes",
129        "libgtest",
130    ],
131    header_libs: [
132        "libimapper_stablec",
133        "libimapper_providerutils",
134    ],
135    cflags: [
136        "-Wall",
137        "-Werror",
138    ],
139    test_suites: [
140        "general-tests",
141        "vts",
142    ],
143}
144