mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-12-13 21:08:44 +00:00
57b9c5b4bd
Signed-off-by: wangwang16 <wangwang16@huawei.com>
130 lines
4.1 KiB
Plaintext
130 lines
4.1 KiB
Plaintext
# 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("../core/common/dfx/dsoftbus_dfx.gni")
|
|
import("../dsoftbus.gni")
|
|
import("bus_center/bus_center_sdk.gni")
|
|
import("discovery/disc_sdk.gni")
|
|
import("frame/frame_sdk.gni")
|
|
import("transmission/trans_sdk.gni")
|
|
|
|
dsoftbus_root_path = ".."
|
|
|
|
common_client_src = bus_center_sdk_src + disc_sdk_src +
|
|
softbus_client_frame_src + trans_session_manager_sdk_src
|
|
common_client_inc = bus_center_sdk_inc + disc_sdk_inc +
|
|
softbus_client_frame_inc + trans_session_manager_sdk_inc
|
|
common_client_deps = bus_center_sdk_deps + trans_session_manager_sdk_deps
|
|
|
|
common_client_ext_deps = []
|
|
|
|
common_client_deps += [
|
|
"$dsoftbus_dfx_path/anonymize:softbus_dfx_anonymizer",
|
|
"$dsoftbus_dfx_path/log:softbus_dfx_log",
|
|
"$dsoftbus_root_path/adapter:softbus_adapter",
|
|
"$dsoftbus_root_path/core/common:softbus_utils",
|
|
]
|
|
|
|
if (defined(ohos_lite)) {
|
|
if (dsoftbus_feature_build_shared_sdk == true) {
|
|
build_type = "shared_library"
|
|
} else {
|
|
build_type = "static_library"
|
|
}
|
|
if (ohos_kernel_type != "liteos_m") {
|
|
common_client_deps += [
|
|
"//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single",
|
|
"//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
|
|
]
|
|
common_client_ext_deps += [ "bounds_checking_function:libsec_shared" ]
|
|
}
|
|
} else {
|
|
if (dsoftbus_feature_build_shared_sdk == true) {
|
|
build_type = "ohos_shared_library"
|
|
} else {
|
|
build_type = "ohos_static_library"
|
|
}
|
|
common_client_ext_deps += [ "bounds_checking_function:libsec_shared" ]
|
|
}
|
|
|
|
config("dsoftbus_sdk_interface") {
|
|
include_dirs = [
|
|
"$dsoftbus_root_path/interfaces/kits",
|
|
"$dsoftbus_root_path/interfaces/inner_kits/lnn",
|
|
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
|
"$dsoftbus_root_path/interfaces/kits/common",
|
|
"$dsoftbus_root_path/interfaces/kits/discovery",
|
|
"$dsoftbus_root_path/interfaces/kits/transport",
|
|
"$dsoftbus_root_path/sdk/transmission/session/cpp/include",
|
|
"$dsoftbus_root_path/interfaces/inner_kits/transport",
|
|
"$dsoftbus_root_path/core/common/dfx/hisysevent_adapter/include",
|
|
"$dsoftbus_root_path/core/common/dfx/interface/include",
|
|
]
|
|
|
|
if (enhanced_kits_broadcast) {
|
|
include_dirs +=
|
|
[ "$dsoftbus_root_path/dsoftbus_enhance/interfaces/kits/broadcast" ]
|
|
}
|
|
|
|
if (dsoftbus_feature_ex_kits) {
|
|
include_dirs +=
|
|
[ "$dsoftbus_root_path/dsoftbus_enhance/interfaces/kits/bus_center" ]
|
|
}
|
|
}
|
|
|
|
target(build_type, "softbus_client") {
|
|
sources = common_client_src
|
|
include_dirs = common_client_inc
|
|
deps = common_client_deps
|
|
external_deps = common_client_ext_deps + libsoftbus_stream_ext_deps
|
|
all_dependent_configs = [ ":dsoftbus_sdk_interface" ]
|
|
public_configs = [ ":dsoftbus_sdk_interface" ]
|
|
defines += TRANS_SDK_DEFINES
|
|
|
|
if (defined(ohos_lite)) {
|
|
cflags_cc = [ "-stdc=c++14" ]
|
|
if (board_toolchain_type != "iccarm") {
|
|
configs -= [ "//build/lite/config:language_cpp" ]
|
|
cflags = [ "-fPIC" ]
|
|
cflags_cc += [ "-fPIC" ]
|
|
} else {
|
|
cflags = [
|
|
"--diag_suppress",
|
|
"Pa153",
|
|
]
|
|
}
|
|
ldflags = [ "-lstdc++" ]
|
|
} else {
|
|
sanitize = {
|
|
cfi = true
|
|
cfi_cross_dso = true
|
|
debug = false
|
|
}
|
|
branch_protector_ret = "pac_ret"
|
|
|
|
version_script = "libsoftbus_client_map"
|
|
cflags = [ "-fPIC" ]
|
|
cflags_cc = [ "-std=c++14" ]
|
|
if (is_standard_system) {
|
|
external_deps += [
|
|
"c_utils:utils",
|
|
"hilog:libhilog",
|
|
"ipc:ipc_single",
|
|
]
|
|
}
|
|
innerapi_tags = [ "platformsdk_indirect" ]
|
|
part_name = "dsoftbus"
|
|
subsystem_name = "communication"
|
|
}
|
|
}
|