1//
2// Copyright (C) 2018 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//
16
17cc_defaults {
18    name: "libmeminfo_defaults",
19    cflags: [
20        "-Wall",
21        "-Werror",
22    ],
23
24    shared_libs: [
25        "libbase",
26        "liblog",
27        "libprocinfo",
28    ],
29    static_libs: [
30        "libdmabufinfo",
31    ],
32    target: {
33        darwin: {
34            enabled: false,
35        },
36
37    },
38}
39
40cc_library {
41    name: "libmeminfo",
42    host_supported: true,
43    native_bridge_supported: true,
44    defaults: ["libmeminfo_defaults"],
45    export_include_dirs: [
46        "include",
47        "libdmabufinfo/include",
48    ],
49    export_shared_lib_headers: ["libbase"],
50    srcs: [
51        "pageacct.cpp",
52        "procmeminfo.cpp",
53        "sysmeminfo.cpp",
54    ],
55
56    apex_available: [
57        "//apex_available:platform",
58        "com.android.art.release",
59        "com.android.art.debug",
60    ],
61}
62
63cc_test {
64    name: "libmeminfo_test",
65    test_suites: ["device-tests"],
66    defaults: ["libmeminfo_defaults"],
67    require_root: true,
68
69    static_libs: [
70        "libmeminfo",
71        "libbase",
72        "liblog",
73    ],
74
75    srcs: [
76        "libmeminfo_test.cpp"
77    ],
78
79    data: [
80        "testdata1/*",
81        "testdata2/*"
82    ],
83}
84
85cc_benchmark {
86    name: "libmeminfo_benchmark",
87    srcs: [
88        "libmeminfo_benchmark.cpp",
89    ],
90    static_libs : [
91        "libbase",
92        "liblog",
93        "libmeminfo",
94        "libprocinfo",
95    ],
96
97    data: [
98        "testdata1/*",
99    ],
100}
101