2021-06-01 16:05:35 +00:00
|
|
|
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2023-05-05 12:39:13 +00:00
|
|
|
import("../../dsoftbus.gni")
|
|
|
|
import("../adapter/core_adapter.gni")
|
|
|
|
import("../authentication/authentication.gni")
|
|
|
|
import("../bus_center/bus_center_server.gni")
|
|
|
|
import("../common/security/permission/permission.gni")
|
|
|
|
import("../connection/conn.gni")
|
|
|
|
import("../discovery/disc.gni")
|
|
|
|
import("../transmission/trans.gni")
|
2021-06-01 16:05:35 +00:00
|
|
|
|
2021-11-01 13:36:35 +00:00
|
|
|
dsoftbus_server_common_src =
|
|
|
|
auth_server_src + bus_center_server_src + conn_manager_src +
|
|
|
|
disc_server_src + trans_session_src + softbus_permission_src
|
|
|
|
dsoftbus_server_common_inc =
|
|
|
|
auth_server_inc + bus_center_server_inc + conn_manager_inc +
|
|
|
|
disc_server_inc + trans_session_inc + softbus_permission_inc
|
|
|
|
dsoftbus_server_common_deps =
|
2023-07-17 15:33:04 +00:00
|
|
|
auth_server_deps + bus_center_server_deps + disc_server_deps +
|
|
|
|
trans_session_deps + softbus_permission_deps
|
2021-06-01 16:05:35 +00:00
|
|
|
|
2021-11-01 13:36:35 +00:00
|
|
|
if (defined(ohos_lite)) {
|
|
|
|
copy("permission_json") {
|
|
|
|
sources = [ "$dsoftbus_core_path/common/security/permission/softbus_trans_permission.json" ]
|
|
|
|
outputs = [ "$root_out_dir/etc/softbus_trans_permission.json" ]
|
|
|
|
}
|
|
|
|
if (ohos_kernel_type == "liteos_m") {
|
|
|
|
static_library("softbus_server_frame") {
|
|
|
|
defines = AUTH_SERVER_DEFINES
|
2022-04-28 02:36:16 +00:00
|
|
|
defines += [ "__STDC_FORMAT_MACROS" ]
|
2021-11-01 13:36:35 +00:00
|
|
|
include_dirs = dsoftbus_server_common_inc
|
|
|
|
include_dirs += [
|
|
|
|
"$dsoftbus_root_path/core/frame/common/include",
|
|
|
|
"$dsoftbus_root_path/interfaces/kits",
|
|
|
|
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
|
|
|
"$dsoftbus_root_path/interfaces/kits/transport",
|
|
|
|
"$dsoftbus_root_path/interfaces/kits/common",
|
2022-07-30 01:15:12 +00:00
|
|
|
"$dsoftbus_root_path/core/common/dfx/hidumper_adapter/include",
|
2022-07-27 15:55:45 +00:00
|
|
|
"$dsoftbus_root_path/core/common/dfx/hisysevent_adapter/include",
|
2021-11-01 13:36:35 +00:00
|
|
|
"$softbus_adapter_config/spec_config",
|
2023-02-27 14:03:27 +00:00
|
|
|
"//base/security/device_auth/interfaces/inner_api",
|
2021-11-01 13:36:35 +00:00
|
|
|
]
|
|
|
|
sources = dsoftbus_server_common_src
|
|
|
|
sources += [
|
|
|
|
"common/src/softbus_server_frame.c",
|
|
|
|
"mini/src/softbus_server_stub.c",
|
|
|
|
]
|
2022-07-26 09:16:18 +00:00
|
|
|
if (board_toolchain_type != "iccarm") {
|
|
|
|
cflags = [
|
|
|
|
"-Wall",
|
|
|
|
"-fPIC",
|
|
|
|
"-std=c99",
|
|
|
|
]
|
|
|
|
cflags_cc = cflags
|
2022-08-24 12:39:29 +00:00
|
|
|
} else {
|
|
|
|
include_dirs += [
|
|
|
|
"//kernel/liteos_m/components/net/lwip-2.1/porting/include",
|
|
|
|
"//third_party/lwip/src/include",
|
|
|
|
]
|
|
|
|
cflags = [
|
|
|
|
"--diag_suppress",
|
|
|
|
"Pe301",
|
|
|
|
]
|
2022-07-26 09:16:18 +00:00
|
|
|
}
|
2021-11-01 13:36:35 +00:00
|
|
|
deps = dsoftbus_server_common_deps
|
|
|
|
deps += [
|
|
|
|
"$dsoftbus_root_path/adapter:softbus_adapter",
|
|
|
|
"$dsoftbus_root_path/core/common:softbus_utils",
|
|
|
|
"//build/lite/config/component/cJSON:cjson_static",
|
|
|
|
]
|
2023-07-19 13:44:00 +00:00
|
|
|
if (support_bluetooth &&
|
|
|
|
(dsoftbus_feature_conn_br || dsoftbus_feature_conn_ble)) {
|
|
|
|
deps += [
|
|
|
|
"//foundation/communication/bluetooth/frameworks/inner:btframework",
|
|
|
|
]
|
|
|
|
include_dirs += [
|
|
|
|
"//foundation/communication/bluetooth/interfaces/inner_api/include",
|
|
|
|
"//foundation/communication/bluetooth/interfaces/inner_api/include/c_header",
|
|
|
|
]
|
|
|
|
}
|
2021-11-01 13:36:35 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
shared_library("softbus_server_frame") {
|
|
|
|
defines = AUTH_SERVER_DEFINES
|
2022-04-28 02:36:16 +00:00
|
|
|
defines += [ "__STDC_FORMAT_MACROS" ]
|
2021-11-01 13:36:35 +00:00
|
|
|
include_dirs = dsoftbus_server_common_inc
|
|
|
|
include_dirs += [
|
|
|
|
"common/include",
|
|
|
|
"small/init/include",
|
|
|
|
"small/client_manager/include",
|
|
|
|
"$softbus_adapter_common/include",
|
|
|
|
"$softbus_adapter_config/spec_config",
|
|
|
|
"$dsoftbus_root_path/interfaces/kits/transport",
|
2022-07-30 01:15:12 +00:00
|
|
|
"$dsoftbus_root_path/core/common/dfx/hidumper_adapter/include",
|
2022-07-27 15:55:45 +00:00
|
|
|
"$dsoftbus_root_path/core/common/dfx/hisysevent_adapter/include",
|
2023-02-27 14:03:27 +00:00
|
|
|
"//base/security/device_auth/interfaces/inner_api",
|
2022-09-15 13:44:07 +00:00
|
|
|
"//commonlibrary/utils_lite/include",
|
2022-05-06 04:00:10 +00:00
|
|
|
"//third_party/bounds_checking_function/include",
|
2021-11-01 13:36:35 +00:00
|
|
|
]
|
|
|
|
sources = dsoftbus_server_common_src
|
|
|
|
sources += [
|
|
|
|
"common/src/softbus_server_frame.c",
|
|
|
|
"small/client_manager/src/softbus_client_info_manager.c",
|
|
|
|
"small/init/src/bus_center_server_stub.c",
|
|
|
|
"small/init/src/disc_server_stub.c",
|
|
|
|
"small/init/src/softbus_server_stub.c",
|
|
|
|
"small/init/src/trans_server_stub.c",
|
|
|
|
]
|
2021-07-13 07:10:49 +00:00
|
|
|
|
2021-11-01 13:36:35 +00:00
|
|
|
cflags = [
|
|
|
|
"-Wall",
|
|
|
|
"-fPIC",
|
|
|
|
"-fno-builtin",
|
|
|
|
"-std=c99",
|
|
|
|
]
|
|
|
|
cflags_cc = cflags
|
|
|
|
deps = dsoftbus_server_common_deps
|
|
|
|
deps += [
|
|
|
|
":permission_json",
|
|
|
|
"$dsoftbus_root_path/adapter:softbus_adapter",
|
|
|
|
"$dsoftbus_root_path/core/common:softbus_utils",
|
|
|
|
"//build/lite/config/component/cJSON:cjson_shared",
|
2022-05-05 06:51:21 +00:00
|
|
|
"//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single",
|
2022-07-21 11:11:29 +00:00
|
|
|
"//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
|
2021-11-01 13:36:35 +00:00
|
|
|
]
|
2023-07-19 13:44:00 +00:00
|
|
|
if (support_bluetooth &&
|
|
|
|
(dsoftbus_feature_conn_br || dsoftbus_feature_conn_ble)) {
|
|
|
|
deps += [
|
|
|
|
"//foundation/communication/bluetooth/frameworks/inner:btframework",
|
|
|
|
]
|
|
|
|
include_dirs += [
|
|
|
|
"//foundation/communication/bluetooth/interfaces/inner_api/include",
|
|
|
|
"//foundation/communication/bluetooth/interfaces/inner_api/include/c_header",
|
|
|
|
]
|
|
|
|
}
|
2021-11-01 13:36:35 +00:00
|
|
|
}
|
|
|
|
executable("softbus_server") {
|
|
|
|
sources = [ "small/init/src/softbus_server_main.c" ]
|
|
|
|
include_dirs = [ "common/include" ]
|
|
|
|
deps = [ ":softbus_server_frame" ]
|
|
|
|
cflags = [ "-fPIC" ]
|
|
|
|
}
|
2021-06-01 16:05:35 +00:00
|
|
|
}
|
|
|
|
} else {
|
2021-11-01 13:36:35 +00:00
|
|
|
ohos_prebuilt_etc("softbus_server.rc") {
|
|
|
|
relative_install_dir = "init"
|
2022-03-24 09:32:57 +00:00
|
|
|
if (use_musl) {
|
2022-03-30 09:10:41 +00:00
|
|
|
source = "$dsoftbus_root_path/core/frame/$os_type/init/src/softbus_server_musl.cfg"
|
2022-03-24 09:32:57 +00:00
|
|
|
} else {
|
|
|
|
source =
|
2022-03-30 09:10:41 +00:00
|
|
|
"$dsoftbus_root_path/core/frame/$os_type/init/src/softbus_server.cfg"
|
2022-03-24 09:32:57 +00:00
|
|
|
}
|
2021-12-22 08:59:43 +00:00
|
|
|
|
2022-06-01 09:26:07 +00:00
|
|
|
part_name = "dsoftbus"
|
2021-11-01 13:36:35 +00:00
|
|
|
subsystem_name = "communication"
|
|
|
|
}
|
|
|
|
ohos_prebuilt_etc("softbus_permission_json") {
|
|
|
|
source = "$dsoftbus_root_path/core/common/security/permission/softbus_trans_permission.json"
|
|
|
|
install_enable = true
|
|
|
|
relative_install_dir = "communication/softbus"
|
2022-06-01 09:26:07 +00:00
|
|
|
part_name = "dsoftbus"
|
2021-11-01 13:36:35 +00:00
|
|
|
}
|
|
|
|
ohos_shared_library("softbus_server") {
|
|
|
|
defines = AUTH_SERVER_DEFINES
|
2022-04-28 02:36:16 +00:00
|
|
|
defines += [ "__STDC_FORMAT_MACROS" ]
|
2021-11-01 13:36:35 +00:00
|
|
|
include_dirs = dsoftbus_server_common_inc
|
|
|
|
include_dirs += [
|
|
|
|
"$dsoftbus_root_path/core/frame/common/include",
|
2022-03-30 09:10:41 +00:00
|
|
|
"$dsoftbus_root_path/core/frame/$os_type/client_manager/include",
|
|
|
|
"$dsoftbus_root_path/core/frame/$os_type/init/include",
|
2021-11-01 13:36:35 +00:00
|
|
|
"$dsoftbus_root_path/interfaces/kits/common",
|
2021-07-13 07:10:49 +00:00
|
|
|
"$dsoftbus_root_path/interfaces/kits/transport",
|
2022-06-01 09:26:07 +00:00
|
|
|
"$dsoftbus_feature_product_config_path/spec_config",
|
2021-11-01 13:36:35 +00:00
|
|
|
"$dsoftbus_root_path/core/common/include",
|
2022-07-30 01:15:12 +00:00
|
|
|
"$dsoftbus_root_path/core/common/dfx/hidumper_adapter/include",
|
2022-07-27 15:55:45 +00:00
|
|
|
"$dsoftbus_root_path/core/common/dfx/hisysevent_adapter/include",
|
2022-07-22 02:17:09 +00:00
|
|
|
"//base/security/access_token/interfaces/innerkits/privacy/include",
|
2023-05-31 07:38:19 +00:00
|
|
|
"//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/include/bundlemgr",
|
|
|
|
"//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_base/include",
|
|
|
|
"//base/notification/common_event_service/interfaces/inner_api",
|
|
|
|
"//foundation/ability/ability_base/interfaces/kits/native/want/include",
|
|
|
|
"//foundation/ability/ability_base/interfaces/kits/native/uri/include",
|
|
|
|
"//foundation/ability/ability_base/interfaces/inner_api/base/include",
|
2021-06-01 16:05:35 +00:00
|
|
|
]
|
2021-11-01 13:36:35 +00:00
|
|
|
sources = dsoftbus_server_common_src
|
|
|
|
sources += [
|
2022-03-30 09:10:41 +00:00
|
|
|
"$dsoftbus_root_path/sdk/frame/$os_type/src/if_softbus_client.cpp",
|
2022-10-16 13:35:54 +00:00
|
|
|
"$os_type/client_manager/src/permission_status_change_cb.cpp",
|
2022-03-30 09:10:41 +00:00
|
|
|
"$os_type/client_manager/src/softbus_client_info_manager.cpp",
|
|
|
|
"$os_type/init/src/if_softbus_server.cpp",
|
|
|
|
"$os_type/init/src/softbus_server.cpp",
|
|
|
|
"$os_type/init/src/softbus_server_death_recipient.cpp",
|
|
|
|
"$os_type/init/src/softbus_server_stub.cpp",
|
2022-03-31 12:02:06 +00:00
|
|
|
"common/src/softbus_server_frame.c",
|
2021-06-01 16:05:35 +00:00
|
|
|
]
|
2021-11-01 13:36:35 +00:00
|
|
|
deps = dsoftbus_server_common_deps
|
|
|
|
deps += [
|
|
|
|
":softbus_permission_json",
|
|
|
|
":softbus_server.rc",
|
2021-08-10 03:16:24 +00:00
|
|
|
"$dsoftbus_root_path/adapter:softbus_adapter",
|
2021-11-01 13:36:35 +00:00
|
|
|
"$dsoftbus_root_path/core/common:softbus_utils",
|
2022-12-10 09:35:40 +00:00
|
|
|
"//third_party/cJSON:cjson",
|
2021-06-01 16:05:35 +00:00
|
|
|
]
|
2022-09-22 09:49:52 +00:00
|
|
|
dsoftbus_server_common_external_deps =
|
|
|
|
bus_center_server_external_deps + disc_server_external_deps +
|
2023-05-22 12:37:47 +00:00
|
|
|
softbus_permission_external_deps + trans_session_external_deps +
|
|
|
|
conn_manager_external_deps
|
2021-11-01 13:36:35 +00:00
|
|
|
if (is_standard_system) {
|
2022-09-22 06:47:18 +00:00
|
|
|
external_deps = dsoftbus_server_common_external_deps
|
2021-11-01 13:36:35 +00:00
|
|
|
external_deps += [
|
2022-05-26 06:40:22 +00:00
|
|
|
"access_token:libaccesstoken_sdk",
|
2022-07-22 03:03:30 +00:00
|
|
|
"access_token:libprivacy_sdk",
|
2022-06-17 02:04:38 +00:00
|
|
|
"device_auth:deviceauth_sdk",
|
2023-06-27 03:16:32 +00:00
|
|
|
"hilog:libhilog",
|
2021-11-01 13:36:35 +00:00
|
|
|
"ipc:ipc_core",
|
|
|
|
"safwk:system_ability_fwk",
|
2022-07-21 11:11:29 +00:00
|
|
|
"samgr:samgr_proxy",
|
2021-11-01 13:36:35 +00:00
|
|
|
]
|
2023-05-31 07:38:19 +00:00
|
|
|
if (!defined(global_parts_info) ||
|
|
|
|
defined(global_parts_info.bundlemanager_bundle_framework)) {
|
|
|
|
external_deps += [ "bundle_framework:appexecfwk_core" ]
|
|
|
|
cflags = [ "-DSUPPORT_BUNDLENAME" ]
|
|
|
|
}
|
2021-11-01 13:36:35 +00:00
|
|
|
}
|
|
|
|
|
2022-06-01 09:26:07 +00:00
|
|
|
part_name = "dsoftbus"
|
2021-11-01 13:36:35 +00:00
|
|
|
subsystem_name = "communication"
|
2021-07-13 07:10:49 +00:00
|
|
|
}
|
2021-06-01 16:05:35 +00:00
|
|
|
}
|