# Copyright (c) 2020 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//base/startup/init/begetd.gni") import("../config.gni") if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton") { if (enable_ohos_startup_init_feature_begetctl_liteos == false) { static_library("sysparam") { include_dirs = [ "//base/startup/syspara_lite/interfaces/kits", "//commonlibrary/utils_lite/include", "//base/startup/syspara_lite/frameworks/parameter/src", "//base/startup/syspara_lite/hals", "//third_party/mbedtls/include", ] sources = [ "parameter_common.c" ] if (enable_ohos_startup_init_lite_use_posix_file_api) { sources += [ "param_impl_posix/param_impl_posix.c" ] } else { sources += [ "param_impl_hal/param_impl_hal.c" ] } deps = [ "$ohos_product_adapter_dir/utils/sys_param:hal_sysparam" ] if (enable_ohos_startup_init_lite_use_thirdparty_mbedtls) { deps += [ "//third_party/mbedtls:mbedtls" ] } if (enable_ohos_startup_init_lite_use_posix_file_api) { deps += [ "//third_party/bounds_checking_function:libsec_static" ] } defines = [ "INCREMENTAL_VERSION=\"${ohos_version}\"", "BUILD_TYPE=\"${ohos_build_type}\"", "BUILD_USER=\"${ohos_build_user}\"", "BUILD_TIME=\"${ohos_build_time}\"", "BUILD_HOST=\"${ohos_build_host}\"", "BUILD_ROOTHASH=\"${ohos_build_roothash}\"", "USE_MBEDTLS", "DATA_PATH=\"${config_ohos_startup_syspara_lite_data_path}\"", ] } } else { group("sysparam") { deps = [ "//base/startup/init/interfaces/innerkits:libbegetutil" ] } } } else { shared_library("sysparam") { public_deps = [ "//base/startup/init/interfaces/innerkits:libbegetutil", "//third_party/bounds_checking_function:libsec_shared", ] } }