1//
2// Copyright (C) 2019 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20cc_defaults {
21    name: "dmabufinfo_defaults",
22    static_libs: [
23        "libbase",
24        "libprocinfo",
25    ],
26    shared_libs: [
27        "liblog",
28    ],
29
30    cflags: [
31        "-Wall",
32        "-Werror",
33        "-Wextra",
34    ],
35}
36
37cc_library_static {
38    name: "libdmabufinfo",
39    vendor_available: true,
40    product_available: true,
41    host_supported: true,
42    native_bridge_supported: true,
43    defaults: ["dmabufinfo_defaults"],
44    export_include_dirs: ["include"],
45    srcs: [
46         "dmabufinfo.cpp",
47         "dmabuf_sysfs_stats.cpp",
48    ],
49    target: {
50        darwin: {
51            enabled: false,
52        },
53    },
54
55    apex_available: [
56        "//apex_available:platform",
57        "com.android.art",
58        "com.android.art.debug",
59    ],
60    min_sdk_version: "S",
61}
62
63cc_test {
64    name: "dmabufinfo_test",
65    defaults: ["dmabufinfo_defaults"],
66    srcs: [
67         "dmabufinfo_test.cpp"
68    ],
69
70    static_libs: [
71        "libc++fs",
72        "libdmabufinfo",
73        "libion",
74        "libmeminfo",
75    ],
76
77    shared_libs: [
78        "libcutils",
79    ],
80    test_suites: ["device-tests"],
81    require_root: true,
82}
83