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("../../../adapter/common/net/bluetooth/net_bluetooth.gni") 15import("../../../dsoftbus.gni") 16 17ble_connection_external_deps = [] 18if (!softbus_config_enhance) { 19 G_ENHANCE_DISC_FUNC_PACK_BLE_DEFINES = [] 20} 21if (!support_bluetooth) { 22 if (!softbus_config_enhance) { 23 G_ENHANCE_DISC_FUNC_PACK_BLE_DEFINES += 24 [ "__G_ENHANCE_DISC_FUNC_PACK_BROADCAST_MGR_VIRTUAL" ] 25 } 26 ble_connection_src = [ 27 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_virtual.c", 28 "$dsoftbus_root_path/adapter/common/net/bluetooth/common/softbus_adapter_bt_common_virtual.c", 29 ] 30 ble_connection_inc = [ 31 "$dsoftbus_root_path/interfaces/kits/adapter", 32 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 33 "$dsoftbus_root_path/interfaces/kits/connect", 34 "$dsoftbus_root_path/core/connection/ble/include", 35 "$dsoftbus_root_path/core/common/include", 36 ] 37} else { 38 if (!dsoftbus_feature_conn_ble) { 39 ble_connection_src = [ 40 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_virtual.c", 41 "$dsoftbus_root_path/adapter/common/net/bluetooth/common/softbus_adapter_bt_common_virtual.c", 42 ] 43 ble_connection_inc = [ 44 "$dsoftbus_root_path/interfaces/kits/adapter", 45 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 46 "$dsoftbus_root_path/interfaces/kits/connect", 47 "$dsoftbus_root_path/core/connection/ble/include", 48 "$dsoftbus_root_path/core/common/include", 49 ] 50 if (dsoftbus_feature_conn_br) { 51 ble_connection_src += adapter_net_br_src 52 ble_connection_inc += adapter_ble_inc 53 ble_connection_external_deps += adapter_ble_external_deps 54 } 55 } else { 56 ble_connection_src = [ 57 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_client.c", 58 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_connection.c", 59 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_manager.c", 60 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_send_queue.c", 61 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_server.c", 62 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_trans.c", 63 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_hidumper.c", 64 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_snapshot.c", 65 ] 66 ble_connection_inc = [ 67 "$dsoftbus_root_path/interfaces/kits/connect", 68 "$dsoftbus_root_path/core/connection/ble/include", 69 "$dsoftbus_root_path/core/connection/ble/src", 70 "$dsoftbus_root_path/core/common/include", 71 "$dsoftbus_root_path/core/connection/wifi_direct_cpp/dbinder", 72 ] 73 ble_connection_src += [ "$dsoftbus_root_path/core/connection/ble/src/ble_protocol_interface_factory.c" ] 74 ble_connection_src += adapter_ble_src 75 ble_connection_inc += adapter_ble_inc 76 ble_connection_external_deps += adapter_ble_external_deps 77 } 78} 79