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 17config("net_conn_manager_if_config") { 18 # header file path 19 include_dirs = [ 20 "include", 21 "include/proxy", 22 "$BASE_INNERKITS_ROOT/include", 23 "$EXT_INNERKITS_ROOT/include", 24 "$BASE_INNERKITS_ROOT/netmanagernative/include", 25 ] 26 27 cflags = [] 28 if (is_double_framework) { 29 cflags += [ "-DCONFIG_DUAL_FRAMEWORK" ] 30 } 31 if (target_cpu == "arm") { 32 cflags += [ "-DBINDER_IPC_32BIT" ] 33 } 34 if (is_standard_system) { 35 cflags += [ "-DCONFIG_STANDARD_SYSTEM" ] 36 } 37 if (defined(build_public_version) && build_public_version) { 38 cflags += [ "-DBUILD_PUBLIC_VERSION" ] 39 } 40} 41 42ohos_source_set("ethernet_parcel") { 43 sources = [ 44 "$ETHERNETMANAGER_INNERKITS_SOURCE_DIR/src/interface_configuration.cpp", 45 "$ETHERNETMANAGER_INNERKITS_SOURCE_DIR/src/static_configuration.cpp", 46 "$NETCONNMANAGER_INNERKITS_SOURCE_DIR/src/inet_addr.cpp", 47 ] 48 49 include_dirs = [ 50 "$BASE_INNERKITS_ROOT/include", 51 "$EXT_INNERKITS_ROOT/include", 52 "$EXT_INNERKITS_ROOT/ethernetclient/include", 53 "$NETMANAGER_EXT_ROOT/utils/log/include", 54 ] 55 56 deps = [ "$NETMANAGER_BASE_ROOT/utils:net_manager_common" ] 57 58 external_deps = [ "c_utils:utils" ] 59 if (is_standard_system) { 60 external_deps += [ "hiviewdfx_hilog_native:libhilog" ] 61 } else { 62 external_deps += [ "hilog:libhilog" ] 63 } 64 65 part_name = "netmanager_ext" 66 subsystem_name = "communication" 67} 68 69ohos_shared_library("ethernet_manager_if") { 70 include_dirs = [ "$NETMANAGER_EXT_ROOT/utils/log/include" ] 71 72 sources = [ 73 "$ETHERNETMANAGER_INNERKITS_SOURCE_DIR/src/ethernet_client.cpp", 74 "$ETHERNETMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ethernet_service_proxy.cpp", 75 ] 76 77 public_configs = [ ":net_conn_manager_if_config" ] 78 79 deps = [ ":ethernet_parcel" ] 80 81 external_deps = [ 82 "ipc:ipc_core", 83 "samgr:samgr_proxy", 84 ] 85 86 defines = [ 87 "NETMGR_LOG_TAG = \"EthernetManager\"", 88 "LOG_DOMAIN = 0xD0015B0", 89 ] 90 91 if (enable_netmgr_ext_debug) { 92 defines += [ "NETMGR_DEBUG" ] 93 } 94 95 if (is_standard_system) { 96 external_deps += [ "hiviewdfx_hilog_native:libhilog" ] 97 } else { 98 external_deps += [ "hilog:libhilog" ] 99 } 100 101 part_name = "netmanager_ext" 102 subsystem_name = "communication" 103} 104