Wei Wang | f72cfad | 2017-10-26 22:41:03 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2017 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: "libperfmgr_defaults", |
| 19 | local_include_dirs: ["include"], |
| 20 | shared_libs: [ |
| 21 | "libbase", |
| 22 | "libutils", |
| 23 | ], |
| 24 | static_libs: [ |
| 25 | "libjsoncpp", |
| 26 | ], |
Wei Wang | f72cfad | 2017-10-26 22:41:03 -0700 | [diff] [blame] | 27 | cflags: [ |
| 28 | "-Wall", |
| 29 | "-Werror", |
Wei Wang | c43c2c0 | 2018-10-23 22:44:31 -0700 | [diff] [blame] | 30 | ], |
| 31 | tidy: true, |
| 32 | tidy_checks: [ |
| 33 | "android-*", |
| 34 | "cert-*", |
| 35 | "clang-analyzer-security*", |
| 36 | ], |
| 37 | tidy_flags: [ |
| 38 | "-warnings-as-errors=android-*,clang-analyzer-security*,cert-*" |
| 39 | ], |
Wei Wang | f72cfad | 2017-10-26 22:41:03 -0700 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | cc_library { |
| 43 | name: "libperfmgr", |
| 44 | vendor_available: true, |
| 45 | defaults: ["libperfmgr_defaults"], |
| 46 | export_include_dirs: ["include"], |
| 47 | srcs: [ |
| 48 | "RequestGroup.cc", |
| 49 | "Node.cc", |
Wei Wang | a482319 | 2018-10-19 21:57:04 -0700 | [diff] [blame] | 50 | "FileNode.cc", |
| 51 | "PropertyNode.cc", |
Wei Wang | f72cfad | 2017-10-26 22:41:03 -0700 | [diff] [blame] | 52 | "NodeLooperThread.cc", |
| 53 | "HintManager.cc", |
| 54 | ] |
| 55 | } |
| 56 | |
| 57 | cc_test { |
| 58 | name: "libperfmgr_test", |
| 59 | defaults: ["libperfmgr_defaults"], |
| 60 | static_libs: ["libperfmgr"], |
| 61 | srcs: [ |
| 62 | "tests/RequestGroupTest.cc", |
Wei Wang | a482319 | 2018-10-19 21:57:04 -0700 | [diff] [blame] | 63 | "tests/FileNodeTest.cc", |
| 64 | "tests/PropertyNodeTest.cc", |
Wei Wang | f72cfad | 2017-10-26 22:41:03 -0700 | [diff] [blame] | 65 | "tests/NodeLooperThreadTest.cc", |
| 66 | "tests/HintManagerTest.cc", |
| 67 | ] |
| 68 | } |
Wei Wang | 90fc4d4 | 2018-01-25 14:45:33 -0800 | [diff] [blame] | 69 | |
| 70 | cc_binary { |
| 71 | name: "perfmgr_config_verifier", |
| 72 | defaults: ["libperfmgr_defaults"], |
| 73 | static_libs: ["libperfmgr"], |
| 74 | srcs: [ |
| 75 | "tools/ConfigVerifier.cc", |
| 76 | ] |
| 77 | } |