• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021-2022 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("//build/ohos.gni")
15
16config("huks_config") {
17  include_dirs = [ "include" ]
18}
19
20if (os_level == "standard") {
21  ohos_shared_library("libhukssdk") {
22    sanitize = {
23      integer_overflow = true
24      cfi = true
25      debug = false
26    }
27    subsystem_name = "security"
28    part_name = "huks"
29    public_configs = [ ":huks_config" ]
30    configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ]
31    defines = [
32      "L2_STANDARD",
33      "_HARDWARE_ROOT_KEY_",
34      "_HUKS_LOG_ENABLE_",
35    ]
36    include_dirs = [
37      "//base/security/huks/utils/crypto_adapter",
38      "//commonlibrary/c_utils/base/include",
39    ]
40
41    sources = [
42      "src/hks_api.c",
43      "src/hks_api_adapter.c",
44    ]
45
46    cflags = [
47      "-Wall",
48      "-Werror",
49    ]
50    deps = [
51      "//base/security/huks/frameworks/huks_standard/main:huks_standard_frameworks",
52      "//base/security/huks/utils/crypto_adapter:libhuks_utils_client_service_adapter_static",
53    ]
54    external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
55  }
56}
57
58if (os_level == "small" || os_level == "mini") {
59  group("libhukssdk") {
60  }
61}
62