blob: 04d9ed90f6f2b12b9adee10b5bb1ab6966a925b0 [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 ],
31}
Steven Moreland22ee4602017-04-07 10:44:52 -070032
Atneya Nair7795f5f2022-05-23 13:44:00 -040033filegroup {
34 name: "libmediautils_core_srcs",
Steven Moreland22ee4602017-04-07 10:44:52 -070035 srcs: [
Jayant Chowdhary32b4f492018-11-14 18:38:21 -080036 "AImageReaderUtils.cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -070037 "ISchedulingPolicyService.cpp",
Andy Hungd4265822022-04-01 18:54:32 -070038 "Library.cpp",
Andy Hungd4265822022-04-01 18:54:32 -070039 "MediaUtilsDelayed.cpp",
Andy Hung224f82f2022-03-22 00:00:49 -070040 "MethodStatistics.cpp",
Andy Hungafc51db2022-04-08 17:33:40 -070041 "Process.cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -070042 "SchedulingPolicyService.cpp",
Andy Hung44d648b2022-04-08 17:33:40 -070043 "ThreadSnapshot.cpp",
Atneya Nair7795f5f2022-05-23 13:44:00 -040044 ],
45}
46
47cc_library_headers {
48 name: "libmediautils_headers",
49 host_supported: true,
50 vendor_available: true, // required for platform/hardware/interfaces
51 shared_libs: [
52 "liblog",
53 ],
54 local_include_dirs: ["include"],
55 export_include_dirs: ["include"],
56}
57
58cc_library {
59 name: "libmediautils_core",
60 defaults: ["libmediautils_defaults"],
61 host_supported: true,
62 srcs: [":libmediautils_core_srcs"],
63 shared_libs: [
64 "libaudioutils", // for clock.h, Statistics.h
65 "libbase",
66 "libbinder",
67 "libhidlbase",
68 "liblog",
69 "libpermission",
70 "libutils",
71 "android.hardware.graphics.bufferqueue@1.0",
72 "android.hidl.token@1.0-utils",
73 "packagemanager_aidl-cpp",
74 ],
75
76 export_shared_lib_headers: [
77 "libpermission",
78 ],
79
80 local_include_dirs: ["include"],
81 export_include_dirs: ["include"],
82}
83
84cc_library {
85 name: "libmediautils",
86 defaults: ["libmediautils_defaults"],
87 srcs: [
88 ":libmediautils_core_srcs",
89 "BatteryNotifier.cpp",
90 "MemoryLeakTrackUtil.cpp",
91 "LimitProcessMemory.cpp",
92 "ProcessInfo.cpp",
93 "ServiceUtilities.cpp",
Eric Laurent39b09b52018-06-29 12:24:40 -070094 "TimeCheck.cpp",
Ytai Ben-Tsvi1ea62c92021-11-10 14:38:27 -080095 "TimerThread.cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -070096 ],
Colin Crossd8e3af02019-05-17 13:28:13 -070097 static_libs: [
98 "libc_malloc_debug_backtrace",
Steven Moreland36960002021-04-01 00:08:45 +000099 "libbatterystats_aidl",
Steven Moreland886d7322021-04-02 04:19:45 +0000100 "libprocessinfoservice_aidl",
Colin Crossd8e3af02019-05-17 13:28:13 -0700101 ],
Steven Moreland22ee4602017-04-07 10:44:52 -0700102 shared_libs: [
Philip P. Moltmannbda45752020-07-17 16:41:18 -0700103 "libaudioclient_aidl_conversion",
Andy Hungc747c532022-03-07 21:41:14 -0800104 "libaudioutils", // for clock.h, Statistics.h
Atneya Nair7795f5f2022-05-23 13:44:00 -0400105 "libbase",
Steven Moreland22ee4602017-04-07 10:44:52 -0700106 "libbinder",
Jeffrey Carlyle62cc92b2019-09-17 11:15:15 -0700107 "libcutils",
Jayant Chowdhary32b4f492018-11-14 18:38:21 -0800108 "libhidlbase",
Atneya Nair7795f5f2022-05-23 13:44:00 -0400109 "liblog",
Svet Ganov33761132021-05-13 22:51:08 +0000110 "libpermission",
Atneya Nair7795f5f2022-05-23 13:44:00 -0400111 "libutils",
Jayant Chowdhary32b4f492018-11-14 18:38:21 -0800112 "android.hardware.graphics.bufferqueue@1.0",
113 "android.hidl.token@1.0-utils",
Samiul Islamacb722d2021-08-26 11:41:21 +0100114 "packagemanager_aidl-cpp",
Steven Moreland22ee4602017-04-07 10:44:52 -0700115 ],
Steven Moreland36960002021-04-01 00:08:45 +0000116 export_static_lib_headers: [
117 "libbatterystats_aidl",
118 ],
Steven Moreland22ee4602017-04-07 10:44:52 -0700119
Eric Laurent39b09b52018-06-29 12:24:40 -0700120 logtags: ["EventLogTags.logtags"],
121
Christopher Ferris9d2e0082019-09-11 19:08:13 -0700122 header_libs: [
123 "bionic_libc_platform_headers",
Marco Nelissen6b285942019-10-21 14:52:30 -0700124 "libmedia_headers",
Christopher Ferrisa90adf02019-04-17 13:26:15 -0700125 ],
Christopher Ferris9d2e0082019-09-11 19:08:13 -0700126
Philip P. Moltmannbda45752020-07-17 16:41:18 -0700127 export_shared_lib_headers: [
Svet Ganov33761132021-05-13 22:51:08 +0000128 "libpermission",
Philip P. Moltmannbda45752020-07-17 16:41:18 -0700129 ],
130
Andy Hungd4265822022-04-01 18:54:32 -0700131 required: [
Atneya Nair7795f5f2022-05-23 13:44:00 -0400132 "libmediautils_delayed", // lazy loaded
Andy Hungd4265822022-04-01 18:54:32 -0700133 ],
134
Eric Laurent42896a02019-09-27 15:40:33 -0700135 include_dirs: [
136 // For DEBUGGER_SIGNAL
137 "system/core/debuggerd/include",
138 ],
Steven Moreland22ee4602017-04-07 10:44:52 -0700139 local_include_dirs: ["include"],
140 export_include_dirs: ["include"],
141}
Andy Hung328d6772021-01-12 12:32:21 -0800142
Andy Hung61589a42021-06-16 09:37:53 -0700143cc_library {
Andy Hungd4265822022-04-01 18:54:32 -0700144 name: "libmediautils_delayed", // match with MEDIAUTILS_DELAYED_LIBRARY_NAME
Atneya Nair7795f5f2022-05-23 13:44:00 -0400145 defaults: ["libmediautils_defaults"],
Andy Hungd4265822022-04-01 18:54:32 -0700146 srcs: [
147 "MediaUtilsDelayedLibrary.cpp",
148 ],
Andy Hungd4265822022-04-01 18:54:32 -0700149 shared_libs: [
150 "liblog",
151 "libutils",
152 "libutilscallstack",
153 ],
154}
155
156cc_library {
Andy Hung61589a42021-06-16 09:37:53 -0700157 name: "libmediautils_vendor",
Atneya Nair7795f5f2022-05-23 13:44:00 -0400158 defaults: ["libmediautils_defaults"],
159 vendor_available: true, // required for platform/hardware/interfaces
Andy Hung61589a42021-06-16 09:37:53 -0700160 srcs: [
161 "MemoryLeakTrackUtil.cpp",
162 ],
163
Andy Hung61589a42021-06-16 09:37:53 -0700164 shared_libs: [
165 "liblog",
166 "libutils",
167 ],
168
169 static_libs: [
170 "libc_malloc_debug_backtrace",
171 ],
172
173 header_libs: [
174 "bionic_libc_platform_headers",
175 ],
176
177 local_include_dirs: ["include"],
178 export_include_dirs: ["include"],
179}