blob: 6f262b5a830d28309a792a116f7c1cce2d5f2a81 [file] [log] [blame]
Sandeep Patila60a7762018-08-29 17:10:47 -07001//
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 ],
Suren Baghdasaryan3d40e5f2019-11-17 14:24:39 -080029 static_libs: [
30 "libdmabufinfo",
31 ],
Colin Cross9a35a1b2019-07-18 16:25:15 -070032 target: {
33 darwin: {
34 enabled: false,
35 },
36
37 },
Sandeep Patila60a7762018-08-29 17:10:47 -070038}
39
40cc_library {
41 name: "libmeminfo",
Mathieu Chartierc9ccdde2019-07-16 17:21:10 -070042 host_supported: true,
Victor Khimenkodc0343e2020-06-30 23:27:46 +020043 native_bridge_supported: true,
Sandeep Patila60a7762018-08-29 17:10:47 -070044 defaults: ["libmeminfo_defaults"],
Suren Baghdasaryan3d40e5f2019-11-17 14:24:39 -080045 export_include_dirs: [
46 "include",
47 "libdmabufinfo/include",
48 ],
Sandeep Patila60a7762018-08-29 17:10:47 -070049 export_shared_lib_headers: ["libbase"],
50 srcs: [
51 "pageacct.cpp",
52 "procmeminfo.cpp",
53 "sysmeminfo.cpp",
54 ],
Jiyong Park133b6292020-04-29 17:43:14 +090055
56 apex_available: [
57 "//apex_available:platform",
58 "com.android.art.release",
59 "com.android.art.debug",
60 ],
Sandeep Patila60a7762018-08-29 17:10:47 -070061}
62
63cc_test {
64 name: "libmeminfo_test",
Suren Baghdasaryan480ae202020-01-10 14:37:21 -080065 test_suites: ["device-tests"],
Sandeep Patila60a7762018-08-29 17:10:47 -070066 defaults: ["libmeminfo_defaults"],
Suren Baghdasaryan480ae202020-01-10 14:37:21 -080067 require_root: true,
Sandeep Patila60a7762018-08-29 17:10:47 -070068
69 static_libs: [
70 "libmeminfo",
Sandeep Patila60a7762018-08-29 17:10:47 -070071 "libbase",
72 "liblog",
73 ],
74
75 srcs: [
76 "libmeminfo_test.cpp"
77 ],
Sandeep Patil9f4028d2018-11-09 19:18:29 -080078
79 data: [
80 "testdata1/*",
81 "testdata2/*"
82 ],
Sandeep Patila60a7762018-08-29 17:10:47 -070083}
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 ],
Sandeep Patil9f4028d2018-11-09 19:18:29 -080096
97 data: [
98 "testdata1/*",
99 ],
Sandeep Patila60a7762018-08-29 17:10:47 -0700100}