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
|
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",
|
|
|
|
"$softbus_adapter_config/spec_config",
|
2022-06-17 02:04:38 +00:00
|
|
|
"//base/security/device_auth/interfaces/innerkits",
|
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",
|
|
|
|
]
|
|
|
|
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
|
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-06-17 02:04:38 +00:00
|
|
|
"//base/security/device_auth/interfaces/innerkits",
|
2021-11-01 13:36:35 +00:00
|
|
|
"//utils/native/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",
|
2021-11-01 13:36:35 +00:00
|
|
|
"//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"
|
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-22 02:17:09 +00:00
|
|
|
"//base/security/access_token/interfaces/innerkits/privacy/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",
|
|
|
|
"$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",
|
|
|
|
"//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 += [
|
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",
|
2021-11-01 13:36:35 +00:00
|
|
|
"hiviewdfx_hilog_native:libhilog",
|
|
|
|
"ipc:ipc_core",
|
|
|
|
"safwk:system_ability_fwk",
|
|
|
|
"samgr_standard:samgr_proxy",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|