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 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_defaults { 22 name: "libperfmgr_defaults", 23 local_include_dirs: ["include"], 24 shared_libs: [ 25 "libbase", 26 "libcutils", 27 "libutils", 28 ], 29 static_libs: [ 30 "libjsoncpp", 31 ], 32 cflags: [ 33 "-Wall", 34 "-Werror", 35 ], 36 tidy: true, 37 tidy_checks: [ 38 "android-*", 39 "cert-*", 40 "clang-analyzer-security*", 41 ], 42 tidy_checks_as_errors: [ 43 "android-*", 44 "clang-analyzer-security*", 45 "cert-*", 46 ], 47} 48 49cc_library { 50 name: "libperfmgr", 51 vendor_available: true, 52 defaults: ["libperfmgr_defaults"], 53 export_include_dirs: ["include"], 54 srcs: [ 55 "RequestGroup.cc", 56 "Node.cc", 57 "FileNode.cc", 58 "PropertyNode.cc", 59 "NodeLooperThread.cc", 60 "HintManager.cc", 61 "AdpfConfig.cc", 62 "EventNode.cc", 63 ], 64} 65 66cc_test { 67 name: "libperfmgr_test", 68 defaults: ["libperfmgr_defaults"], 69 static_libs: [ 70 "libperfmgr", 71 "libgmock", 72 ], 73 srcs: [ 74 "tests/RequestGroupTest.cc", 75 "tests/FileNodeTest.cc", 76 "tests/PropertyNodeTest.cc", 77 "tests/NodeLooperThreadTest.cc", 78 "tests/HintManagerTest.cc", 79 "tests/EventNodeTest.cc", 80 ], 81 test_suites: [ 82 "device-tests", 83 "device-pixel-tests", 84 ], 85 require_root: true, 86} 87 88cc_binary { 89 name: "perfmgr_config_verifier", 90 defaults: ["libperfmgr_defaults"], 91 static_libs: ["libperfmgr"], 92 srcs: [ 93 "tools/ConfigVerifier.cc", 94 ], 95} 96