1# Copyright (c) 2022 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("sharing_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "include", 21 "$NETMANAGER_BASE_ROOT/utils/log/include", 22 ] 23 24 cflags = [ 25 "-fstack-protector-strong", 26 "-D_FORTIFY_SOURCE=2", 27 "-O2", 28 ] 29 30 cflags_cc = [ 31 "-fstack-protector-strong", 32 "-D_FORTIFY_SOURCE=2", 33 "-O2", 34 ] 35} 36 37ohos_shared_library("sharing") { 38 sources = [ 39 "src/netshare_async_work.cpp", 40 "src/netshare_callback_observer.cpp", 41 "src/netshare_exec.cpp", 42 "src/netshare_issharing_context.cpp", 43 "src/netshare_module.cpp", 44 "src/netshare_observer_wrapper.cpp", 45 "src/netshare_startsharing_context.cpp", 46 ] 47 48 deps = [ 49 "$NETMANAGER_EXT_ROOT/interfaces/innerkits/netshareclient:net_tether_manager_if", 50 "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common", 51 ] 52 53 external_deps = [ 54 "c_utils:utils", 55 "hilog:libhilog", 56 "ipc:ipc_core", 57 "napi:ace_napi", 58 "netmanager_base:napi_utils", 59 ] 60 61 configs = [ ":sharing_config" ] 62 63 relative_install_dir = "module/net" 64 part_name = "netmanager_ext" 65 subsystem_name = "communication" 66} 67