blob: 5b7319a14c4670a05a8e22556cbf069ae49e9cfd [file] [log] [blame]
Steven Moreland22ee4602017-04-07 10:44:52 -07001// Copyright 2017 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badour56786ac2021-02-25 15:24:36 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "frameworks_av_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["frameworks_av_license"],
22}
23
Atneya Nair7795f5f2022-05-23 13:44:00 -040024cc_defaults {
25 name: "libmediautils_defaults",
26 cflags: [
27 "-Wall",
28 "-Werror",
29 "-Wextra",
30 ],
Atneya Nairf5b68512022-05-23 20:02:49 -040031 sanitize: {
32 cfi: true,
33 integer_overflow: true,
34 },
35 target: {
36 host: {
37 sanitize: {
38 cfi: false,
39 },
40 },
41 },
Atneya Nair7795f5f2022-05-23 13:44:00 -040042}
Steven Moreland22ee4602017-04-07 10:44:52 -070043
Atneya Nair7795f5f2022-05-23 13:44:00 -040044filegroup {
45 name: "libmediautils_core_srcs",
Steven Moreland22ee4602017-04-07 10:44:52 -070046 srcs: [
Jayant Chowdhary32b4f492018-11-14 18:38:21 -080047 "AImageReaderUtils.cpp",
Atneya Nairf5b68512022-05-23 20:02:49 -040048 "BatteryNotifier.cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -070049 "ISchedulingPolicyService.cpp",
Andy Hungd4265822022-04-01 18:54:32 -070050 "Library.cpp",
Andy Hungd4265822022-04-01 18:54:32 -070051 "MediaUtilsDelayed.cpp",
Andy Hung224f82f2022-03-22 00:00:49 -070052 "MethodStatistics.cpp",
Andy Hungafc51db2022-04-08 17:33:40 -070053 "Process.cpp",
Atneya Nairf5b68512022-05-23 20:02:49 -040054 "ProcessInfo.cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -070055 "SchedulingPolicyService.cpp",
Atneya Nairf5b68512022-05-23 20:02:49 -040056 "ServiceUtilities.cpp",
Andy Hung44d648b2022-04-08 17:33:40 -070057 "ThreadSnapshot.cpp",
Atneya Nairf5b68512022-05-23 20:02:49 -040058 "TimeCheck.cpp",
59 "TimerThread.cpp",
Atneya Nair7795f5f2022-05-23 13:44:00 -040060 ],
61}
62
63cc_library_headers {
64 name: "libmediautils_headers",
65 host_supported: true,
66 vendor_available: true, // required for platform/hardware/interfaces
67 shared_libs: [
68 "liblog",
69 ],
70 local_include_dirs: ["include"],
71 export_include_dirs: ["include"],
72}
73
Atneya Nair7795f5f2022-05-23 13:44:00 -040074
75cc_library {
76 name: "libmediautils",
Atneya Nairf5b68512022-05-23 20:02:49 -040077 host_supported: true,
Atneya Nair7795f5f2022-05-23 13:44:00 -040078 defaults: ["libmediautils_defaults"],
79 srcs: [
80 ":libmediautils_core_srcs",
Steven Moreland22ee4602017-04-07 10:44:52 -070081 ],
Colin Crossd8e3af02019-05-17 13:28:13 -070082 static_libs: [
Steven Moreland36960002021-04-01 00:08:45 +000083 "libbatterystats_aidl",
Steven Moreland886d7322021-04-02 04:19:45 +000084 "libprocessinfoservice_aidl",
Colin Crossd8e3af02019-05-17 13:28:13 -070085 ],
Steven Moreland22ee4602017-04-07 10:44:52 -070086 shared_libs: [
Atneya Nairc1b01f72023-10-30 16:28:09 -070087 "com.android.media.audio-aconfig-cc",
Philip P. Moltmannbda45752020-07-17 16:41:18 -070088 "libaudioclient_aidl_conversion",
Andy Hungc747c532022-03-07 21:41:14 -080089 "libaudioutils", // for clock.h, Statistics.h
Atneya Nair7795f5f2022-05-23 13:44:00 -040090 "libbase",
Steven Moreland22ee4602017-04-07 10:44:52 -070091 "libbinder",
Jeffrey Carlyle62cc92b2019-09-17 11:15:15 -070092 "libcutils",
Jayant Chowdhary32b4f492018-11-14 18:38:21 -080093 "libhidlbase",
Atneya Nair7795f5f2022-05-23 13:44:00 -040094 "liblog",
Svet Ganov33761132021-05-13 22:51:08 +000095 "libpermission",
Atneya Nair7795f5f2022-05-23 13:44:00 -040096 "libutils",
Jayant Chowdhary32b4f492018-11-14 18:38:21 -080097 "android.hardware.graphics.bufferqueue@1.0",
98 "android.hidl.token@1.0-utils",
Samiul Islamacb722d2021-08-26 11:41:21 +010099 "packagemanager_aidl-cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -0700100 ],
Steven Moreland36960002021-04-01 00:08:45 +0000101 export_static_lib_headers: [
102 "libbatterystats_aidl",
103 ],
Steven Moreland22ee4602017-04-07 10:44:52 -0700104
Eric Laurent39b09b52018-06-29 12:24:40 -0700105 logtags: ["EventLogTags.logtags"],
106
Shunkai Yao7bf9e7c2023-02-08 18:55:17 +0000107 cflags: [
108 "-Wall",
109 "-Wextra",
110 "-Werror",
111 "-Wthread-safety",
112 ],
113
Philip P. Moltmannbda45752020-07-17 16:41:18 -0700114 export_shared_lib_headers: [
Svet Ganov33761132021-05-13 22:51:08 +0000115 "libpermission",
Philip P. Moltmannbda45752020-07-17 16:41:18 -0700116 ],
117
Andy Hungd4265822022-04-01 18:54:32 -0700118 required: [
Atneya Nair7795f5f2022-05-23 13:44:00 -0400119 "libmediautils_delayed", // lazy loaded
Andy Hungd4265822022-04-01 18:54:32 -0700120 ],
121
Atneya Nairf5b68512022-05-23 20:02:49 -0400122 target: {
123 android: {
124 srcs: [
125 "LimitProcessMemory.cpp",
126 "MemoryLeakTrackUtil.cpp",
127 ],
128 static_libs: [
129 "libc_malloc_debug_backtrace",
130 ],
131 include_dirs: [
132 // For DEBUGGER_SIGNAL
133 "system/core/debuggerd/include",
134 ],
135 header_libs: [
136 "bionic_libc_platform_headers",
137 ],
138 },
139 },
140
Steven Moreland22ee4602017-04-07 10:44:52 -0700141 local_include_dirs: ["include"],
142 export_include_dirs: ["include"],
143}
Andy Hung328d6772021-01-12 12:32:21 -0800144
Andy Hung61589a42021-06-16 09:37:53 -0700145cc_library {
Andy Hungd4265822022-04-01 18:54:32 -0700146 name: "libmediautils_delayed", // match with MEDIAUTILS_DELAYED_LIBRARY_NAME
Atneya Nairf5b68512022-05-23 20:02:49 -0400147 host_supported: true,
Atneya Nair7795f5f2022-05-23 13:44:00 -0400148 defaults: ["libmediautils_defaults"],
Andy Hungd4265822022-04-01 18:54:32 -0700149 srcs: [
150 "MediaUtilsDelayedLibrary.cpp",
151 ],
Andy Hungd4265822022-04-01 18:54:32 -0700152 shared_libs: [
153 "liblog",
154 "libutils",
155 "libutilscallstack",
156 ],
157}
158
159cc_library {
Andy Hung61589a42021-06-16 09:37:53 -0700160 name: "libmediautils_vendor",
Atneya Nair7795f5f2022-05-23 13:44:00 -0400161 defaults: ["libmediautils_defaults"],
162 vendor_available: true, // required for platform/hardware/interfaces
Andy Hung61589a42021-06-16 09:37:53 -0700163 srcs: [
164 "MemoryLeakTrackUtil.cpp",
165 ],
166
Andy Hung61589a42021-06-16 09:37:53 -0700167 shared_libs: [
168 "liblog",
169 "libutils",
170 ],
171
172 static_libs: [
173 "libc_malloc_debug_backtrace",
174 ],
175
176 header_libs: [
177 "bionic_libc_platform_headers",
178 ],
179
180 local_include_dirs: ["include"],
181 export_include_dirs: ["include"],
182}
Akshata Kadam596e17e2023-01-02 18:09:54 +0530183
184cc_library_headers {
185 name: "mediautils_headers",
186 export_include_dirs: ["include", "."],
187}