Sandeep Patil | 54d8721 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 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 | |
| 17 | cc_defaults { |
| 18 | name: "libmeminfo_defaults", |
| 19 | cflags: [ |
| 20 | "-Wall", |
| 21 | "-Werror", |
| 22 | ], |
| 23 | |
| 24 | shared_libs: [ |
| 25 | "libbase", |
| 26 | "liblog", |
| 27 | "libprocinfo", |
| 28 | ], |
| 29 | } |
| 30 | |
| 31 | cc_library { |
| 32 | name: "libmeminfo", |
| 33 | defaults: ["libmeminfo_defaults"], |
| 34 | export_include_dirs: ["include"], |
| 35 | export_shared_lib_headers: ["libbase"], |
| 36 | srcs: [ |
| 37 | "pageacct.cpp", |
| 38 | "procmeminfo.cpp", |
| 39 | "sysmeminfo.cpp", |
| 40 | ], |
| 41 | } |
| 42 | |
| 43 | cc_test { |
| 44 | name: "libmeminfo_test", |
| 45 | defaults: ["libmeminfo_defaults"], |
| 46 | |
| 47 | static_libs: [ |
| 48 | "libmeminfo", |
Sandeep Patil | 54d8721 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 49 | "libbase", |
| 50 | "liblog", |
| 51 | ], |
| 52 | |
| 53 | srcs: [ |
| 54 | "libmeminfo_test.cpp" |
| 55 | ], |
Sandeep Patil | 70fa72d | 2018-11-09 19:18:29 -0800 | [diff] [blame] | 56 | |
| 57 | data: [ |
| 58 | "testdata1/*", |
| 59 | "testdata2/*" |
| 60 | ], |
Sandeep Patil | 54d8721 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | cc_benchmark { |
| 64 | name: "libmeminfo_benchmark", |
| 65 | srcs: [ |
| 66 | "libmeminfo_benchmark.cpp", |
| 67 | ], |
| 68 | static_libs : [ |
| 69 | "libbase", |
| 70 | "liblog", |
| 71 | "libmeminfo", |
| 72 | "libprocinfo", |
| 73 | ], |
Sandeep Patil | 70fa72d | 2018-11-09 19:18:29 -0800 | [diff] [blame] | 74 | |
| 75 | data: [ |
| 76 | "testdata1/*", |
| 77 | ], |
Sandeep Patil | 54d8721 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 78 | } |