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