1# Copyright (c) 2022-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_ext/netmanager_ext_config.gni") 16 17config("net_conn_manager_if_config") { 18 include_dirs = [ 19 "include", 20 "include/proxy", 21 "include/proxy/ipccallback", 22 "$EXT_INNERKITS_ROOT/include", 23 ] 24 25 cflags = [] 26 if (is_double_framework) { 27 cflags += [ "-DCONFIG_DUAL_FRAMEWORK" ] 28 } 29 if (target_cpu == "arm") { 30 cflags += [ "-DBINDER_IPC_32BIT" ] 31 } 32 if (is_standard_system) { 33 cflags += [ "-DCONFIG_STANDARD_SYSTEM" ] 34 } 35 if (defined(build_public_version) && build_public_version) { 36 cflags += [ "-DBUILD_PUBLIC_VERSION" ] 37 } 38 39 cflags += [ 40 "-fstack-protector-strong", 41 "-D_FORTIFY_SOURCE=2", 42 "-O2", 43 ] 44 45 cflags_cc = [ 46 "-fstack-protector-strong", 47 "-D_FORTIFY_SOURCE=2", 48 "-O2", 49 ] 50} 51 52ohos_source_set("networkshare_parcel") { 53 sanitize = { 54 cfi = true 55 cfi_cross_dso = true 56 debug = false 57 } 58 59 branch_protector_ret = "pac_ret" 60 61 sources = [ "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/network_share_request_parcel.cpp" ] 62 63 include_dirs = [ 64 "$EXT_INNERKITS_ROOT/include", 65 "$EXT_INNERKITS_ROOT/netshareclient/include", 66 "$NETMANAGER_EXT_ROOT/utils/log/include", 67 ] 68 69 external_deps = [ 70 "bounds_checking_function:libsec_shared", 71 "netmanager_base:net_conn_parcel", 72 "netmanager_base:net_manager_common", 73 ] 74 75 external_deps += [ "hilog:libhilog" ] 76 77 part_name = "netmanager_ext" 78 subsystem_name = "communication" 79} 80 81ohos_shared_library("net_tether_manager_if") { 82 sanitize = { 83 cfi = true 84 cfi_cross_dso = true 85 debug = false 86 } 87 88 branch_protector_ret = "pac_ret" 89 90 include_dirs = [ "$NETMANAGER_EXT_ROOT/utils/log/include" ] 91 92 sources = [ 93 "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/networkshare_client.cpp", 94 "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/netshare_result_callback_proxy.cpp", 95 "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/netshare_result_callback_stub.cpp", 96 "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/sharing_event_callback_proxy.cpp", 97 "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/sharing_event_callback_stub.cpp", 98 "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/networkshare_service_proxy.cpp", 99 ] 100 101 version_script = "libnetshare_kits.map" 102 103 public_configs = [ ":net_conn_manager_if_config" ] 104 105 deps = [ ":networkshare_parcel" ] 106 107 external_deps = [ 108 "c_utils:utils", 109 "ipc:ipc_single", 110 "samgr:samgr_proxy", 111 ] 112 113 public_external_deps = [ "netmanager_base:net_manager_common" ] 114 115 defines = [ 116 "NETMGR_LOG_TAG = \"NetworkShareManager\"", 117 "LOG_DOMAIN = 0xD0015B0", 118 ] 119 120 if (enable_netmgr_ext_debug) { 121 defines += [ "NETMGR_DEBUG" ] 122 } 123 124 external_deps += [ "hilog:libhilog" ] 125 126 innerapi_tags = [ "platformsdk" ] 127 part_name = "netmanager_ext" 128 subsystem_name = "communication" 129} 130