1# Copyright (C) 2021-2025 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("//base/security/device_auth/deviceauth_env.gni") 15 16declare_args() { 17 device_auth_storage_path = "" 18} 19 20if (target_os == "liteos" || 21 (defined(ohos_lite) && ohos_kernel_type == "liteos_m")) { 22 hals_inc_path = [ 23 "${common_lib_path}/interfaces", 24 "${key_management_adapter_path}/interfaces", 25 "${key_management_adapter_path}/impl/inc", 26 "${os_adapter_path}/interfaces", 27 "${os_adapter_path}/interfaces/liteos", 28 ] 29 if (defined(ohos_lite) && ohos_kernel_type == "liteos_m" && 30 device_auth_use_customized_key_adapter == true) { 31 hals_inc_path -= [ "${key_management_adapter_path}/impl/inc" ] 32 } 33 hal_module_name = "deviceauth_hal_liteos" 34} else { 35 hals_inc_path = [ 36 "${common_lib_path}/interfaces", 37 "${key_management_adapter_path}/interfaces", 38 "${key_management_adapter_path}/impl/inc", 39 "${os_adapter_path}/interfaces", 40 "${os_adapter_path}/interfaces/linux", 41 ] 42 hal_module_name = "deviceauth_hal_linux" 43 hal_module_test_name = "deviceauth_hal_linux_test" 44} 45 46hal_common_files = [ 47 "${common_lib_path}/impl/src/hc_parcel.c", 48 "${common_lib_path}/impl/src/hc_string.c", 49 "${common_lib_path}/impl/src/hc_string_vector.c", 50 "${common_lib_path}/impl/src/hc_tlv_parser.c", 51 "${common_lib_path}/impl/src/json_utils.c", 52 "${common_lib_path}/impl/src/string_util.c", 53 "${common_lib_path}/impl/src/uint8buff_utils.c", 54 "${key_management_adapter_path}/impl/src/alg_loader.c", 55 56 "${os_adapter_path}/impl/src/hc_mutex.c", 57 "${os_adapter_path}/impl/src/hc_task_thread.c", 58 "${os_adapter_path}/impl/src/hc_time.c", 59] 60