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( 15 "//foundation/communication/dsoftbus/adapter/common/bus_center/bus_center_adapter.gni") 16import("//foundation/communication/dsoftbus/adapter/common/net/hdi/net_hdi.gni") 17import( 18 "//foundation/communication/dsoftbus/adapter/common/net/wifi/net_wifi.gni") 19import("//foundation/communication/dsoftbus/core/adapter/core_adapter.gni") 20import( 21 "//foundation/communication/dsoftbus/core/bus_center/lnn/disc_mgr/bus_center_disc_mgr.gni") 22import( 23 "//foundation/communication/dsoftbus/core/bus_center/lnn/lane_hub/lane_hub.gni") 24import( 25 "//foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/net_builder.gni") 26import( 27 "//foundation/communication/dsoftbus/core/bus_center/lnn/net_buscenter/net_manager.gni") 28import( 29 "//foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/net_ledger.gni") 30import( 31 "//foundation/communication/dsoftbus/core/bus_center/monitor/bus_center_monitor.gni") 32import( 33 "//foundation/communication/dsoftbus/core/bus_center/utils/bus_center_utils.gni") 34 35bus_center_server_src = 36 bus_center_adapter_src + bus_center_core_adapter_src + 37 bus_center_disc_mgr_src + bus_center_hub_src + bus_center_builder_src + 38 bus_center_net_mgr_src + bus_center_ledger_src + bus_center_monitor_src + 39 bus_center_utils_src + adapter_wifi_src + adapter_hdi_src 40bus_center_server_inc = 41 bus_center_adapter_inc + bus_center_core_adapter_inc + 42 bus_center_disc_mgr_inc + bus_center_hub_inc + bus_center_builder_inc + 43 bus_center_net_mgr_inc + bus_center_ledger_inc + bus_center_monitor_inc + 44 bus_center_utils_inc + adapter_wifi_inc + adapter_hdi_inc 45bus_center_server_deps = 46 bus_center_adapter_deps + bus_center_core_adapter_deps + 47 bus_center_disc_mgr_deps + bus_center_hub_deps + bus_center_builder_deps + 48 bus_center_net_mgr_deps + bus_center_ledger_deps + bus_center_monitor_deps + 49 bus_center_utils_deps + adapter_wifi_deps + adapter_hdi_deps 50 51bus_center_server_src += 52 [ "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c" ] 53bus_center_server_src += 54 [ "$dsoftbus_root_path/core/bus_center/service/src/bus_center_event.c" ] 55 56bus_center_server_inc += [ 57 "$dsoftbus_root_path/core/bus_center/interface", 58 "$dsoftbus_root_path/core/bus_center/ipc/include", 59 "$dsoftbus_root_path/core/bus_center/service/include", 60 "$dsoftbus_root_path/sdk/bus_center/manager/include", 61] 62 63bus_center_server_external_deps = [] 64 65if (defined(ohos_lite)) { 66 if (ohos_kernel_type == "liteos_m") { 67 bus_center_server_src += 68 [ "$dsoftbus_root_path/core/bus_center/ipc/mini/lnn_bus_center_ipc.c" ] 69 } else { 70 bus_center_server_src += [ 71 "$dsoftbus_root_path/core/bus_center/ipc/small/src/bus_center_client_proxy.c", 72 "$dsoftbus_root_path/core/bus_center/ipc/small/src/lnn_bus_center_ipc.c", 73 ] 74 bus_center_server_inc += 75 [ "$dsoftbus_root_path/core/bus_center/ipc/small/include" ] 76 bus_center_server_deps += [ 77 "//build/lite/config/component/cJSON:cjson_shared", 78 "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single", 79 ] 80 } 81} else { 82 bus_center_server_src += [ 83 "$dsoftbus_root_path/core/bus_center/ipc/$os_type/src/bus_center_client_proxy.cpp", 84 "$dsoftbus_root_path/core/bus_center/ipc/$os_type/src/bus_center_client_proxy_standard.cpp", 85 "$dsoftbus_root_path/core/bus_center/ipc/$os_type/src/lnn_bus_center_ipc.cpp", 86 ] 87 bus_center_server_inc += [ 88 "$dsoftbus_root_path/core/bus_center/ipc/$os_type/include", 89 "$dsoftbus_root_path/sdk/frame/$os_type/include", 90 "//utils/system/safwk/native/include", 91 ] 92 bus_center_server_external_deps = 93 bus_center_adapter_external_deps + bus_center_ledger_external_deps 94 bus_center_server_external_deps += [ "c_utils:utils" ] 95} 96 97native_source_path = rebase_path("$dsoftbus_root_path") 98agcr_dir = "dsoftbus_enhance/components/agcr" 99agcr_enhanced = exec_script("$dsoftbus_root_path/check_sub_module.py", 100 [ 101 "$native_source_path", 102 "$agcr_dir", 103 ], 104 "value") 105 106if (agcr_enhanced) { 107 import( 108 "//foundation/communication/dsoftbus/dsoftbus_enhance/components/agcr/agcr.gni") 109 110 bus_center_server_src += agcr_src 111 bus_center_server_inc += agcr_inc 112} 113