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.
|
|
|
|
|
2021-11-01 13:36:35 +00:00
|
|
|
import("//foundation/communication/dsoftbus/core/adapter/core_adapter.gni")
|
|
|
|
import(
|
|
|
|
"//foundation/communication/dsoftbus/core/authentication/authentication.gni")
|
|
|
|
import(
|
|
|
|
"//foundation/communication/dsoftbus/core/bus_center/bus_center_server.gni")
|
|
|
|
import(
|
|
|
|
"//foundation/communication/dsoftbus/core/common/security/permission/permission.gni")
|
|
|
|
import("//foundation/communication/dsoftbus/core/connection/conn.gni")
|
|
|
|
import("//foundation/communication/dsoftbus/core/discovery/disc.gni")
|
|
|
|
import("//foundation/communication/dsoftbus/core/transmission/trans.gni")
|
2021-06-01 16:05:35 +00:00
|
|
|
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
|
|
|
|
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 =
|
|
|
|
auth_server_deps + bus_center_server_deps + conn_manager_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
|
|
|
|
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",
|
|
|
|
"$softbus_adapter_config/spec_config",
|
|
|
|
"//base/security/deviceauth/interfaces/innerkits",
|
|
|
|
]
|
|
|
|
sources = dsoftbus_server_common_src
|
|
|
|
sources += [
|
|
|
|
"common/src/softbus_server_frame.c",
|
|
|
|
"mini/src/softbus_server_stub.c",
|
|
|
|
]
|
|
|
|
cflags = [
|
|
|
|
"-Wall",
|
|
|
|
"-fPIC",
|
|
|
|
"-std=c99",
|
|
|
|
]
|
|
|
|
cflags_cc = cflags
|
|
|
|
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",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
shared_library("softbus_server_frame") {
|
|
|
|
defines = AUTH_SERVER_DEFINES
|
|
|
|
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",
|
|
|
|
"//base/security/deviceauth/interfaces/innerkits",
|
|
|
|
"//utils/native/lite/include",
|
|
|
|
]
|
|
|
|
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",
|
|
|
|
"//foundation/communication/ipc_lite:liteipc_adapter",
|
|
|
|
"//foundation/distributedschedule/samgr_lite/samgr:samgr",
|
|
|
|
"//third_party/bounds_checking_function:libsec_shared",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
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"
|
2021-12-22 08:59:43 +00:00
|
|
|
source =
|
|
|
|
"$dsoftbus_root_path/core/frame/standard/init/src/softbus_server.cfg"
|
|
|
|
|
2021-11-01 13:36:35 +00:00
|
|
|
part_name = "dsoftbus_standard"
|
|
|
|
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"
|
|
|
|
part_name = "dsoftbus_standard"
|
|
|
|
}
|
|
|
|
ohos_shared_library("softbus_server") {
|
|
|
|
defines = AUTH_SERVER_DEFINES
|
|
|
|
include_dirs = dsoftbus_server_common_inc
|
|
|
|
include_dirs += [
|
|
|
|
"$dsoftbus_root_path/core/frame/common/include",
|
|
|
|
"$dsoftbus_root_path/core/frame/standard/client_manager/include",
|
|
|
|
"$dsoftbus_root_path/core/frame/standard/init/include",
|
|
|
|
"$dsoftbus_root_path/interfaces/kits/common",
|
2021-07-13 07:10:49 +00:00
|
|
|
"$dsoftbus_root_path/interfaces/kits/transport",
|
2022-03-17 13:26:10 +00:00
|
|
|
"$dsoftbus_standard_feature_product_config_path/spec_config",
|
2021-11-01 13:36:35 +00:00
|
|
|
"$dsoftbus_root_path/core/common/include",
|
2021-06-01 16:05:35 +00:00
|
|
|
]
|
2021-11-01 13:36:35 +00:00
|
|
|
sources = dsoftbus_server_common_src
|
|
|
|
sources += [
|
2022-01-26 01:44:00 +00:00
|
|
|
"$dsoftbus_root_path/sdk/frame/standard/src/if_softbus_client.cpp",
|
2021-07-13 07:10:49 +00:00
|
|
|
"common/src/softbus_server_frame.c",
|
2021-11-01 13:36:35 +00:00
|
|
|
"standard/client_manager/src/softbus_client_info_manager.cpp",
|
|
|
|
"standard/init/src/if_softbus_server.cpp",
|
|
|
|
"standard/init/src/softbus_server.cpp",
|
|
|
|
"standard/init/src/softbus_server_death_recipient.cpp",
|
|
|
|
"standard/init/src/softbus_server_stub.cpp",
|
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",
|
|
|
|
"//third_party/cJSON:cjson_static",
|
|
|
|
"//utils/native/base:utils",
|
2021-06-01 16:05:35 +00:00
|
|
|
]
|
2021-11-01 13:36:35 +00:00
|
|
|
if (is_standard_system) {
|
|
|
|
external_deps = bus_center_server_external_deps
|
|
|
|
external_deps += [
|
|
|
|
"deviceauth_standard:deviceauth_sdk",
|
|
|
|
"hiviewdfx_hilog_native:libhilog",
|
|
|
|
"ipc:ipc_core",
|
|
|
|
"safwk:system_ability_fwk",
|
|
|
|
"samgr_standard:samgr_proxy",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
part_name = "dsoftbus_standard"
|
|
|
|
subsystem_name = "communication"
|
2021-07-13 07:10:49 +00:00
|
|
|
}
|
2021-06-01 16:05:35 +00:00
|
|
|
}
|