• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 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("//base/powermgr/thermal_manager/thermalmgr.gni")
15import("//build/ohos.gni")
16
17config("thermal_protector_private_config") {
18  include_dirs = [
19    "//utils/native/base/include/",
20    "//drivers/framework/include/",
21  ]
22}
23
24config("thermal_protector_public_config") {
25  include_dirs = [
26    "include",
27    "include/policy",
28    "include/action",
29  ]
30}
31
32ohos_executable("thermal_protector") {
33  sources = [
34    "src/action/cpu_action.cpp",
35    "src/action/current_action.cpp",
36    "src/action/device_control_factory.cpp",
37    "src/action/thermal_device_control.cpp",
38    "src/action/voltage_action.cpp",
39    "src/main.cpp",
40    "src/policy/protector_thermal_zone_info.cpp",
41    "src/policy/thermal_kernel_config_file.cpp",
42    "src/policy/thermal_kernel_policy.cpp",
43    "src/thermal_kernel_service.cpp",
44    "src/thermal_protector_timer.cpp",
45    "src/thermal_protector_utils.cpp",
46    "src/thermal_sensor_provision.cpp",
47  ]
48
49  public_configs = [ ":thermal_protector_public_config" ]
50
51  configs = [
52    "${utils_path}:utils_config",
53    ":thermal_protector_private_config",
54  ]
55
56  include_dirs = [ "//third_party/libxml2/include" ]
57
58  deps = [
59    "//drivers/adapter/uhdf2/host:libhdf_host",
60    "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter",
61    "//drivers/adapter/uhdf2/utils:libhdf_utils",
62    "//third_party/libxml2:xml2",
63    "//utils/native/base:utils",
64  ]
65
66  external_deps = [
67    "hiviewdfx_hilog_native:libhilog",
68    "ipc:ipc_core",
69  ]
70
71  install_enable = true
72  part_name = "thermal_manager"
73  subsystem_name = "powermgr"
74}
75
76group("thermal_protector_group") {
77  deps = [
78    ":thermal_protector",
79    "profile:thermal_kernel_config",
80  ]
81}
82