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("libpower_interface_service_1.0") { 17 include_dirs = [ 18 "include", 19 "../include", 20 ] 21 sources = [ "src/power_interface_impl.cpp" ] 22 23 deps = [ 24 "//drivers/interface/power/v1_0:libpower_stub_1.0", 25 "//third_party/libxml2:xml2", 26 "//utils/native/base:utils", 27 ] 28 29 if (is_standard_system) { 30 external_deps = [ 31 "device_driver_framework:libhdf_host", 32 "device_driver_framework:libhdf_ipc_adapter", 33 "device_driver_framework:libhdf_utils", 34 "device_driver_framework:libhdf_utils", 35 "device_driver_framework:libhdi", 36 "hiviewdfx_hilog_native:libhilog", 37 "ipc:ipc_single", 38 ] 39 } else { 40 external_deps = [ 41 "device_driver_framework:libhdf_host", 42 "device_driver_framework:libhdf_ipc_adapter", 43 "device_driver_framework:libhdf_utils", 44 "device_driver_framework:libhdi", 45 "hilog:libhilog", 46 "ipc:ipc_single", 47 ] 48 } 49 50 install_images = [ chipset_base_dir ] 51 subsystem_name = "hdf" 52 part_name = "power_device_driver" 53} 54 55############################################################################################## 56 57ohos_shared_library("libpower_driver") { 58 include_dirs = [ "../include" ] 59 sources = [ "src/power_interface_driver.cpp" ] 60 61 deps = [ 62 ":libpower_interface_service_1.0", 63 "//drivers/interface/power/v1_0:libpower_stub_1.0", 64 "//utils/native/base:utils", 65 ] 66 67 if (is_standard_system) { 68 external_deps = [ 69 "device_driver_framework:libhdf_host", 70 "device_driver_framework:libhdf_ipc_adapter", 71 "device_driver_framework:libhdf_utils", 72 "device_driver_framework:libhdi", 73 "hiviewdfx_hilog_native:libhilog", 74 "ipc:ipc_single", 75 ] 76 } else { 77 external_deps = [ 78 "device_driver_framework:libhdf_host", 79 "device_driver_framework:libhdf_ipc_adapter", 80 "device_driver_framework:libhdf_utils", 81 "device_driver_framework:libhdi", 82 "hilog:libhilog", 83 "ipc:ipc_single", 84 ] 85 } 86 87 install_images = [ chipset_base_dir ] 88 subsystem_name = "hdf" 89 part_name = "power_device_driver" 90} 91 92group("hdf_power") { 93 if (target_cpu == "arm") { 94 deps = [ 95 ":libpower_driver", 96 ":libpower_interface_service_1.0", 97 ] 98 } 99} 100