1# Copyright (c) 2023-2024 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("//foundation/communication/netmanager_base/netmanager_base_config.gni") 16 17config("net_connection_config"){ 18 include_dirs = [ "//foundation/communication/netmanager_base/interfaces/kits/c/netconnclient/include" ] 19} 20 21ohos_shared_library("net_connection") { 22 sanitize = { 23 cfi = true 24 cfi_cross_dso = true 25 debug = false 26 } 27 28 branch_protector_ret = "pac_ret" 29 30 output_extension = "so" 31 include_dirs = 32 [ "$NETMANAGER_BASE_ROOT/interfaces/kits/c/netconnclient/include" ] 33 34 public_configs = [ ":net_connection_config" ] 35 36 sources = [ 37 "$NETMANAGER_BASE_ROOT/interfaces/kits/c/netconnclient/src/net_probe.cpp", 38 "$NETMANAGER_BASE_ROOT/frameworks/js/napi/netstats/src/net_connection_adapter.cpp", 39 "$NETMANAGER_BASE_ROOT/interfaces/kits/c/netconnclient/src/net_connection.cpp", 40 ] 41 42 cflags = [ 43 "-fstack-protector-strong", 44 "-D_FORTIFY_SOURCE=2", 45 "-O2", 46 ] 47 48 cflags_cc = [ 49 "-fstack-protector-strong", 50 "-D_FORTIFY_SOURCE=2", 51 "-O2", 52 ] 53 54 deps = [ 55 "$INNERKITS_ROOT/netconnclient:net_conn_manager_if", 56 "$NETMANAGER_BASE_ROOT/utils:net_manager_common", 57 ] 58 59 external_deps = [ 60 "c_utils:utils", 61 "hilog:libhilog", 62 "ipc:ipc_core", 63 "samgr:samgr_proxy", 64 ] 65 66 part_name = "netmanager_base" 67 subsystem_name = "communication" 68 relative_install_dir = "ndk" 69} 70