• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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        "ServiceUtilities.cpp",
57        "ThreadSnapshot.cpp",
58        "TimeCheck.cpp",
59        "TimerThread.cpp",
60    ],
61}
62
63cc_library_headers {
64    name: "libmediautils_headers",
65    host_supported: true,
66    vendor_available: true, // required for platform/hardware/interfaces
67    shared_libs: [
68        "liblog",
69    ],
70    local_include_dirs: ["include"],
71    export_include_dirs: ["include"],
72}
73
74
75cc_library {
76    name: "libmediautils",
77    host_supported: true,
78    defaults: ["libmediautils_defaults"],
79    srcs: [
80        ":libmediautils_core_srcs",
81    ],
82    static_libs: [
83        "libbatterystats_aidl",
84        "libprocessinfoservice_aidl",
85    ],
86    shared_libs: [
87        "com.android.media.audio-aconfig-cc",
88        "libaudioclient_aidl_conversion",
89        "libaudioutils", // for clock.h, Statistics.h
90        "libbase",
91        "libbinder",
92        "libcutils",
93        "libhidlbase",
94        "liblog",
95        "libpermission",
96        "libutils",
97        "android.hardware.graphics.bufferqueue@1.0",
98        "android.hidl.token@1.0-utils",
99        "packagemanager_aidl-cpp",
100    ],
101    export_static_lib_headers: [
102        "libbatterystats_aidl",
103    ],
104
105    logtags: ["EventLogTags.logtags"],
106
107    cflags: [
108        "-Wall",
109        "-Wextra",
110        "-Werror",
111        "-Wthread-safety",
112    ],
113
114    export_shared_lib_headers: [
115        "libpermission",
116        "packagemanager_aidl-cpp",
117    ],
118
119    required: [
120        "libmediautils_delayed", // lazy loaded
121    ],
122
123    target: {
124        android: {
125            srcs: [
126                "LimitProcessMemory.cpp",
127                "MemoryLeakTrackUtil.cpp",
128            ],
129            static_libs: [
130                "libc_malloc_debug_backtrace",
131            ],
132            include_dirs: [
133                // For DEBUGGER_SIGNAL
134                "system/core/debuggerd/include",
135            ],
136            header_libs: [
137                "bionic_libc_platform_headers",
138            ],
139        },
140    },
141
142    local_include_dirs: ["include"],
143    export_include_dirs: ["include"],
144}
145
146cc_library {
147    name: "libmediautils_delayed", // match with MEDIAUTILS_DELAYED_LIBRARY_NAME
148    host_supported: true,
149    defaults: ["libmediautils_defaults"],
150    srcs: [
151        "MediaUtilsDelayedLibrary.cpp",
152    ],
153    shared_libs: [
154        "liblog",
155        "libutils",
156        "libutilscallstack",
157    ],
158}
159
160cc_library {
161    name: "libmediautils_vendor",
162    defaults: ["libmediautils_defaults"],
163    vendor_available: true, // required for platform/hardware/interfaces
164    srcs: [
165        "MemoryLeakTrackUtil.cpp",
166    ],
167
168    shared_libs: [
169        "liblog",
170        "libutils",
171    ],
172
173    static_libs: [
174        "libc_malloc_debug_backtrace",
175    ],
176
177    header_libs: [
178        "bionic_libc_platform_headers",
179    ],
180
181    local_include_dirs: ["include"],
182    export_include_dirs: ["include"],
183}
184
185cc_library_headers {
186    name: "mediautils_headers",
187    export_include_dirs: ["include", "."],
188}
189