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("//foundation/communication/dsoftbus/dsoftbus.gni") 15AUTH_SERVER_DEFINES = [] 16if (dsoftbus_standard_feature_auth_account == true) { 17 AUTH_SERVER_DEFINES += [ "AUTH_ACCOUNT" ] 18} 19 20authentication_path = "$dsoftbus_root_path/core/authentication" 21if (dsoftbus_standard_feature_lnn_net) { 22 auth_server_src = [ 23 "$authentication_path/src/auth_common.c", 24 "$authentication_path/src/auth_connection.c", 25 "$authentication_path/src/auth_manager.c", 26 "$authentication_path/src/auth_p2p.c", 27 "$authentication_path/src/auth_sessionkey.c", 28 ] 29 if (dsoftbus_standard_feature_ip_auth) { 30 auth_server_src += 31 [ "$dsoftbus_root_path/core/authentication/src/auth_socket.c" ] 32 } else { 33 auth_server_src += 34 [ "$dsoftbus_root_path/core/authentication/src/auth_socket_virtual.c" ] 35 } 36} else { 37 auth_server_src = [ 38 "$authentication_path/src/auth_manager_virtual.c", 39 "$authentication_path/src/auth_socket_virtual.c", 40 ] 41} 42auth_server_inc = [ 43 "$dsoftbus_root_path/core/authentication/include", 44 "$dsoftbus_root_path/core/authentication/interface", 45] 46auth_server_deps = [] 47 48if (defined(ohos_lite)) { 49 if (ohos_kernel_type == "liteos_m") { 50 auth_server_inc += [ "//base/security/deviceauth/interfaces/innerkits" ] 51 if (dsoftbus_standard_feature_lnn_net) { 52 auth_server_deps += [ "//base/security/deviceauth:deviceauth_lite" ] 53 } 54 } else { 55 auth_server_inc += [ "//third_party/cJSON" ] 56 if (dsoftbus_standard_feature_lnn_net) { 57 auth_server_deps += 58 [ "//base/security/deviceauth/services:deviceauth_sdk" ] 59 } 60 } 61} else { 62 auth_server_inc += [ "//base/security/deviceauth/interfaces/innerkits" ] 63} 64