1# Copyright (c) 2021 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("../../../dsoftbus.gni") 15 16conn_common_inc = [ 17 "$dsoftbus_root_path/core/connection/interface", 18 "$dsoftbus_root_path/core/connection/common/include", 19 "$dsoftbus_root_path/core/connection/manager", 20 "$dsoftbus_root_path/core/transmission/trans_channel/proxy/include", 21] 22conn_common_src = 23 [ "$dsoftbus_root_path/core/connection/common/src/softbus_conn_common.c" ] 24 25if (dsoftbus_feature_conn_tcp_comm) { 26 conn_common_src += [ 27 "$dsoftbus_root_path/core/connection/common/src/softbus_base_listener.c", 28 "$dsoftbus_root_path/core/connection/common/src/softbus_datahead_transform.c", 29 "$dsoftbus_root_path/core/connection/common/src/softbus_socket.c", 30 "$dsoftbus_root_path/core/connection/common/src/softbus_tcp_socket.c", 31 ] 32 if (defined(ohos_lite) && ohos_kernel_type == "liteos_m") { 33 conn_common_src += [ "$dsoftbus_root_path/core/connection/common/src/softbus_select_event_implement.c" ] 34 } else { 35 conn_common_src += [ "$dsoftbus_root_path/core/connection/common/src/softbus_epoll_event_implement.c" ] 36 } 37 native_source_path = rebase_path("$dsoftbus_root_path") 38 newip_dir = "dsoftbus_enhance/components/newip/network" 39 newip_enhanced = exec_script("$dsoftbus_root_path/check_sub_module.py", 40 [ 41 "$native_source_path", 42 "$newip_dir", 43 ], 44 "value") 45 if (newip_enhanced) { 46 import("../../../dsoftbus_enhance/components/newip/network/network.gni") 47 48 conn_common_src += newip_connection_src 49 conn_common_inc += newip_connection_include 50 } 51} else { 52 conn_common_src += [ 53 "$dsoftbus_root_path/core/connection/common/src/softbus_base_listener_virtual.c", 54 "$dsoftbus_root_path/core/connection/common/src/softbus_datahead_transform_virtual.c", 55 "$dsoftbus_root_path/core/connection/common/src/softbus_socket_virtual.c", 56 "$dsoftbus_root_path/core/connection/common/src/softbus_tcp_socket_virtual.c", 57 ] 58} 59