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("../../../dsoftbus.gni") 15 16adapter_bus_center_path = "$softbus_adapter_common/bus_center" 17 18bus_center_adapter_src = [] 19bus_center_adapter_inc = [ 20 "$softbus_adapter_common/bus_center/include", 21 "$dsoftbus_dfx_path/interface/include", 22] 23bus_center_adapter_deps = [ "$dsoftbus_dfx_path:softbus_dfx" ] 24 25if (defined(ohos_lite)) { 26 if (ohos_kernel_type == "liteos_m") { 27 if (dsoftbus_feature_lnn_frame) { 28 bus_center_adapter_src += [ 29 "$adapter_bus_center_path/driver/lnn_driver_monitor_virtual.c", 30 "$adapter_bus_center_path/driver/lnn_driver_request_virtual.c", 31 "$adapter_bus_center_path/network/lnn_linkwatch_virtual.c", 32 "$adapter_bus_center_path/network/lnn_lwip_monitor.c", 33 "$adapter_bus_center_path/network/lnn_netlink_monitor_virtual.c", 34 "$adapter_bus_center_path/platform/lnn_product_monitor_virtual.c", 35 "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor_virtual.cpp", 36 "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", 37 "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", 38 "$adapter_bus_center_path/network/lnn_netmanager_monitor_virtual.cpp", 39 ] 40 } 41 } else if (ohos_kernel_type == "linux") { 42 if (dsoftbus_feature_lnn_frame) { 43 bus_center_adapter_src += [ 44 "$adapter_bus_center_path/driver/lnn_driver_monitor_virtual.c", 45 "$adapter_bus_center_path/driver/lnn_driver_request_virtual.c", 46 "$adapter_bus_center_path/network/lnn_linkwatch.c", 47 "$adapter_bus_center_path/network/lnn_lwip_monitor_virtual.c", 48 "$adapter_bus_center_path/network/lnn_netlink_monitor.c", 49 "$adapter_bus_center_path/platform/lnn_product_monitor_virtual.c", 50 "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor_virtual.cpp", 51 "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", 52 "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", 53 "$adapter_bus_center_path/network/lnn_netmanager_monitor_virtual.cpp", 54 ] 55 } 56 } else if (ohos_kernel_type == "liteos_a") { 57 bus_center_adapter_inc += [ 58 "//drivers/hdf_core/adapter/uhdf/posix/include", 59 "//drivers/hdf_core/framework/include/utils", 60 "//drivers/hdf_core/framework/include/core", 61 "//drivers/hdf_core/framework/ability/sbuf/include", 62 ] 63 if (dsoftbus_feature_lnn_frame) { 64 bus_center_adapter_src += [ 65 "$adapter_bus_center_path/driver/lnn_hdf_driver_monitor.c", 66 "$adapter_bus_center_path/driver/lnn_hdf_driver_request.c", 67 "$adapter_bus_center_path/network/lnn_linkwatch_virtual.c", 68 "$adapter_bus_center_path/network/lnn_lwip_monitor_virtual.c", 69 "$adapter_bus_center_path/network/lnn_netlink_monitor_virtual.c", 70 "$adapter_bus_center_path/platform/lnn_product_monitor.c", 71 "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor_virtual.cpp", 72 "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", 73 "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", 74 "$adapter_bus_center_path/network/lnn_netmanager_monitor_virtual.cpp", 75 ] 76 bus_center_adapter_inc += [ 77 "//drivers/hdf_core/framework/core/shared/include", 78 "//drivers/hdf_core/framework/include", 79 ] 80 bus_center_adapter_deps += [ 81 "//drivers/hdf_core/adapter/uhdf/manager:hdf_core", 82 "//drivers/hdf_core/adapter/uhdf/platform:hdf_platform", 83 "//drivers/hdf_core/adapter/uhdf/posix:hdf_posix_osal", 84 ] 85 } 86 } 87} else { 88 bus_center_adapter_external_deps = [] 89 if (has_ces_part) { 90 bus_center_adapter_src += [ 91 "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor.cpp", 92 "$adapter_bus_center_path/common_event/lnn_common_event_monitor.cpp", 93 ] 94 bus_center_adapter_external_deps += [ 95 "ability_base:want", 96 "common_event_service:cesfwk_innerkits", 97 "init:libbeget_proxy", 98 "netmanager_base:net_conn_manager_if", 99 "power_manager:powermgr_client", 100 ] 101 } else { 102 bus_center_adapter_src += [ 103 "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor_virtual.cpp", 104 "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", 105 ] 106 } 107 if (dsoftbus_feature_lnn_frame) { 108 bus_center_adapter_src += [ 109 "$adapter_bus_center_path/driver/lnn_driver_monitor_virtual.c", 110 "$adapter_bus_center_path/driver/lnn_driver_request_virtual.c", 111 "$adapter_bus_center_path/network/lnn_linkwatch.c", 112 "$adapter_bus_center_path/network/lnn_lwip_monitor_virtual.c", 113 "$adapter_bus_center_path/network/lnn_netlink_monitor.c", 114 "$adapter_bus_center_path/platform/lnn_product_monitor_virtual.c", 115 ] 116 if (dsoftbus_feature_lnn_wifiservice_dependence && has_ces_part) { 117 bus_center_adapter_src += 118 [ "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor.cpp" ] 119 bus_center_adapter_external_deps += [ 120 "ability_base:want", 121 "wifi:wifi_sdk", 122 ] 123 } else { 124 bus_center_adapter_src += [ 125 "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", 126 ] 127 } 128 } 129 if (!defined(global_parts_info) || 130 defined(global_parts_info.communication_netmanager_base)) { 131 bus_center_adapter_external_deps += 132 [ "netmanager_base:net_conn_manager_if" ] 133 bus_center_adapter_src += 134 [ "$adapter_bus_center_path/network/lnn_netmanager_monitor.cpp" ] 135 } else { 136 bus_center_adapter_src += [ 137 "$adapter_bus_center_path/network/lnn_netmanager_monitor_virtual.cpp", 138 ] 139 } 140} 141 142if (dsoftbus_feature_lnn_frame) { 143 if (support_bluetooth && 144 (dsoftbus_feature_conn_br || dsoftbus_feature_conn_ble)) { 145 bus_center_adapter_src += [ 146 "$adapter_bus_center_path/network/lnn_bt_monitor.c", 147 "$adapter_bus_center_path/network/lnn_sle_monitor.c", 148 ] 149 bus_center_adapter_inc += [ 150 "$softbus_adapter_common/net/bluetooth/include", 151 "$dsoftbus_dfx_path/interface/include", 152 ] 153 bus_center_adapter_external_deps += [ "wifi:wifi_sdk" ] 154 bus_center_adapter_deps += [ "$dsoftbus_dfx_path:softbus_dfx" ] 155 } else { 156 bus_center_adapter_src += [ 157 "$adapter_bus_center_path/network/lnn_bt_monitor_virtual.c", 158 "$adapter_bus_center_path/network/lnn_sle_monitor_virtual.c", 159 ] 160 } 161} 162