blob: 3b079c62ce6804652c36ce868d22f0d9c2f726ca [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",
Steven Moreland22ee4602017-04-07 10:44:52 -070036 "ProcessInfo.cpp",
37 "SchedulingPolicyService.cpp",
Andy Hungab7ef302018-05-15 19:35:29 -070038 "ServiceUtilities.cpp",
Eric Laurent39b09b52018-06-29 12:24:40 -070039 "TimeCheck.cpp",
Ytai Ben-Tsvi1ea62c92021-11-10 14:38:27 -080040 "TimerThread.cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -070041 ],
Colin Crossd8e3af02019-05-17 13:28:13 -070042 static_libs: [
43 "libc_malloc_debug_backtrace",
Steven Moreland36960002021-04-01 00:08:45 +000044 "libbatterystats_aidl",
Steven Moreland886d7322021-04-02 04:19:45 +000045 "libprocessinfoservice_aidl",
Colin Crossd8e3af02019-05-17 13:28:13 -070046 ],
Steven Moreland22ee4602017-04-07 10:44:52 -070047 shared_libs: [
Philip P. Moltmannbda45752020-07-17 16:41:18 -070048 "libaudioclient_aidl_conversion",
Andy Hungc747c532022-03-07 21:41:14 -080049 "libaudioutils", // for clock.h, Statistics.h
Steven Moreland22ee4602017-04-07 10:44:52 -070050 "libbinder",
Jeffrey Carlyle62cc92b2019-09-17 11:15:15 -070051 "libcutils",
Steven Moreland22ee4602017-04-07 10:44:52 -070052 "liblog",
53 "libutils",
Jayant Chowdhary32b4f492018-11-14 18:38:21 -080054 "libhidlbase",
Svet Ganov33761132021-05-13 22:51:08 +000055 "libpermission",
Jayant Chowdhary32b4f492018-11-14 18:38:21 -080056 "android.hardware.graphics.bufferqueue@1.0",
57 "android.hidl.token@1.0-utils",
Samiul Islamacb722d2021-08-26 11:41:21 +010058 "packagemanager_aidl-cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -070059 ],
Steven Moreland36960002021-04-01 00:08:45 +000060 export_static_lib_headers: [
61 "libbatterystats_aidl",
62 ],
Steven Moreland22ee4602017-04-07 10:44:52 -070063
Eric Laurent39b09b52018-06-29 12:24:40 -070064 logtags: ["EventLogTags.logtags"],
65
Steven Moreland22ee4602017-04-07 10:44:52 -070066 cflags: [
67 "-Wall",
68 "-Wextra",
69 "-Werror",
70 ],
71
Christopher Ferris9d2e0082019-09-11 19:08:13 -070072 header_libs: [
73 "bionic_libc_platform_headers",
Marco Nelissen6b285942019-10-21 14:52:30 -070074 "libmedia_headers",
Christopher Ferrisa90adf02019-04-17 13:26:15 -070075 ],
Christopher Ferris9d2e0082019-09-11 19:08:13 -070076
Philip P. Moltmannbda45752020-07-17 16:41:18 -070077 export_shared_lib_headers: [
Svet Ganov33761132021-05-13 22:51:08 +000078 "libpermission",
Philip P. Moltmannbda45752020-07-17 16:41:18 -070079 ],
80
Andy Hungd4265822022-04-01 18:54:32 -070081 required: [
82 "libmediautils_delayed", // lazy loaded
83 ],
84
Eric Laurent42896a02019-09-27 15:40:33 -070085 include_dirs: [
86 // For DEBUGGER_SIGNAL
87 "system/core/debuggerd/include",
88 ],
Steven Moreland22ee4602017-04-07 10:44:52 -070089 local_include_dirs: ["include"],
90 export_include_dirs: ["include"],
91}
Andy Hung328d6772021-01-12 12:32:21 -080092
Andy Hung61589a42021-06-16 09:37:53 -070093cc_library {
Andy Hungd4265822022-04-01 18:54:32 -070094 name: "libmediautils_delayed", // match with MEDIAUTILS_DELAYED_LIBRARY_NAME
95 srcs: [
96 "MediaUtilsDelayedLibrary.cpp",
97 ],
98 cflags: [
99 "-Wall",
100 "-Werror",
101 "-Wextra",
102 ],
103 shared_libs: [
104 "liblog",
105 "libutils",
106 "libutilscallstack",
107 ],
108}
109
110cc_library {
Andy Hung61589a42021-06-16 09:37:53 -0700111 name: "libmediautils_vendor",
112 vendor_available: true, // required for platform/hardware/interfaces
113 srcs: [
114 "MemoryLeakTrackUtil.cpp",
115 ],
116
117 cflags: [
118 "-Wall",
119 "-Wextra",
120 "-Werror",
121 ],
122 shared_libs: [
123 "liblog",
124 "libutils",
125 ],
126
127 static_libs: [
128 "libc_malloc_debug_backtrace",
129 ],
130
131 header_libs: [
132 "bionic_libc_platform_headers",
133 ],
134
135 local_include_dirs: ["include"],
136 export_include_dirs: ["include"],
137}
138
139
Andy Hung328d6772021-01-12 12:32:21 -0800140cc_library_headers {
141 name: "libmediautils_headers",
142 vendor_available: true, // required for platform/hardware/interfaces
143
144 export_include_dirs: ["include"],
145}
Ytai Ben-Tsvi1ea62c92021-11-10 14:38:27 -0800146
147cc_test {
148 name: "libmediautils_test",
Ytai Ben-Tsvidb6f8982022-02-07 12:06:23 -0800149 srcs: [
150 "memory-test.cpp",
151 "TimerThread-test.cpp",
152 ],
Ytai Ben-Tsvi1ea62c92021-11-10 14:38:27 -0800153 shared_libs: [
154 "libmediautils",
155 "libutils",
156 ]
157}