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") 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 = [ "${utils_path}:utils_config" ] 44 45 deps = [ "//third_party/libxml2:xml2" ] 46 47 external_deps = [ 48 "c_utils:utils", 49 "hiviewdfx_hilog_native:libhilog", 50 ] 51 52 install_enable = true 53 part_name = "thermal_manager" 54 subsystem_name = "powermgr" 55} 56 57group("thermal_protector_group") { 58 deps = [ 59 ":thermal_protector", 60 "profile:thermal_kernel_config", 61 ] 62} 63