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") 16 17SUBSYSTEM_DIR = "//foundation/communication" 18PART_DIR = "$SUBSYSTEM_DIR/bluetooth_service/services/bluetooth" 19 20ohos_shared_library("bluetooth_hdi_adapter") { 21 # sanitize = { 22 # cfi = true 23 # } 24 stack_protector_ret = true 25 include_dirs = [ 26 "include", 27 "//third_party/bounds_checking_function/include", 28 "$PART_DIR/common", 29 ] 30 31 cflags = [ "-fPIC" ] 32 33 sources = [ 34 "src/bluetooth_hci_callbacks.cpp", 35 "src/bluetooth_hdi.cpp", 36 ] 37 38 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 39 40 if (is_standard_system) { 41 external_deps = [ 42 "c_utils:utils", 43 "drivers_interface_bluetooth:libbluetooth_hci_proxy_1.0", 44 "hdf_core:libhdi", 45 "hilog:libhilog", 46 "ipc:ipc_core", 47 ] 48 } else { 49 external_deps = [ 50 "c_utils:utils", 51 "drivers_interface_bluetooth:libbluetooth_hci_proxy_1.0", 52 "hdf_core:libhdi", 53 "hilog:libhilog", 54 "ipc:ipc_core", 55 ] 56 } 57 58 subsystem_name = "communication" 59 part_name = "bluetooth_service" 60} 61