blob: a38ef577f90e0c140e68ffd94b88bd34fa4ab4c3 [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
Wei Jia4049f132018-01-22 10:37:31 -080024cc_library {
Steven Moreland22ee4602017-04-07 10:44:52 -070025 name: "libmediautils",
26
27 srcs: [
Jayant Chowdhary32b4f492018-11-14 18:38:21 -080028 "AImageReaderUtils.cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -070029 "BatteryNotifier.cpp",
30 "ISchedulingPolicyService.cpp",
Andy Hungd4265822022-04-01 18:54:32 -070031 "Library.cpp",
Andy Hungd7e0dd42020-03-27 16:42:34 -070032 "LimitProcessMemory.cpp",
Andy Hungd4265822022-04-01 18:54:32 -070033 "MediaUtilsDelayed.cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -070034 "MemoryLeakTrackUtil.cpp",
Andy Hung224f82f2022-03-22 00:00:49 -070035 "MethodStatistics.cpp",
Andy Hungafc51db2022-04-08 17:33:40 -070036 "Process.cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -070037 "ProcessInfo.cpp",
38 "SchedulingPolicyService.cpp",
Andy Hungab7ef302018-05-15 19:35:29 -070039 "ServiceUtilities.cpp",
Andy Hung44d648b2022-04-08 17:33:40 -070040 "ThreadSnapshot.cpp",
Eric Laurent39b09b52018-06-29 12:24:40 -070041 "TimeCheck.cpp",
Ytai Ben-Tsvi1ea62c92021-11-10 14:38:27 -080042 "TimerThread.cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -070043 ],
Colin Crossd8e3af02019-05-17 13:28:13 -070044 static_libs: [
45 "libc_malloc_debug_backtrace",
Steven Moreland36960002021-04-01 00:08:45 +000046 "libbatterystats_aidl",
Steven Moreland886d7322021-04-02 04:19:45 +000047 "libprocessinfoservice_aidl",
Colin Crossd8e3af02019-05-17 13:28:13 -070048 ],
Steven Moreland22ee4602017-04-07 10:44:52 -070049 shared_libs: [
Philip P. Moltmannbda45752020-07-17 16:41:18 -070050 "libaudioclient_aidl_conversion",
Andy Hungc747c532022-03-07 21:41:14 -080051 "libaudioutils", // for clock.h, Statistics.h
Steven Moreland22ee4602017-04-07 10:44:52 -070052 "libbinder",
Jeffrey Carlyle62cc92b2019-09-17 11:15:15 -070053 "libcutils",
Steven Moreland22ee4602017-04-07 10:44:52 -070054 "liblog",
55 "libutils",
Jayant Chowdhary32b4f492018-11-14 18:38:21 -080056 "libhidlbase",
Svet Ganov33761132021-05-13 22:51:08 +000057 "libpermission",
Jayant Chowdhary32b4f492018-11-14 18:38:21 -080058 "android.hardware.graphics.bufferqueue@1.0",
59 "android.hidl.token@1.0-utils",
Samiul Islamacb722d2021-08-26 11:41:21 +010060 "packagemanager_aidl-cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -070061 ],
Steven Moreland36960002021-04-01 00:08:45 +000062 export_static_lib_headers: [
63 "libbatterystats_aidl",
64 ],
Steven Moreland22ee4602017-04-07 10:44:52 -070065
Eric Laurent39b09b52018-06-29 12:24:40 -070066 logtags: ["EventLogTags.logtags"],
67
Steven Moreland22ee4602017-04-07 10:44:52 -070068 cflags: [
69 "-Wall",
70 "-Wextra",
71 "-Werror",
72 ],
73
Christopher Ferris9d2e0082019-09-11 19:08:13 -070074 header_libs: [
75 "bionic_libc_platform_headers",
Marco Nelissen6b285942019-10-21 14:52:30 -070076 "libmedia_headers",
Christopher Ferrisa90adf02019-04-17 13:26:15 -070077 ],
Christopher Ferris9d2e0082019-09-11 19:08:13 -070078
Philip P. Moltmannbda45752020-07-17 16:41:18 -070079 export_shared_lib_headers: [
Svet Ganov33761132021-05-13 22:51:08 +000080 "libpermission",
Philip P. Moltmannbda45752020-07-17 16:41:18 -070081 ],
82
Andy Hungd4265822022-04-01 18:54:32 -070083 required: [
84 "libmediautils_delayed", // lazy loaded
85 ],
86
Eric Laurent42896a02019-09-27 15:40:33 -070087 include_dirs: [
88 // For DEBUGGER_SIGNAL
89 "system/core/debuggerd/include",
90 ],
Steven Moreland22ee4602017-04-07 10:44:52 -070091 local_include_dirs: ["include"],
92 export_include_dirs: ["include"],
93}
Andy Hung328d6772021-01-12 12:32:21 -080094
Andy Hung61589a42021-06-16 09:37:53 -070095cc_library {
Andy Hungd4265822022-04-01 18:54:32 -070096 name: "libmediautils_delayed", // match with MEDIAUTILS_DELAYED_LIBRARY_NAME
97 srcs: [
98 "MediaUtilsDelayedLibrary.cpp",
99 ],
100 cflags: [
101 "-Wall",
102 "-Werror",
103 "-Wextra",
104 ],
105 shared_libs: [
106 "liblog",
107 "libutils",
108 "libutilscallstack",
109 ],
110}
111
112cc_library {
Andy Hung61589a42021-06-16 09:37:53 -0700113 name: "libmediautils_vendor",
114 vendor_available: true, // required for platform/hardware/interfaces
115 srcs: [
116 "MemoryLeakTrackUtil.cpp",
117 ],
118
119 cflags: [
120 "-Wall",
121 "-Wextra",
122 "-Werror",
123 ],
124 shared_libs: [
125 "liblog",
126 "libutils",
127 ],
128
129 static_libs: [
130 "libc_malloc_debug_backtrace",
131 ],
132
133 header_libs: [
134 "bionic_libc_platform_headers",
135 ],
136
137 local_include_dirs: ["include"],
138 export_include_dirs: ["include"],
139}
140
141
Andy Hung328d6772021-01-12 12:32:21 -0800142cc_library_headers {
143 name: "libmediautils_headers",
144 vendor_available: true, // required for platform/hardware/interfaces
145
146 export_include_dirs: ["include"],
147}
Ytai Ben-Tsvi1ea62c92021-11-10 14:38:27 -0800148
149cc_test {
150 name: "libmediautils_test",
Ytai Ben-Tsvidb6f8982022-02-07 12:06:23 -0800151 srcs: [
152 "memory-test.cpp",
153 "TimerThread-test.cpp",
154 ],
Ytai Ben-Tsvi1ea62c92021-11-10 14:38:27 -0800155 shared_libs: [
156 "libmediautils",
157 "libutils",
158 ]
159}