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("//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  hal_module_name = "deviceauth_hal_liteos"
30} else {
31  hals_inc_path = [
32    "${common_lib_path}/interfaces",
33    "${key_management_adapter_path}/interfaces",
34    "${key_management_adapter_path}/impl/inc",
35    "${os_adapter_path}/interfaces",
36    "${os_adapter_path}/interfaces/linux",
37  ]
38  hal_module_name = "deviceauth_hal_linux"
39  hal_module_test_name = "deviceauth_hal_linux_test"
40}
41
42hal_common_files = [
43  "${common_lib_path}/impl/src/hc_parcel.c",
44  "${common_lib_path}/impl/src/hc_string.c",
45  "${common_lib_path}/impl/src/hc_string_vector.c",
46  "${common_lib_path}/impl/src/hc_tlv_parser.c",
47  "${common_lib_path}/impl/src/json_utils.c",
48  "${common_lib_path}/impl/src/string_util.c",
49  "${common_lib_path}/impl/src/uint8buff_utils.c",
50  "${key_management_adapter_path}/impl/src/alg_loader.c",
51
52  "${os_adapter_path}/impl/src/hc_mutex.c",
53  "${os_adapter_path}/impl/src/hc_task_thread.c",
54  "${os_adapter_path}/impl/src/hc_time.c",
55]
56