Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 1 | // 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 Badour | 56786ac | 2021-02-25 15:24:36 -0800 | [diff] [blame] | 15 | package { |
| 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 Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame^] | 24 | cc_defaults { |
| 25 | name: "libmediautils_defaults", |
| 26 | cflags: [ |
| 27 | "-Wall", |
| 28 | "-Werror", |
| 29 | "-Wextra", |
| 30 | ], |
| 31 | } |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 32 | |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame^] | 33 | filegroup { |
| 34 | name: "libmediautils_core_srcs", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 35 | srcs: [ |
Jayant Chowdhary | 32b4f49 | 2018-11-14 18:38:21 -0800 | [diff] [blame] | 36 | "AImageReaderUtils.cpp", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 37 | "ISchedulingPolicyService.cpp", |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 38 | "Library.cpp", |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 39 | "MediaUtilsDelayed.cpp", |
Andy Hung | 224f82f | 2022-03-22 00:00:49 -0700 | [diff] [blame] | 40 | "MethodStatistics.cpp", |
Andy Hung | afc51db | 2022-04-08 17:33:40 -0700 | [diff] [blame] | 41 | "Process.cpp", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 42 | "SchedulingPolicyService.cpp", |
Andy Hung | 44d648b | 2022-04-08 17:33:40 -0700 | [diff] [blame] | 43 | "ThreadSnapshot.cpp", |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame^] | 44 | ], |
| 45 | } |
| 46 | |
| 47 | cc_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 | |
| 58 | cc_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 | |
| 84 | cc_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 Laurent | 39b09b5 | 2018-06-29 12:24:40 -0700 | [diff] [blame] | 94 | "TimeCheck.cpp", |
Ytai Ben-Tsvi | 1ea62c9 | 2021-11-10 14:38:27 -0800 | [diff] [blame] | 95 | "TimerThread.cpp", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 96 | ], |
Colin Cross | d8e3af0 | 2019-05-17 13:28:13 -0700 | [diff] [blame] | 97 | static_libs: [ |
| 98 | "libc_malloc_debug_backtrace", |
Steven Moreland | 3696000 | 2021-04-01 00:08:45 +0000 | [diff] [blame] | 99 | "libbatterystats_aidl", |
Steven Moreland | 886d732 | 2021-04-02 04:19:45 +0000 | [diff] [blame] | 100 | "libprocessinfoservice_aidl", |
Colin Cross | d8e3af0 | 2019-05-17 13:28:13 -0700 | [diff] [blame] | 101 | ], |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 102 | shared_libs: [ |
Philip P. Moltmann | bda4575 | 2020-07-17 16:41:18 -0700 | [diff] [blame] | 103 | "libaudioclient_aidl_conversion", |
Andy Hung | c747c53 | 2022-03-07 21:41:14 -0800 | [diff] [blame] | 104 | "libaudioutils", // for clock.h, Statistics.h |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame^] | 105 | "libbase", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 106 | "libbinder", |
Jeffrey Carlyle | 62cc92b | 2019-09-17 11:15:15 -0700 | [diff] [blame] | 107 | "libcutils", |
Jayant Chowdhary | 32b4f49 | 2018-11-14 18:38:21 -0800 | [diff] [blame] | 108 | "libhidlbase", |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame^] | 109 | "liblog", |
Svet Ganov | 3376113 | 2021-05-13 22:51:08 +0000 | [diff] [blame] | 110 | "libpermission", |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame^] | 111 | "libutils", |
Jayant Chowdhary | 32b4f49 | 2018-11-14 18:38:21 -0800 | [diff] [blame] | 112 | "android.hardware.graphics.bufferqueue@1.0", |
| 113 | "android.hidl.token@1.0-utils", |
Samiul Islam | acb722d | 2021-08-26 11:41:21 +0100 | [diff] [blame] | 114 | "packagemanager_aidl-cpp", |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 115 | ], |
Steven Moreland | 3696000 | 2021-04-01 00:08:45 +0000 | [diff] [blame] | 116 | export_static_lib_headers: [ |
| 117 | "libbatterystats_aidl", |
| 118 | ], |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 119 | |
Eric Laurent | 39b09b5 | 2018-06-29 12:24:40 -0700 | [diff] [blame] | 120 | logtags: ["EventLogTags.logtags"], |
| 121 | |
Christopher Ferris | 9d2e008 | 2019-09-11 19:08:13 -0700 | [diff] [blame] | 122 | header_libs: [ |
| 123 | "bionic_libc_platform_headers", |
Marco Nelissen | 6b28594 | 2019-10-21 14:52:30 -0700 | [diff] [blame] | 124 | "libmedia_headers", |
Christopher Ferris | a90adf0 | 2019-04-17 13:26:15 -0700 | [diff] [blame] | 125 | ], |
Christopher Ferris | 9d2e008 | 2019-09-11 19:08:13 -0700 | [diff] [blame] | 126 | |
Philip P. Moltmann | bda4575 | 2020-07-17 16:41:18 -0700 | [diff] [blame] | 127 | export_shared_lib_headers: [ |
Svet Ganov | 3376113 | 2021-05-13 22:51:08 +0000 | [diff] [blame] | 128 | "libpermission", |
Philip P. Moltmann | bda4575 | 2020-07-17 16:41:18 -0700 | [diff] [blame] | 129 | ], |
| 130 | |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 131 | required: [ |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame^] | 132 | "libmediautils_delayed", // lazy loaded |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 133 | ], |
| 134 | |
Eric Laurent | 42896a0 | 2019-09-27 15:40:33 -0700 | [diff] [blame] | 135 | include_dirs: [ |
| 136 | // For DEBUGGER_SIGNAL |
| 137 | "system/core/debuggerd/include", |
| 138 | ], |
Steven Moreland | 22ee460 | 2017-04-07 10:44:52 -0700 | [diff] [blame] | 139 | local_include_dirs: ["include"], |
| 140 | export_include_dirs: ["include"], |
| 141 | } |
Andy Hung | 328d677 | 2021-01-12 12:32:21 -0800 | [diff] [blame] | 142 | |
Andy Hung | 61589a4 | 2021-06-16 09:37:53 -0700 | [diff] [blame] | 143 | cc_library { |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 144 | name: "libmediautils_delayed", // match with MEDIAUTILS_DELAYED_LIBRARY_NAME |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame^] | 145 | defaults: ["libmediautils_defaults"], |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 146 | srcs: [ |
| 147 | "MediaUtilsDelayedLibrary.cpp", |
| 148 | ], |
Andy Hung | d426582 | 2022-04-01 18:54:32 -0700 | [diff] [blame] | 149 | shared_libs: [ |
| 150 | "liblog", |
| 151 | "libutils", |
| 152 | "libutilscallstack", |
| 153 | ], |
| 154 | } |
| 155 | |
| 156 | cc_library { |
Andy Hung | 61589a4 | 2021-06-16 09:37:53 -0700 | [diff] [blame] | 157 | name: "libmediautils_vendor", |
Atneya Nair | 7795f5f | 2022-05-23 13:44:00 -0400 | [diff] [blame^] | 158 | defaults: ["libmediautils_defaults"], |
| 159 | vendor_available: true, // required for platform/hardware/interfaces |
Andy Hung | 61589a4 | 2021-06-16 09:37:53 -0700 | [diff] [blame] | 160 | srcs: [ |
| 161 | "MemoryLeakTrackUtil.cpp", |
| 162 | ], |
| 163 | |
Andy Hung | 61589a4 | 2021-06-16 09:37:53 -0700 | [diff] [blame] | 164 | 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 | } |