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