1# Copyright (c) 2022-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. 13import("//build/ohos.gni") 14import("../../../../hdf_core/adapter/uhdf2/uhdf.gni") 15 16ohos_shared_library("libthermal_interface_service_1.1") { 17 include_dirs = [ 18 "../../../../../hiperf/include", 19 "//third_party/libxml2/include", 20 "include", 21 ] 22 sources = [ 23 "src/base_info_config.cpp", 24 "src/isolate_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_hdf_utils.cpp", 31 "src/thermal_interface_impl.cpp", 32 "src/thermal_simulation_node.cpp", 33 "src/thermal_zone_manager.cpp", 34 ] 35 36 deps = [ 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 "config_policy:configpolicy_util", 45 "drivers_interface_thermal:thermal_idl_headers", 46 "hdf_core:libhdf_utils", 47 "hilog:libhilog", 48 "init:libbeget_proxy", 49 "init:libbegetutil", 50 "ipc:ipc_single", 51 ] 52 } else { 53 external_deps = [ 54 "hilog:libhilog", 55 "init_lite:libbegetutil", 56 "ipc:ipc_single", 57 ] 58 } 59 60 install_images = [ chipset_base_dir ] 61 subsystem_name = "hdf" 62 part_name = "drivers_peripheral_thermal" 63} 64 65############################################################################################## 66 67ohos_shared_library("libthermal_driver") { 68 include_dirs = [ "include" ] 69 sources = [ "src/thermal_interface_driver.cpp" ] 70 71 if (is_standard_system) { 72 external_deps = [ 73 "c_utils:utils", 74 "drivers_interface_thermal:libthermal_stub_1.1", 75 "hdf_core:libhdf_host", 76 "hdf_core:libhdf_ipc_adapter", 77 "hdf_core:libhdf_utils", 78 "hdf_core:libhdi", 79 "hilog:libhilog", 80 "ipc:ipc_single", 81 ] 82 } else { 83 external_deps = [ 84 "hilog:libhilog", 85 "ipc:ipc_single", 86 ] 87 } 88 89 shlib_type = "hdi" 90 install_images = [ chipset_base_dir ] 91 subsystem_name = "hdf" 92 part_name = "drivers_peripheral_thermal" 93} 94 95group("hdf_thermal") { 96 deps = [ 97 ":libthermal_driver", 98 ":libthermal_interface_service_1.1", 99 "profile:thermal_hdf_config", 100 ] 101} 102