blob: 698752fbbe67e41d74bb5eaaceea363c6680302f [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: [
Philip P. Moltmannbda45752020-07-17 16:41:18 -070087 "libaudioclient_aidl_conversion",
Andy Hungc747c532022-03-07 21:41:14 -080088 "libaudioutils", // for clock.h, Statistics.h
Atneya Nair7795f5f2022-05-23 13:44:00 -040089 "libbase",
Steven Moreland22ee4602017-04-07 10:44:52 -070090 "libbinder",
Jeffrey Carlyle62cc92b2019-09-17 11:15:15 -070091 "libcutils",
Jayant Chowdhary32b4f492018-11-14 18:38:21 -080092 "libhidlbase",
Atneya Nair7795f5f2022-05-23 13:44:00 -040093 "liblog",
Svet Ganov33761132021-05-13 22:51:08 +000094 "libpermission",
Atneya Nair7795f5f2022-05-23 13:44:00 -040095 "libutils",
Jayant Chowdhary32b4f492018-11-14 18:38:21 -080096 "android.hardware.graphics.bufferqueue@1.0",
97 "android.hidl.token@1.0-utils",
Samiul Islamacb722d2021-08-26 11:41:21 +010098 "packagemanager_aidl-cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -070099 ],
Steven Moreland36960002021-04-01 00:08:45 +0000100 export_static_lib_headers: [
101 "libbatterystats_aidl",
102 ],
Steven Moreland22ee4602017-04-07 10:44:52 -0700103
Eric Laurent39b09b52018-06-29 12:24:40 -0700104 logtags: ["EventLogTags.logtags"],
105
Philip P. Moltmannbda45752020-07-17 16:41:18 -0700106 export_shared_lib_headers: [
Svet Ganov33761132021-05-13 22:51:08 +0000107 "libpermission",
Philip P. Moltmannbda45752020-07-17 16:41:18 -0700108 ],
109
Andy Hungd4265822022-04-01 18:54:32 -0700110 required: [
Atneya Nair7795f5f2022-05-23 13:44:00 -0400111 "libmediautils_delayed", // lazy loaded
Andy Hungd4265822022-04-01 18:54:32 -0700112 ],
113
Atneya Nairf5b68512022-05-23 20:02:49 -0400114 target: {
115 android: {
116 srcs: [
117 "LimitProcessMemory.cpp",
118 "MemoryLeakTrackUtil.cpp",
119 ],
120 static_libs: [
121 "libc_malloc_debug_backtrace",
122 ],
123 include_dirs: [
124 // For DEBUGGER_SIGNAL
125 "system/core/debuggerd/include",
126 ],
127 header_libs: [
128 "bionic_libc_platform_headers",
129 ],
130 },
131 },
132
Steven Moreland22ee4602017-04-07 10:44:52 -0700133 local_include_dirs: ["include"],
134 export_include_dirs: ["include"],
135}
Andy Hung328d6772021-01-12 12:32:21 -0800136
Andy Hung61589a42021-06-16 09:37:53 -0700137cc_library {
Andy Hungd4265822022-04-01 18:54:32 -0700138 name: "libmediautils_delayed", // match with MEDIAUTILS_DELAYED_LIBRARY_NAME
Atneya Nairf5b68512022-05-23 20:02:49 -0400139 host_supported: true,
Atneya Nair7795f5f2022-05-23 13:44:00 -0400140 defaults: ["libmediautils_defaults"],
Andy Hungd4265822022-04-01 18:54:32 -0700141 srcs: [
142 "MediaUtilsDelayedLibrary.cpp",
143 ],
Andy Hungd4265822022-04-01 18:54:32 -0700144 shared_libs: [
145 "liblog",
146 "libutils",
147 "libutilscallstack",
148 ],
149}
150
151cc_library {
Andy Hung61589a42021-06-16 09:37:53 -0700152 name: "libmediautils_vendor",
Atneya Nair7795f5f2022-05-23 13:44:00 -0400153 defaults: ["libmediautils_defaults"],
154 vendor_available: true, // required for platform/hardware/interfaces
Andy Hung61589a42021-06-16 09:37:53 -0700155 srcs: [
156 "MemoryLeakTrackUtil.cpp",
157 ],
158
Andy Hung61589a42021-06-16 09:37:53 -0700159 shared_libs: [
160 "liblog",
161 "libutils",
162 ],
163
164 static_libs: [
165 "libc_malloc_debug_backtrace",
166 ],
167
168 header_libs: [
169 "bionic_libc_platform_headers",
170 ],
171
172 local_include_dirs: ["include"],
173 export_include_dirs: ["include"],
174}