1060ff233Sopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd.
2060ff233Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3060ff233Sopenharmony_ci# you may not use this file except in compliance with the License.
4060ff233Sopenharmony_ci# You may obtain a copy of the License at
5060ff233Sopenharmony_ci#
6060ff233Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7060ff233Sopenharmony_ci#
8060ff233Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9060ff233Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10060ff233Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11060ff233Sopenharmony_ci# See the License for the specific language governing permissions and
12060ff233Sopenharmony_ci# limitations under the License.
13060ff233Sopenharmony_ci
14060ff233Sopenharmony_cihispark_pegasus_sdk_path = "//device/soc/hisilicon/hi3861v100/sdk_liteos"
15060ff233Sopenharmony_cidsoftbus_root_path = rebase_path(".")
16060ff233Sopenharmony_cidsoftbus_sdk_path = "${dsoftbus_root_path}/sdk"
17060ff233Sopenharmony_cidsoftbus_core_path = "${dsoftbus_root_path}/core"
18060ff233Sopenharmony_cidsoftbus_test_path = "${dsoftbus_root_path}/tests"
19060ff233Sopenharmony_cidsoftbus_fuzz_out_path = "dsoftbus/soft_bus"
20060ff233Sopenharmony_ci
21060ff233Sopenharmony_cideclare_args() {
22060ff233Sopenharmony_ci  softbus_adapter_common = "${dsoftbus_root_path}/adapter/common"
23060ff233Sopenharmony_ci  softbus_adapter_config = "${dsoftbus_root_path}/adapter/default_config"
24060ff233Sopenharmony_ci  dsoftbus_feature_product_config_path =
25060ff233Sopenharmony_ci      "${dsoftbus_root_path}/adapter/default_config"
26060ff233Sopenharmony_ci}
27060ff233Sopenharmony_ci
28060ff233Sopenharmony_cideclare_args() {
29060ff233Sopenharmony_ci  dsoftbus_get_devicename = true
30060ff233Sopenharmony_ci  softbus_communication_wifi_feature = true
31060ff233Sopenharmony_ci  softbus_os_account = true
32060ff233Sopenharmony_ci  dsoftbus_feature_lnn_cloud_sync = true
33060ff233Sopenharmony_ci  softbus_lnn_lp_feature = true
34060ff233Sopenharmony_ci  dsoftbus_build_eng = false
35060ff233Sopenharmony_ci}
36060ff233Sopenharmony_ci
37060ff233Sopenharmony_ciif (defined(global_parts_info) &&
38060ff233Sopenharmony_ci    !defined(global_parts_info.communication_wifi)) {
39060ff233Sopenharmony_ci  softbus_communication_wifi_feature = false
40060ff233Sopenharmony_ci}
41060ff233Sopenharmony_ci
42060ff233Sopenharmony_ciif (defined(global_parts_info) &&
43060ff233Sopenharmony_ci    !defined(global_parts_info.ability_ability_runtime)) {
44060ff233Sopenharmony_ci  dsoftbus_get_devicename = false
45060ff233Sopenharmony_ci}
46060ff233Sopenharmony_ci
47060ff233Sopenharmony_ciif (defined(global_parts_info) &&
48060ff233Sopenharmony_ci    !defined(global_parts_info.account_os_account)) {
49060ff233Sopenharmony_ci  softbus_os_account = false
50060ff233Sopenharmony_ci}
51060ff233Sopenharmony_ci
52060ff233Sopenharmony_ciif (defined(global_parts_info) &&
53060ff233Sopenharmony_ci    !defined(global_parts_info.communication_bluetooth)) {
54060ff233Sopenharmony_ci  support_bluetooth = false
55060ff233Sopenharmony_ci} else {
56060ff233Sopenharmony_ci  support_bluetooth = true
57060ff233Sopenharmony_ci}
58060ff233Sopenharmony_ci
59060ff233Sopenharmony_ciif (defined(global_parts_info) &&
60060ff233Sopenharmony_ci    !defined(global_parts_info.resourceschedule_device_standby_ext)) {
61060ff233Sopenharmony_ci  softbus_lnn_lp_feature = false
62060ff233Sopenharmony_ci}
63060ff233Sopenharmony_ci
64060ff233Sopenharmony_ciif (defined(ohos_lite)) {
65060ff233Sopenharmony_ci  import("//build/lite/config/component/lite_component.gni")
66060ff233Sopenharmony_ci  if (ohos_kernel_type == "liteos_m") {
67060ff233Sopenharmony_ci    defines = [ "SOFTBUS_LITEOS_M" ]
68060ff233Sopenharmony_ci    import("$softbus_adapter_config/feature_config/mini/config.gni")
69060ff233Sopenharmony_ci  } else {
70060ff233Sopenharmony_ci    defines = [ "SOFTBUS_LITEOS_A" ]
71060ff233Sopenharmony_ci    import("$softbus_adapter_config/feature_config/small/config.gni")
72060ff233Sopenharmony_ci  }
73060ff233Sopenharmony_ci} else {
74060ff233Sopenharmony_ci  if (defined(os_win)) {
75060ff233Sopenharmony_ci    os_type = "windows"
76060ff233Sopenharmony_ci  } else {
77060ff233Sopenharmony_ci    os_type = "standard"
78060ff233Sopenharmony_ci  }
79060ff233Sopenharmony_ci  defines = [ "SOFTBUS_LINUX" ]
80060ff233Sopenharmony_ci  import("//build/ohos.gni")
81060ff233Sopenharmony_ci  import(
82060ff233Sopenharmony_ci      "$dsoftbus_feature_product_config_path/feature_config/standard/config.gni")
83060ff233Sopenharmony_ci
84060ff233Sopenharmony_ci  if (build_variant == "root") {
85060ff233Sopenharmony_ci    defines += [ "BUILD_VARIANT_ENG" ]
86060ff233Sopenharmony_ci    dsoftbus_build_eng = true
87060ff233Sopenharmony_ci  } else {
88060ff233Sopenharmony_ci    dsoftbus_build_eng = false
89060ff233Sopenharmony_ci  }
90060ff233Sopenharmony_ci}
91060ff233Sopenharmony_ci
92060ff233Sopenharmony_cidefines += [ "OPENSSL_NO_FILENAMES" ]
93060ff233Sopenharmony_ci
94060ff233Sopenharmony_ciif (defined(global_parts_info) &&
95060ff233Sopenharmony_ci    !defined(global_parts_info.distributeddatamgr_kv_store)) {
96060ff233Sopenharmony_ci  dsoftbus_feature_lnn_cloud_sync = false
97060ff233Sopenharmony_ci} else {
98060ff233Sopenharmony_ci  dsoftbus_feature_lnn_cloud_sync = true
99060ff233Sopenharmony_ci}
100