• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//build/ohos.gni")
15import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
16group("uhdf_hidl_pkg") {
17  deps = [ ":libhdi" ]
18}
19
20config("libhdi_pub_config") {
21  visibility = [ ":*" ]
22
23  include_dirs = [
24    "//commonlibrary/c_utils/base/include",
25    "$hdf_framework_path/utils/include",
26    "$hdf_framework_path/include/core",
27    "$hdf_framework_path/include/utils",
28    "$hdf_framework_path/core/shared/include",
29    "$hdf_uhdf_path/ipc/include",
30    "$hdf_uhdf_path/hdi/include",
31    "$hdf_uhdf_path/include/hdi",
32    "$hdf_uhdf_path/include/hdi/base",
33    "$hdf_uhdf_path/shared/include",
34    "$hdf_uhdf_path/osal/include",
35    "//drivers/peripheral/base",
36  ]
37}
38if (defined(ohos_lite)) {
39  group("libhdi") {
40    deps = []
41  }
42} else {
43  ohos_shared_library("libhdi") {
44    if (target_cpu == "arm64" || target_cpu == "x86_64") {
45      defines = [ "__ARM64__" ]
46    }
47
48    include_dirs = [
49      "$hdf_framework_path/core/sec/include",
50      "$hdf_framework_path/core/shared/include",
51      "$hdf_framework_path/core/host/include",
52      "$hdf_framework_path/core/manager/include",
53      "$hdf_uhdf_path/include/devhost",
54      "$hdf_uhdf_path/devhost/include",
55      "$hdf_uhdf_path/devmgr/include",
56      "$hdf_uhdf_path/host/include",
57      "$hdf_uhdf_path/manager/include",
58      "$hdf_uhdf_path/include/host",
59    ]
60    all_dependent_configs = [ ":libhdi_pub_config" ]
61    sources = [
62      "$hdf_framework_path/core/shared/src/service_status.c",
63      "src/devmgr_client.c",
64      "src/hdi_buffer_handle.cpp",
65      "src/hdi_buffer_handle_util.c",
66      "src/hdi_smq_syncer.cpp",
67      "src/hdi_support.cpp",
68      "src/idevmgr_client.cpp",
69      "src/iservmgr_client.cpp",
70      "src/object_collector.cpp",
71      "src/servmgr_client.c",
72      "src/servstat_listener.c",
73      "src/servstat_listener_stub.cpp",
74      "src/stub_collector.cpp",
75    ]
76
77    deps = [
78      "$hdf_uhdf_path/ipc:libhdf_ipc_adapter",
79      "$hdf_uhdf_path/utils:libhdf_utils",
80    ]
81
82    if (is_standard_system) {
83      external_deps = [
84        "c_utils:utils",
85        "hiviewdfx_hilog_native:libhilog",
86        "ipc:ipc_single",
87        "samgr:samgr_proxy",
88      ]
89    } else {
90      external_deps = [
91        "hilog:libhilog",
92        "ipc:ipc_single",
93        "samgr:samgr_proxy",
94      ]
95    }
96
97    install_images = [ system_base_dir ]
98    relative_install_dir = "chipset-pub-sdk"
99    subsystem_name = "hdf"
100    part_name = "hdf_core"
101  }
102}
103