1# Copyright (c) 2021-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. 13 14import("../../../core/common/dfx/dsoftbus_dfx.gni") 15import("../../../dsoftbus.gni") 16 17adapter_bus_center_path = "$softbus_adapter_common/bus_center" 18 19bus_center_adapter_src = [] 20bus_center_adapter_inc = [ 21 "$softbus_adapter_common/bus_center/include", 22 "$dsoftbus_root_path/core/common/dfx/interface/include", 23] 24bus_center_adapter_deps = 25 [ "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log" ] 26 27if (!defined(global_parts_info) || 28 defined(global_parts_info.notification_common_event_service)) { 29 has_ces_part = true 30} else { 31 has_ces_part = false 32} 33 34if (defined(ohos_lite)) { 35 if (ohos_kernel_type == "liteos_m") { 36 if (dsoftbus_feature_lnn_net) { 37 bus_center_adapter_src += [ 38 "$adapter_bus_center_path/driver/lnn_driver_monitor_virtual.c", 39 "$adapter_bus_center_path/driver/lnn_driver_request_virtual.c", 40 "$adapter_bus_center_path/network/lnn_linkwatch_virtual.c", 41 "$adapter_bus_center_path/network/lnn_lwip_monitor.c", 42 "$adapter_bus_center_path/network/lnn_netlink_monitor_virtual.c", 43 "$adapter_bus_center_path/platform/lnn_product_monitor_virtual.c", 44 "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", 45 "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", 46 ] 47 } 48 } else if (ohos_kernel_type == "linux") { 49 if (dsoftbus_feature_lnn_net) { 50 bus_center_adapter_src += [ 51 "$adapter_bus_center_path/driver/lnn_driver_monitor_virtual.c", 52 "$adapter_bus_center_path/driver/lnn_driver_request_virtual.c", 53 "$adapter_bus_center_path/network/lnn_linkwatch.c", 54 "$adapter_bus_center_path/network/lnn_lwip_monitor_virtual.c", 55 "$adapter_bus_center_path/network/lnn_netlink_monitor.c", 56 "$adapter_bus_center_path/platform/lnn_product_monitor_virtual.c", 57 "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", 58 "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", 59 ] 60 } 61 } else if (ohos_kernel_type == "liteos_a") { 62 bus_center_adapter_inc += [ 63 "//drivers/hdf_core/adapter/uhdf/posix/include", 64 "//drivers/hdf_core/framework/include/utils", 65 "//drivers/hdf_core/framework/include/core", 66 "//drivers/hdf_core/framework/ability/sbuf/include", 67 ] 68 if (dsoftbus_feature_lnn_net) { 69 bus_center_adapter_src += [ 70 "$adapter_bus_center_path/driver/lnn_hdf_driver_monitor.c", 71 "$adapter_bus_center_path/driver/lnn_hdf_driver_request.c", 72 "$adapter_bus_center_path/network/lnn_linkwatch_virtual.c", 73 "$adapter_bus_center_path/network/lnn_lwip_monitor_virtual.c", 74 "$adapter_bus_center_path/network/lnn_netlink_monitor_virtual.c", 75 "$adapter_bus_center_path/platform/lnn_product_monitor.c", 76 "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", 77 "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", 78 ] 79 bus_center_adapter_inc += [ 80 "//drivers/hdf_core/framework/core/shared/include", 81 "//drivers/hdf_core/framework/include", 82 ] 83 bus_center_adapter_deps += [ 84 "//drivers/hdf_core/adapter/uhdf/manager:hdf_core", 85 "//drivers/hdf_core/adapter/uhdf/platform:hdf_platform", 86 "//drivers/hdf_core/adapter/uhdf/posix:hdf_posix_osal", 87 ] 88 } 89 } 90} else { 91 bus_center_adapter_external_deps = [] 92 if (has_ces_part) { 93 bus_center_adapter_src += 94 [ "$adapter_bus_center_path/common_event/lnn_common_event_monitor.cpp" ] 95 bus_center_adapter_external_deps += [ 96 "ability_base:want", 97 "common_event_service:cesfwk_innerkits", 98 ] 99 } else { 100 bus_center_adapter_src += [ "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp" ] 101 } 102 if (dsoftbus_feature_lnn_net) { 103 bus_center_adapter_src += [ 104 "$adapter_bus_center_path/driver/lnn_driver_monitor_virtual.c", 105 "$adapter_bus_center_path/driver/lnn_driver_request_virtual.c", 106 "$adapter_bus_center_path/network/lnn_linkwatch.c", 107 "$adapter_bus_center_path/network/lnn_lwip_monitor_virtual.c", 108 "$adapter_bus_center_path/network/lnn_netlink_monitor.c", 109 "$adapter_bus_center_path/platform/lnn_product_monitor_virtual.c", 110 ] 111 if (dsoftbus_feature_lnn_wifiservice_dependence && has_ces_part) { 112 bus_center_adapter_src += 113 [ "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor.cpp" ] 114 bus_center_adapter_external_deps += [ 115 "ability_base:want", 116 "wifi:wifi_sdk", 117 ] 118 } else { 119 bus_center_adapter_src += [ 120 "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", 121 ] 122 } 123 } 124} 125 126if (dsoftbus_feature_lnn_net) { 127 if (support_bluetooth && 128 (dsoftbus_feature_conn_br || dsoftbus_feature_conn_ble)) { 129 bus_center_adapter_src += 130 [ "$adapter_bus_center_path/network/lnn_bt_monitor.c" ] 131 bus_center_adapter_inc += [ 132 "$softbus_adapter_common/net/bluetooth/include", 133 "$dsoftbus_root_path/core/common/dfx/interface/include", 134 "//foundation/communication/wifi/wifi/frameworks/native/interfaces", 135 ] 136 bus_center_adapter_deps += 137 [ "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log" ] 138 } else { 139 bus_center_adapter_src += 140 [ "$adapter_bus_center_path/network/lnn_bt_monitor_virtual.c" ] 141 } 142} 143