• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021-2023 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("../../thermalmgr.gni")
15
16config("thermal_protector_public_config") {
17  include_dirs = [
18    "include",
19    "include/policy",
20    "include/action",
21  ]
22}
23
24ohos_executable("thermal_protector") {
25  sources = [
26    "src/action/cpu_action.cpp",
27    "src/action/current_action.cpp",
28    "src/action/device_control_factory.cpp",
29    "src/action/thermal_device_control.cpp",
30    "src/action/voltage_action.cpp",
31    "src/main.cpp",
32    "src/policy/protector_thermal_zone_info.cpp",
33    "src/policy/thermal_kernel_config_file.cpp",
34    "src/policy/thermal_kernel_policy.cpp",
35    "src/thermal_kernel_service.cpp",
36    "src/thermal_protector_timer.cpp",
37    "src/thermal_protector_utils.cpp",
38    "src/thermal_sensor_provision.cpp",
39  ]
40
41  public_configs = [ ":thermal_protector_public_config" ]
42
43  configs = [
44    "${utils_path}:utils_config",
45    "${utils_path}:coverage_flags",
46  ]
47
48  deps = [
49    "${utils_path}:thermal_utils",
50    "//third_party/libxml2:xml2",
51  ]
52
53  external_deps = [
54    "c_utils:utils",
55    "config_policy:configpolicy_util",
56    "hilog:libhilog",
57  ]
58
59  install_enable = true
60  part_name = "thermal_manager"
61  subsystem_name = "powermgr"
62}
63
64group("thermal_protector_group") {
65  deps = [
66    ":thermal_protector",
67    "profile:thermal_kernel_config",
68  ]
69}
70