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 15package { 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 24cc_defaults { 25 name: "libmediautils_defaults", 26 cflags: [ 27 "-Wall", 28 "-Werror", 29 "-Wextra", 30 ], 31 sanitize: { 32 cfi: true, 33 integer_overflow: true, 34 }, 35 target: { 36 host: { 37 sanitize: { 38 cfi: false, 39 }, 40 }, 41 }, 42} 43 44filegroup { 45 name: "libmediautils_core_srcs", 46 srcs: [ 47 "AImageReaderUtils.cpp", 48 "BatteryNotifier.cpp", 49 "ISchedulingPolicyService.cpp", 50 "Library.cpp", 51 "MediaUtilsDelayed.cpp", 52 "MethodStatistics.cpp", 53 "Process.cpp", 54 "ProcessInfo.cpp", 55 "SchedulingPolicyService.cpp", 56 "ServiceSingleton.cpp", 57 "ServiceUtilities.cpp", 58 "ThreadSnapshot.cpp", 59 "TimeCheck.cpp", 60 "TimerThread.cpp", 61 ], 62} 63 64cc_library_headers { 65 name: "libmediautils_headers", 66 host_supported: true, 67 vendor_available: true, // required for platform/hardware/interfaces 68 shared_libs: [ 69 "liblog", 70 ], 71 local_include_dirs: ["include"], 72 export_include_dirs: ["include"], 73} 74 75 76cc_library { 77 name: "libmediautils", 78 host_supported: true, 79 defaults: ["libmediautils_defaults"], 80 srcs: [ 81 ":libmediautils_core_srcs", 82 ], 83 static_libs: [ 84 "libbatterystats_aidl", 85 "libprocessinfoservice_aidl", 86 ], 87 shared_libs: [ 88 "com.android.media.audio-aconfig-cc", 89 "libaudioclient_aidl_conversion", 90 "libaudioutils", // for clock.h, Statistics.h 91 "libbase", 92 "libbinder", 93 "libbinder_ndk", 94 "libcutils", 95 "libhidlbase", 96 "liblog", 97 "libpermission", 98 "libutils", 99 "[email protected]", 100 "[email protected]", 101 "packagemanager_aidl-cpp", 102 ], 103 export_static_lib_headers: [ 104 "libbatterystats_aidl", 105 ], 106 107 logtags: ["EventLogTags.logtags"], 108 109 cflags: [ 110 "-Wall", 111 "-Wextra", 112 "-Werror", 113 "-Wthread-safety", 114 ], 115 116 export_shared_lib_headers: [ 117 "libaudioutils", 118 "libbinder_ndk", 119 "libpermission", 120 "packagemanager_aidl-cpp", 121 ], 122 123 required: [ 124 "libmediautils_delayed", // lazy loaded 125 ], 126 127 target: { 128 android: { 129 srcs: [ 130 "LimitProcessMemory.cpp", 131 "MemoryLeakTrackUtil.cpp", 132 ], 133 static_libs: [ 134 "libc_malloc_debug_backtrace", 135 ], 136 include_dirs: [ 137 // For DEBUGGER_SIGNAL 138 "system/core/debuggerd/include", 139 ], 140 header_libs: [ 141 "bionic_libc_platform_headers", 142 ], 143 }, 144 }, 145 146 local_include_dirs: ["include"], 147 export_include_dirs: ["include"], 148} 149 150cc_library { 151 name: "libmediautils_delayed", // match with MEDIAUTILS_DELAYED_LIBRARY_NAME 152 host_supported: true, 153 defaults: ["libmediautils_defaults"], 154 srcs: [ 155 "MediaUtilsDelayedLibrary.cpp", 156 ], 157 shared_libs: [ 158 "liblog", 159 "libutils", 160 "libutilscallstack", 161 ], 162} 163 164cc_library { 165 name: "libmediautils_vendor", 166 defaults: ["libmediautils_defaults"], 167 vendor_available: true, // required for platform/hardware/interfaces 168 srcs: [ 169 "MemoryLeakTrackUtil.cpp", 170 ], 171 172 shared_libs: [ 173 "liblog", 174 "libutils", 175 ], 176 177 static_libs: [ 178 "libc_malloc_debug_backtrace", 179 ], 180 181 header_libs: [ 182 "bionic_libc_platform_headers", 183 ], 184 185 local_include_dirs: ["include"], 186 export_include_dirs: ["include"], 187} 188 189cc_library_headers { 190 name: "mediautils_headers", 191 export_include_dirs: ["include", "."], 192} 193