• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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.
13import("//build/ohos.gni")
14import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
15
16ohos_shared_library("libthermal_interface_service_1.0") {
17  include_dirs = [
18    "//developtools/hiperf/include",
19    "//drivers/hdf_core/adapter/uhdf2/shared/include",
20    "//third_party/libxml2/include",
21    "include",
22  ]
23  sources = [
24    "src/base_info_config.cpp",
25    "src/sensor_info_config.cpp",
26    "src/thermal_device_mitigation.cpp",
27    "src/thermal_dfx.cpp",
28    "src/thermal_hdf_config.cpp",
29    "src/thermal_hdf_timer.cpp",
30    "src/thermal_interface_impl.cpp",
31    "src/thermal_simulation_node.cpp",
32    "src/thermal_zone_manager.cpp",
33  ]
34
35  deps = [
36    "//drivers/interface/thermal/v1_0:thermal_idl_headers",
37    "//third_party/libxml2:xml2",
38    "//third_party/zlib:libz",
39  ]
40
41  if (is_standard_system) {
42    external_deps = [
43      "c_utils:utils",
44      "drivers_interface_thermal:thermal_idl_headers",
45      "hdf_core:libhdf_utils",
46      "hiviewdfx_hilog_native:libhilog",
47      "init:libbeget_proxy",
48      "ipc:ipc_single",
49    ]
50  } else {
51    external_deps = [
52      "hilog:libhilog",
53      "init_lite:libbegetutil",
54      "ipc:ipc_single",
55    ]
56  }
57
58  install_images = [ chipset_base_dir ]
59  subsystem_name = "hdf"
60  part_name = "drivers_peripheral_thermal"
61}
62
63##############################################################################################
64
65ohos_shared_library("libthermal_driver") {
66  include_dirs = [ "include" ]
67  sources = [ "src/thermal_interface_driver.cpp" ]
68
69  deps = [ "//drivers/interface/thermal/v1_0:libthermal_stub_1.0" ]
70
71  if (is_standard_system) {
72    external_deps = [
73      "c_utils:utils",
74      "hdf_core:libhdf_host",
75      "hdf_core:libhdf_ipc_adapter",
76      "hdf_core:libhdi",
77      "hiviewdfx_hilog_native:libhilog",
78      "ipc:ipc_single",
79    ]
80  } else {
81    external_deps = [
82      "hilog:libhilog",
83      "ipc:ipc_single",
84    ]
85  }
86
87  install_images = [ chipset_base_dir ]
88  subsystem_name = "hdf"
89  part_name = "drivers_peripheral_thermal"
90}
91
92group("hdf_thermal") {
93  deps = [
94    ":libthermal_driver",
95    ":libthermal_interface_service_1.0",
96    "profile:thermal_hdf_config",
97  ]
98}
99