mirror of
https://gitee.com/openharmony/communication_wifi.git
synced 2024-11-23 15:10:16 +00:00
c6ff56d189
Signed-off-by: f00651013 <fengye10@huawei.com>
125 lines
3.5 KiB
Plaintext
125 lines
3.5 KiB
Plaintext
# Copyright (C) 2021-2022 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.
|
|
|
|
if (defined(ohos_lite)) {
|
|
import("//build/lite/config/component/lite_component.gni")
|
|
import("//foundation/communication/wifi/wifi/wifi_lite.gni")
|
|
|
|
shared_library("wifi_utils") {
|
|
include_dirs = [
|
|
"$WIFI_ROOT_DIR/interfaces/inner_api",
|
|
"$WIFI_ROOT_DIR/frameworks/native/interfaces",
|
|
"$WIFI_ROOT_DIR/services/wifi_standard/wifi_framework/wifi_toolkit/log",
|
|
"$WIFI_ROOT_DIR/utils/inc",
|
|
"//base/hiviewdfx/hilog_lite/interfaces/native/innerkits",
|
|
"//third_party/bounds_checking_function/include",
|
|
]
|
|
|
|
sources = [
|
|
"src/wifi_common_util.cpp",
|
|
"src/wifi_event_handler.cpp",
|
|
]
|
|
|
|
deps = [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared" ]
|
|
|
|
external_deps = [ "bounds_checking_function:libsec_shared" ]
|
|
|
|
configs -= [ "//build/lite/config:language_cpp" ]
|
|
cflags_cc = [
|
|
"-std=c++17",
|
|
"-fno-rtti",
|
|
]
|
|
ldflags = [
|
|
"-fPIC",
|
|
"-Wl,-E",
|
|
]
|
|
defines = [ "OHOS_ARCH_LITE" ]
|
|
}
|
|
} else {
|
|
import("//build/ohos.gni")
|
|
import("//foundation/communication/wifi/wifi/wifi.gni")
|
|
|
|
ohos_shared_library("wifi_utils") {
|
|
branch_protector_ret = "pac_ret"
|
|
|
|
sanitize = {
|
|
cfi = true # Enable/disable control flow integrity detection
|
|
boundary_sanitize = true # Enable boundary san detection
|
|
cfi_cross_dso = true # Cross-SO CFI Checks
|
|
integer_overflow = true # Enable integer overflow detection
|
|
ubsan = true # Enable some Ubsan options
|
|
debug = false
|
|
}
|
|
install_enable = true
|
|
include_dirs = [
|
|
"$WIFI_ROOT_DIR/utils/inc",
|
|
"$WIFI_ROOT_DIR/interfaces/inner_api",
|
|
"$WIFI_ROOT_DIR/frameworks/native/interfaces",
|
|
"$WIFI_ROOT_DIR/services/wifi_standard/wifi_framework/wifi_toolkit/net_helper",
|
|
"$WIFI_ROOT_DIR/services/wifi_standard/wifi_framework/wifi_toolkit/log",
|
|
]
|
|
|
|
sources = [
|
|
"src/wifi_common_util.cpp",
|
|
"src/wifi_event_handler.cpp",
|
|
"src/wifi_hisysevent.cpp",
|
|
"src/wifi_library_utils.cpp",
|
|
"src/wifi_sa_manager.cpp",
|
|
"src/wifi_timer.cpp",
|
|
]
|
|
|
|
deps = []
|
|
|
|
external_deps = [
|
|
"ability_base:want",
|
|
"ability_runtime:app_manager",
|
|
"bundle_framework:appexecfwk_base",
|
|
"bundle_framework:appexecfwk_core",
|
|
"c_utils:utils",
|
|
"eventhandler:libeventhandler",
|
|
"hilog:libhilog",
|
|
"hisysevent:libhisysevent",
|
|
"ipc:ipc_single",
|
|
"jsoncpp:jsoncpp",
|
|
"openssl:libcrypto_shared",
|
|
"openssl:libssl_shared",
|
|
"samgr:samgr_proxy",
|
|
]
|
|
|
|
defines = []
|
|
|
|
if (wifi_ffrt_enable) {
|
|
external_deps += [ "ffrt:libffrt" ]
|
|
defines += [ "WIFI_FFRT_ENABLE" ]
|
|
}
|
|
|
|
cflags = memory_optimization_cflags
|
|
cflags_cc = memory_optimization_cflags_cc
|
|
ldflags = memory_optimization_ldflags
|
|
|
|
cflags_cc += [
|
|
"-std=c++17",
|
|
"-fno-rtti",
|
|
]
|
|
|
|
ldflags += [
|
|
"-fPIC",
|
|
"-Wl,-E",
|
|
]
|
|
|
|
innerapi_tags = [ "platformsdk_indirect" ]
|
|
part_name = "wifi"
|
|
subsystem_name = "communication"
|
|
}
|
|
}
|