1# Copyright (c) 2021-2024 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
17bus_center_service_sdk_src =
18    [ "$dsoftbus_root_path/sdk/bus_center/service/src/client_bus_center.c" ]
19bus_center_service_sdk_inc = [
20  "$dsoftbus_root_path/sdk/bus_center/service/include",
21  "$dsoftbus_root_path/core/common/dfx/interface/include",
22]
23
24bus_center_manager_sdk_src = []
25bus_center_manager_sdk_inc =
26    [ "$dsoftbus_root_path/sdk/bus_center/manager/include" ]
27bus_center_manager_sdk_deps = []
28if (defined(ohos_lite)) {
29  if (ohos_kernel_type == "liteos_m") {
30    bus_center_manager_sdk_inc += [
31      "$dsoftbus_root_path/sdk/bus_center/ipc/include",
32      "$dsoftbus_root_path/core/adapter/kernel/include",
33      "$dsoftbus_root_path/core/bus_center/interface",
34      "$dsoftbus_root_path/core/bus_center/ipc/include",
35    ]
36    bus_center_manager_sdk_src += [
37      "$dsoftbus_root_path/sdk/bus_center/ipc/mini/bus_center_server_proxy.c",
38      "$dsoftbus_root_path/sdk/bus_center/manager/src/client_bus_center_manager.c",
39    ]
40  } else {
41    bus_center_manager_sdk_inc += [
42      "$dsoftbus_root_path/sdk/bus_center/ipc/include",
43      "$dsoftbus_root_path/core/bus_center/interface",
44      "$dsoftbus_root_path/core/common/include",
45    ]
46    bus_center_manager_sdk_src += [
47      "$dsoftbus_root_path/sdk/bus_center/ipc/small/bus_center_server_proxy.c",
48      "$dsoftbus_root_path/sdk/bus_center/manager/src/client_bus_center_manager.c",
49    ]
50    bus_center_manager_sdk_deps += [
51      "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single",
52      "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
53    ]
54  }
55} else {
56  bus_center_manager_sdk_inc += [
57    "$dsoftbus_root_path/sdk/bus_center/ipc/include",
58    "$dsoftbus_root_path/sdk/bus_center/ipc/$os_type/include",
59    "$dsoftbus_root_path/core/bus_center/interface",
60    "$dsoftbus_root_path/core/common/include",
61    "$dsoftbus_root_path/core/frame/$os_type/init/include",
62    "$dsoftbus_root_path/core/transmission/common/include",
63    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
64    "$dsoftbus_root_path/interfaces/kits/discovery",
65    "$dsoftbus_root_path/interfaces/kits/transport",
66  ]
67  bus_center_manager_sdk_src += [
68    "$dsoftbus_root_path/sdk/bus_center/ipc/$os_type/src/bus_center_server_proxy.cpp",
69    "$dsoftbus_root_path/sdk/bus_center/ipc/$os_type/src/bus_center_server_proxy_standard.cpp",
70    "$dsoftbus_root_path/sdk/bus_center/manager/src/client_bus_center_manager.c",
71  ]
72
73  if (dsoftbus_feature_ex_kits) {
74    import(
75        "$dsoftbus_root_path/dsoftbus_enhance/sdk/bus_center/extend/bus_center_ex_sdk.gni")
76
77    bus_center_manager_sdk_inc += bus_center_ex_sdk_inc
78    bus_center_manager_sdk_src += bus_center_ex_sdk_src
79  } else {
80    bus_center_manager_sdk_inc +=
81        [ "$dsoftbus_root_path/core/bus_center/extend/include" ]
82    bus_center_manager_sdk_src += [ "$dsoftbus_root_path/core/bus_center/extend/src/bus_center_ex_obj_proxy.cpp" ]
83    bus_center_manager_sdk_src += [ "$dsoftbus_root_path/sdk/bus_center/ipc/$os_type/src/bus_center_server_proxy_virtual.cpp" ]
84    bus_center_manager_sdk_src += [ "$dsoftbus_root_path/sdk/bus_center/manager/src/client_bus_center_policy_virtual.c" ]
85  }
86}
87
88bus_center_sdk_src = bus_center_service_sdk_src + bus_center_manager_sdk_src
89bus_center_sdk_inc = bus_center_service_sdk_inc + bus_center_manager_sdk_inc
90bus_center_sdk_deps = bus_center_manager_sdk_deps
91