xref: /test/xts/acts/security_lite/huks/common/BUILD.gn (revision f6603c60)
1f6603c60Sopenharmony_ci#
2f6603c60Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd.
3f6603c60Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
4f6603c60Sopenharmony_ci# you may not use this file except in compliance with the License.
5f6603c60Sopenharmony_ci# You may obtain a copy of the License at
6f6603c60Sopenharmony_ci#
7f6603c60Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
8f6603c60Sopenharmony_ci#
9f6603c60Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
10f6603c60Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
11f6603c60Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12f6603c60Sopenharmony_ci# See the License for the specific language governing permissions and
13f6603c60Sopenharmony_ci# limitations under the License.
14f6603c60Sopenharmony_ci#
15f6603c60Sopenharmony_ci
16f6603c60Sopenharmony_ciconfig("hilog_dir") {
17f6603c60Sopenharmony_ci  include_dirs =
18f6603c60Sopenharmony_ci      [ "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits/hilog/" ]
19f6603c60Sopenharmony_ci}
20f6603c60Sopenharmony_ciconfig("hilog_lite_dir") {
21f6603c60Sopenharmony_ci  include_dirs =
22f6603c60Sopenharmony_ci      [ "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite/" ]
23f6603c60Sopenharmony_ci}
24f6603c60Sopenharmony_ci
25f6603c60Sopenharmony_ciconfig("huks_test_common_dir") {
26f6603c60Sopenharmony_ci  include_dirs = [
27f6603c60Sopenharmony_ci    "//base/security/huks/interfaces/inner_api/huks_standard/main/include",
28f6603c60Sopenharmony_ci    "//third_party/bounds_checking_function/include",
29f6603c60Sopenharmony_ci    "include",
30f6603c60Sopenharmony_ci  ]
31f6603c60Sopenharmony_ci}
32f6603c60Sopenharmony_ci
33f6603c60Sopenharmony_cistatic_library("huks_test_common") {
34f6603c60Sopenharmony_ci  sources = [
35f6603c60Sopenharmony_ci    "hks_test_aes.c",
36f6603c60Sopenharmony_ci    "hks_test_api_performance.c",
37f6603c60Sopenharmony_ci    "hks_test_cipher.c",
38f6603c60Sopenharmony_ci    "hks_test_common.c",
39f6603c60Sopenharmony_ci    "hks_test_curve25519.c",
40f6603c60Sopenharmony_ci    "hks_test_file_operator.c",
41f6603c60Sopenharmony_ci
42f6603c60Sopenharmony_ci    #"hks_test_log.c",
43f6603c60Sopenharmony_ci    "hks_test_mem.c",
44f6603c60Sopenharmony_ci  ]
45f6603c60Sopenharmony_ci
46f6603c60Sopenharmony_ci  deps = []
47f6603c60Sopenharmony_ci  include_dirs = [
48f6603c60Sopenharmony_ci    "//commonlibrary/c_utils/base/include",
49f6603c60Sopenharmony_ci    "//third_party/bounds_checking_function/include",
50f6603c60Sopenharmony_ci
51f6603c60Sopenharmony_ci    #"unittest/include",
52f6603c60Sopenharmony_ci    "include",
53f6603c60Sopenharmony_ci  ]
54f6603c60Sopenharmony_ci
55f6603c60Sopenharmony_ci  configs += [ ":huks_test_common_dir" ]
56f6603c60Sopenharmony_ci
57f6603c60Sopenharmony_ci  if (defined(ohos_lite)) {
58f6603c60Sopenharmony_ci    if (ohos_kernel_type == "liteos_m") {
59f6603c60Sopenharmony_ci      configs += [ ":hilog_lite_dir" ]
60f6603c60Sopenharmony_ci      deps += [ "//base/hiviewdfx/hilog_lite/frameworks/mini:hilog_lite" ]
61f6603c60Sopenharmony_ci    } else if (ohos_kernel_type == "liteos_a") {
62f6603c60Sopenharmony_ci      configs += [ ":hilog_dir" ]
63f6603c60Sopenharmony_ci      deps += [
64f6603c60Sopenharmony_ci        "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
65f6603c60Sopenharmony_ci        "//third_party/bounds_checking_function:libsec_shared",
66f6603c60Sopenharmony_ci      ]
67f6603c60Sopenharmony_ci    }
68f6603c60Sopenharmony_ci  }
69f6603c60Sopenharmony_ci}
70