blob: 762984e64fd044bb5049b01cee02e52680ff2f3d [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",
Andy Hungd46c87c2024-09-20 13:30:42 -070056 "ServiceSingleton.cpp",
Atneya Nairf5b68512022-05-23 20:02:49 -040057 "ServiceUtilities.cpp",
Andy Hung44d648b2022-04-08 17:33:40 -070058 "ThreadSnapshot.cpp",
Atneya Nairf5b68512022-05-23 20:02:49 -040059 "TimeCheck.cpp",
60 "TimerThread.cpp",
Atneya Nair7795f5f2022-05-23 13:44:00 -040061 ],
62}
63
64cc_library_headers {
65 name: "libmediautils_headers",
66 host_supported: true,
67 vendor_available: true, // required for platform/hardware/interfaces
68 shared_libs: [
69 "liblog",
70 ],
71 local_include_dirs: ["include"],
72 export_include_dirs: ["include"],
73}
74
Atneya Nair7795f5f2022-05-23 13:44:00 -040075
76cc_library {
77 name: "libmediautils",
Atneya Nairf5b68512022-05-23 20:02:49 -040078 host_supported: true,
Atneya Nair7795f5f2022-05-23 13:44:00 -040079 defaults: ["libmediautils_defaults"],
80 srcs: [
81 ":libmediautils_core_srcs",
Steven Moreland22ee4602017-04-07 10:44:52 -070082 ],
Colin Crossd8e3af02019-05-17 13:28:13 -070083 static_libs: [
Steven Moreland36960002021-04-01 00:08:45 +000084 "libbatterystats_aidl",
Steven Moreland886d7322021-04-02 04:19:45 +000085 "libprocessinfoservice_aidl",
Colin Crossd8e3af02019-05-17 13:28:13 -070086 ],
Steven Moreland22ee4602017-04-07 10:44:52 -070087 shared_libs: [
Atneya Nairc1b01f72023-10-30 16:28:09 -070088 "com.android.media.audio-aconfig-cc",
Philip P. Moltmannbda45752020-07-17 16:41:18 -070089 "libaudioclient_aidl_conversion",
Andy Hungc747c532022-03-07 21:41:14 -080090 "libaudioutils", // for clock.h, Statistics.h
Atneya Nair7795f5f2022-05-23 13:44:00 -040091 "libbase",
Steven Moreland22ee4602017-04-07 10:44:52 -070092 "libbinder",
Andy Hungd46c87c2024-09-20 13:30:42 -070093 "libbinder_ndk",
Jeffrey Carlyle62cc92b2019-09-17 11:15:15 -070094 "libcutils",
Jayant Chowdhary32b4f492018-11-14 18:38:21 -080095 "libhidlbase",
Atneya Nair7795f5f2022-05-23 13:44:00 -040096 "liblog",
Svet Ganov33761132021-05-13 22:51:08 +000097 "libpermission",
Atneya Nair7795f5f2022-05-23 13:44:00 -040098 "libutils",
Jayant Chowdhary32b4f492018-11-14 18:38:21 -080099 "android.hardware.graphics.bufferqueue@1.0",
100 "android.hidl.token@1.0-utils",
Samiul Islamacb722d2021-08-26 11:41:21 +0100101 "packagemanager_aidl-cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -0700102 ],
Steven Moreland36960002021-04-01 00:08:45 +0000103 export_static_lib_headers: [
104 "libbatterystats_aidl",
105 ],
Steven Moreland22ee4602017-04-07 10:44:52 -0700106
Eric Laurent39b09b52018-06-29 12:24:40 -0700107 logtags: ["EventLogTags.logtags"],
108
Shunkai Yao7bf9e7c2023-02-08 18:55:17 +0000109 cflags: [
110 "-Wall",
111 "-Wextra",
112 "-Werror",
113 "-Wthread-safety",
114 ],
115
Philip P. Moltmannbda45752020-07-17 16:41:18 -0700116 export_shared_lib_headers: [
Andy Hungd46c87c2024-09-20 13:30:42 -0700117 "libaudioutils",
118 "libbinder_ndk",
Svet Ganov33761132021-05-13 22:51:08 +0000119 "libpermission",
Abhishek Gadewar52ff0f82024-05-28 15:00:19 -0700120 "packagemanager_aidl-cpp",
Philip P. Moltmannbda45752020-07-17 16:41:18 -0700121 ],
122
Andy Hungd4265822022-04-01 18:54:32 -0700123 required: [
Atneya Nair7795f5f2022-05-23 13:44:00 -0400124 "libmediautils_delayed", // lazy loaded
Andy Hungd4265822022-04-01 18:54:32 -0700125 ],
126
Atneya Nairf5b68512022-05-23 20:02:49 -0400127 target: {
128 android: {
129 srcs: [
130 "LimitProcessMemory.cpp",
131 "MemoryLeakTrackUtil.cpp",
132 ],
133 static_libs: [
134 "libc_malloc_debug_backtrace",
135 ],
136 include_dirs: [
137 // For DEBUGGER_SIGNAL
138 "system/core/debuggerd/include",
139 ],
140 header_libs: [
141 "bionic_libc_platform_headers",
142 ],
143 },
144 },
145
Steven Moreland22ee4602017-04-07 10:44:52 -0700146 local_include_dirs: ["include"],
147 export_include_dirs: ["include"],
148}
Andy Hung328d6772021-01-12 12:32:21 -0800149
Andy Hung61589a42021-06-16 09:37:53 -0700150cc_library {
Andy Hungd4265822022-04-01 18:54:32 -0700151 name: "libmediautils_delayed", // match with MEDIAUTILS_DELAYED_LIBRARY_NAME
Atneya Nairf5b68512022-05-23 20:02:49 -0400152 host_supported: true,
Atneya Nair7795f5f2022-05-23 13:44:00 -0400153 defaults: ["libmediautils_defaults"],
Andy Hungd4265822022-04-01 18:54:32 -0700154 srcs: [
155 "MediaUtilsDelayedLibrary.cpp",
156 ],
Andy Hungd4265822022-04-01 18:54:32 -0700157 shared_libs: [
158 "liblog",
159 "libutils",
160 "libutilscallstack",
161 ],
162}
163
164cc_library {
Andy Hung61589a42021-06-16 09:37:53 -0700165 name: "libmediautils_vendor",
Atneya Nair7795f5f2022-05-23 13:44:00 -0400166 defaults: ["libmediautils_defaults"],
167 vendor_available: true, // required for platform/hardware/interfaces
Andy Hung61589a42021-06-16 09:37:53 -0700168 srcs: [
169 "MemoryLeakTrackUtil.cpp",
170 ],
171
Andy Hung61589a42021-06-16 09:37:53 -0700172 shared_libs: [
173 "liblog",
174 "libutils",
175 ],
176
177 static_libs: [
178 "libc_malloc_debug_backtrace",
179 ],
180
181 header_libs: [
182 "bionic_libc_platform_headers",
183 ],
184
185 local_include_dirs: ["include"],
186 export_include_dirs: ["include"],
187}
Akshata Kadam596e17e2023-01-02 18:09:54 +0530188
189cc_library_headers {
190 name: "mediautils_headers",
191 export_include_dirs: ["include", "."],
192}