• 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
16root_path = "//drivers/peripheral/bluetooth/hci/hdi_service"
17
18ohos_shared_library("libhci_interface_service_1.0") {
19  include_dirs = [
20    "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
21    "$root_path",
22    "$root_path/implement",
23  ]
24
25  sources = [
26    "$root_path/hci_interface_impl.cpp",
27    "$root_path/implement/bluetooth_address.cpp",
28    "$root_path/implement/h4_protocol.cpp",
29    "$root_path/implement/hci_protocol.cpp",
30    "$root_path/implement/hci_watcher.cpp",
31    "$root_path/implement/mct_protocol.cpp",
32    "$root_path/implement/vendor_interface.cpp",
33  ]
34
35  if (is_standard_system) {
36    external_deps = [
37      "c_utils:utils",
38      "drivers_interface_bluetooth:bluetooth_hci_idl_headers",
39      "hdf_core:libhdf_host",
40      "hdf_core:libhdf_utils",
41      "hilog:libhilog",
42    ]
43  } else {
44    external_deps = [ "hilog:libhilog" ]
45  }
46
47  install_images = [ chipset_base_dir ]
48  subsystem_name = "hdf"
49  part_name = "drivers_peripheral_bluetooth"
50}
51
52ohos_shared_library("libbluetooth_hci_hdi_driver") {
53  include_dirs = [ "$root_path" ]
54
55  sources = [ "$root_path/hci_interface_driver.cpp" ]
56
57  if (is_standard_system) {
58    external_deps = [
59      "c_utils:utils",
60      "hdf_core:libhdf_host",
61      "hdf_core:libhdf_ipc_adapter",
62      "hdf_core:libhdf_utils",
63      "hdf_core:libhdi",
64      "hilog:libhilog",
65      "ipc:ipc_single",
66    ]
67  } else {
68    external_deps = [
69      "hilog:libhilog",
70      "ipc:ipc_single",
71    ]
72  }
73
74  external_deps += [ "drivers_interface_bluetooth:libbluetooth_hci_stub_1.0" ]
75
76  shlib_type = "hdi"
77  install_images = [ chipset_base_dir ]
78  subsystem_name = "hdf"
79  part_name = "drivers_peripheral_bluetooth"
80}
81
82group("hdi_bluetooth_hci_service") {
83  deps = [
84    ":libbluetooth_hci_hdi_driver",
85    ":libhci_interface_service_1.0",
86  ]
87}
88