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 14hispark_pegasus_sdk_path = "//device/soc/hisilicon/hi3861v100/sdk_liteos" 15dsoftbus_root_path = rebase_path(".") 16dsoftbus_sdk_path = "${dsoftbus_root_path}/sdk" 17dsoftbus_core_path = "${dsoftbus_root_path}/core" 18dsoftbus_test_path = "${dsoftbus_root_path}/tests" 19dsoftbus_fuzz_out_path = "dsoftbus/soft_bus" 20 21declare_args() { 22 softbus_adapter_common = "${dsoftbus_root_path}/adapter/common" 23 softbus_adapter_config = "${dsoftbus_root_path}/adapter/default_config" 24 dsoftbus_feature_product_config_path = 25 "${dsoftbus_root_path}/adapter/default_config" 26} 27 28declare_args() { 29 dsoftbus_get_devicename = true 30 softbus_communication_wifi_feature = true 31 softbus_os_account = true 32 dsoftbus_feature_lnn_cloud_sync = true 33 softbus_lnn_lp_feature = true 34 dsoftbus_build_eng = false 35} 36 37if (defined(global_parts_info) && 38 !defined(global_parts_info.communication_wifi)) { 39 softbus_communication_wifi_feature = false 40} 41 42if (defined(global_parts_info) && 43 !defined(global_parts_info.ability_ability_runtime)) { 44 dsoftbus_get_devicename = false 45} 46 47if (defined(global_parts_info) && 48 !defined(global_parts_info.account_os_account)) { 49 softbus_os_account = false 50} 51 52if (defined(global_parts_info) && 53 !defined(global_parts_info.communication_bluetooth)) { 54 support_bluetooth = false 55} else { 56 support_bluetooth = true 57} 58 59if (defined(global_parts_info) && 60 !defined(global_parts_info.resourceschedule_device_standby_ext)) { 61 softbus_lnn_lp_feature = false 62} 63 64if (defined(ohos_lite)) { 65 import("//build/lite/config/component/lite_component.gni") 66 if (ohos_kernel_type == "liteos_m") { 67 defines = [ "SOFTBUS_LITEOS_M" ] 68 import("$softbus_adapter_config/feature_config/mini/config.gni") 69 } else { 70 defines = [ "SOFTBUS_LITEOS_A" ] 71 import("$softbus_adapter_config/feature_config/small/config.gni") 72 } 73} else { 74 if (defined(os_win)) { 75 os_type = "windows" 76 } else { 77 os_type = "standard" 78 } 79 defines = [ "SOFTBUS_LINUX" ] 80 import("//build/ohos.gni") 81 import( 82 "$dsoftbus_feature_product_config_path/feature_config/standard/config.gni") 83 84 if (build_variant == "root") { 85 defines += [ "BUILD_VARIANT_ENG" ] 86 dsoftbus_build_eng = true 87 } else { 88 dsoftbus_build_eng = false 89 } 90} 91 92defines += [ "OPENSSL_NO_FILENAMES" ] 93 94if (defined(global_parts_info) && 95 !defined(global_parts_info.distributeddatamgr_kv_store)) { 96 dsoftbus_feature_lnn_cloud_sync = false 97} else { 98 dsoftbus_feature_lnn_cloud_sync = true 99} 100