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    ]
63}
64
65cc_test {
66    name: "libperfmgr_test",
67    defaults: ["libperfmgr_defaults"],
68    static_libs: ["libperfmgr", "libgmock" ],
69    srcs: [
70        "tests/RequestGroupTest.cc",
71        "tests/FileNodeTest.cc",
72        "tests/PropertyNodeTest.cc",
73        "tests/NodeLooperThreadTest.cc",
74        "tests/HintManagerTest.cc",
75    ],
76    test_suites: ["device-tests"],
77    require_root: true,
78}
79
80cc_binary {
81    name: "perfmgr_config_verifier",
82    defaults: ["libperfmgr_defaults"],
83    static_libs: ["libperfmgr"],
84    srcs: [
85        "tools/ConfigVerifier.cc",
86    ]
87}
88