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/adapter/uhdf2/uhdf.gni") 15 16ohos_shared_library("libthermal_interface_service_1.0") { 17 include_dirs = [ 18 "//drivers/adapter/uhdf2/shared/include", 19 "//drivers/peripheral/thermal/interfaces/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_hdf_config.cpp", 28 "src/thermal_hdf_timer.cpp", 29 "src/thermal_interface_impl.cpp", 30 "src/thermal_simulation_node.cpp", 31 "src/thermal_zone_manager.cpp", 32 ] 33 34 deps = [ 35 "//drivers/interface/thermal/v1_0:libthermal_stub_1.0", 36 "//third_party/libxml2:xml2", 37 ] 38 39 if (is_standard_system) { 40 external_deps = [ 41 "device_driver_framework:libhdf_utils", 42 "hiviewdfx_hilog_native:libhilog", 43 "ipc:ipc_single", 44 "utils_base:utils", 45 ] 46 } else { 47 external_deps = [ 48 "hilog:libhilog", 49 "ipc:ipc_single", 50 ] 51 } 52 53 install_images = [ chipset_base_dir ] 54 subsystem_name = "hdf" 55 part_name = "thermal_device_driver" 56} 57 58############################################################################################## 59 60ohos_shared_library("libthermal_driver") { 61 include_dirs = [ 62 "//drivers/peripheral/thermal/interfaces/include/", 63 "include", 64 ] 65 sources = [ "src/thermal_interface_driver.cpp" ] 66 67 deps = [ 68 "//drivers/interface/thermal/v1_0:libthermal_stub_1.0", 69 "//drivers/peripheral/thermal/interfaces/hdi_service:libthermal_interface_service_1.0", 70 ] 71 72 if (is_standard_system) { 73 external_deps = [ 74 "device_driver_framework:libhdf_ipc_adapter", 75 "device_driver_framework:libhdf_utils", 76 "hiviewdfx_hilog_native:libhilog", 77 "ipc:ipc_single", 78 "utils_base:utils", 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 = "thermal_device_driver" 90} 91 92group("hdf_thermal") { 93 if (target_cpu == "arm") { 94 deps = [ 95 ":libthermal_driver", 96 ":libthermal_interface_service_1.0", 97 "profile:thermal_hdf_config", 98 ] 99 } 100} 101