communication_dsoftbus/core/frame/BUILD.gn

186 lines
6.9 KiB
Plaintext
Raw Normal View History

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.
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")
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
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",
]
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 {
ohos_prebuilt_etc("softbus_server.rc") {
relative_install_dir = "init"
if (use_musl) {
source = "$dsoftbus_root_path/core/frame/$os_type/init/src/softbus_server_musl.cfg"
} else {
source =
"$dsoftbus_root_path/core/frame/$os_type/init/src/softbus_server.cfg"
}
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/$os_type/client_manager/include",
"$dsoftbus_root_path/core/frame/$os_type/init/include",
"$dsoftbus_root_path/interfaces/kits/common",
"$dsoftbus_root_path/interfaces/kits/transport",
"$dsoftbus_standard_feature_product_config_path/spec_config",
"$dsoftbus_root_path/core/common/include",
2021-06-01 16:05:35 +00:00
]
sources = dsoftbus_server_common_src
sources += [
"$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",
"common/src/softbus_server_frame.c",
2021-06-01 16:05:35 +00:00
]
deps = dsoftbus_server_common_deps
deps += [
":softbus_permission_json",
":softbus_server.rc",
"$dsoftbus_root_path/adapter:softbus_adapter",
"$dsoftbus_root_path/core/common:softbus_utils",
"//third_party/cJSON:cjson_static",
"//utils/native/base:utils",
2021-06-01 16:05: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-06-01 16:05:35 +00:00
}