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 (!support_bluetooth) { 19 ble_connection_src = [ 20 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_direct_virtual.c", 21 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_virtual.c", 22 "$dsoftbus_root_path/adapter/common/net/bluetooth/common/softbus_adapter_bt_common_virtual.c", 23 ] 24 ble_connection_inc = [ 25 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 26 "$dsoftbus_root_path/core/connection/ble/include", 27 "$dsoftbus_root_path/core/common/include", 28 ] 29} else { 30 if (!dsoftbus_feature_conn_ble) { 31 ble_connection_src = [ 32 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_direct_virtual.c", 33 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_virtual.c", 34 "$dsoftbus_root_path/adapter/common/net/bluetooth/common/softbus_adapter_bt_common_virtual.c", 35 ] 36 ble_connection_inc = [ 37 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 38 "$dsoftbus_root_path/core/connection/ble/include", 39 "$dsoftbus_root_path/core/common/include", 40 ] 41 if (dsoftbus_feature_conn_br) { 42 ble_connection_src += adapter_net_br_src 43 ble_connection_inc += adapter_ble_inc 44 ble_connection_external_deps += adapter_ble_external_deps 45 } 46 } else { 47 ble_connection_src = [ 48 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_client.c", 49 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_connection.c", 50 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_manager.c", 51 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_send_queue.c", 52 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_server.c", 53 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_trans.c", 54 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_hidumper.c", 55 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_snapshot.c", 56 ] 57 ble_connection_inc = [ 58 "$dsoftbus_root_path/core/connection/ble/include", 59 "$dsoftbus_root_path/core/connection/ble/src", 60 "$dsoftbus_root_path/core/common/include", 61 ] 62 if (dsoftbus_feature_conn_ble_direct) { 63 import( 64 "../../../dsoftbus_enhance/core/connection/ble_direct/ble_direct.gni") 65 66 ble_connection_inc += ble_direct_connection_inc 67 ble_connection_src += ble_direct_connection_src 68 } else { 69 ble_connection_src += [ "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_direct_virtual.c" ] 70 } 71 if (dsoftbus_feature_conn_coc) { 72 ble_connection_src += [ 73 "$dsoftbus_root_path/dsoftbus_enhance/core/connection/coc/src/ble_protocol_interface_factory.c", 74 "$dsoftbus_root_path/dsoftbus_enhance/core/connection/coc/src/softbus_adapter_coc.c", 75 "$dsoftbus_root_path/dsoftbus_enhance/core/connection/coc/src/softbus_conn_ble_coc.c", 76 ] 77 ble_connection_inc += 78 [ "$dsoftbus_root_path/dsoftbus_enhance/core/connection/coc/include" ] 79 } else { 80 if (dsoftbus_feature_ex_kits) { 81 ble_connection_inc += [ 82 "$dsoftbus_root_path/dsoftbus_enhance/core/connection/coc/include", 83 ] 84 } 85 ble_connection_src += [ 86 "$dsoftbus_root_path/core/connection/ble/src/ble_protocol_interface_factory.c", 87 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_coc_virtual.c", 88 ] 89 } 90 ble_connection_src += adapter_ble_src 91 ble_connection_inc += adapter_ble_inc 92 ble_connection_external_deps += adapter_ble_external_deps 93 } 94} 95