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_ext/netmanager_ext_config.gni") 16 17group("common_target") { 18 deps = [ 19 ":net_event_report", 20 ":net_manager_ext_common", 21 ] 22} 23 24config("netmgr_ext_common_config") { 25 include_dirs = [ 26 "log/include", 27 "event_report/include", 28 ] 29} 30 31ohos_shared_library("net_manager_ext_common") { 32 sources = [ "log/src/netmgr_ext_log_wrapper.cpp" ] 33 34 defines = [ 35 "NETMGR_EXT_LOG_TAG = \"NetMgrExtCommon\"", 36 "LOG_DOMAIN = 0xD0015B0", 37 ] 38 39 if (is_standard_system) { 40 defines += [ "STANDARD_SYSTEM_ENABLE" ] 41 } 42 43 public_configs = [ 44 ":netmgr_ext_common_config", 45 "$C_UTILS_ROOT/base:utils_config", 46 ] 47 48 cflags = [ 49 "-fstack-protector-strong", 50 "-D_FORTIFY_SOURCE=2", 51 "-O2", 52 ] 53 54 if (is_double_framework) { 55 cflags_cc = [ "-DCONFIG_DUAL_FRAMEWORK" ] 56 cflags_cc += [ "-fstack-protector-strong" ] 57 } else { 58 cflags_cc = [ "-fstack-protector-strong" ] 59 } 60 61 cflags_cc += [ 62 "-D_FORTIFY_SOURCE=2", 63 "-O2", 64 ] 65 66 if (is_standard_system) { 67 external_deps = [ 68 "c_utils:utils", 69 "hilog:libhilog", 70 ] 71 } else { 72 external_deps = [ 73 "c_utils:utils", 74 "hilog:libhilog", 75 ] 76 } 77 78 part_name = "netmanager_ext" 79 subsystem_name = "communication" 80} 81 82ohos_shared_library("net_event_report") { 83 cflags = [ 84 "-fstack-protector-strong", 85 "-D_FORTIFY_SOURCE=2", 86 "-O2", 87 ] 88 89 cflags_cc = [ 90 "-fstack-protector-strong", 91 "-D_FORTIFY_SOURCE=2", 92 "-O2", 93 ] 94 95 sources = [ "event_report/src/net_event_report.cpp" ] 96 97 public_configs = [ ":netmgr_ext_common_config" ] 98 99 external_deps = [ "hisysevent:libhisysevent" ] 100 101 part_name = "netmanager_ext" 102 subsystem_name = "communication" 103} 104