1# Copyright (c) 2021~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_base/netmanager_base_config.gni") 16 17group("common_target") { 18 deps = [ 19 ":net_manager_common", 20 "napi_utils:napi_utils", 21 ] 22} 23 24config("netmgr_common_config") { 25 include_dirs = [ 26 "common_utils/include", 27 "log/include", 28 "errorcode_utils/include", 29 "$INNERKITS_ROOT/include", 30 "$INNERKITS_ROOT/netconnclient/include", 31 "$INNERKITS_ROOT/netpolicyclient/include", 32 "$INNERKITS_ROOT/netstatsclient/include", 33 ] 34} 35 36ohos_shared_library("net_manager_common") { 37 sanitize = { 38 cfi = true 39 cfi_cross_dso = true 40 debug = false 41 } 42 43 sources = [ 44 "common_utils/src/base64_utils.cpp", 45 "common_utils/src/event_report.cpp", 46 "common_utils/src/netmanager_base_common_utils.cpp", 47 "common_utils/src/netmanager_base_permission.cpp", 48 "common_utils/src/netmanager_hitrace.cpp", 49 "errorcode_utils/src/errorcode_convertor.cpp", 50 "log/src/net_mgr_log_wrapper.cpp", 51 ] 52 53 defines = [ 54 "NETMGR_LOG_TAG = \"NetMgrCommon\"", 55 "LOG_DOMAIN = 0xD0015B0", 56 ] 57 58 if (enable_netmgr_debug) { 59 defines += [ "NETMGR_DEBUG" ] 60 } 61 62 if (is_standard_system) { 63 defines += [ "STANDARD_SYSTEM_ENABLE" ] 64 } 65 66 public_configs = [ 67 ":netmgr_common_config", 68 "$C_UTILS_ROOT/base:utils_config", 69 ] 70 71 external_deps = [ "hilog:libhilog" ] 72 73 external_deps += [ 74 "access_token:libaccesstoken_sdk", 75 "access_token:libtokenid_sdk", 76 "c_utils:utils", 77 "hisysevent:libhisysevent", 78 "hitrace:hitrace_meter", 79 "ipc:ipc_single", 80 ] 81 82 innerapi_tags = [ "platformsdk" ] 83 part_name = "netmanager_base" 84 subsystem_name = "communication" 85} 86