• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (c) 2020-2022 Huawei Device Co., Ltd.
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15import("//build/ohos.gni")
16
17ohos_shared_library("cipher_shared") {
18  if (os_level == "standard") {
19    subsystem_name = "security"
20    part_name = "huks"
21  }
22
23  sources = [
24    "src/cipher_aes.c",
25    "src/cipher_rsa.c",
26  ]
27
28  if (os_level == "small") {
29    sources += [ "src/cipher_log_lite.c" ]
30  } else if (os_level == "standard") {
31    sources += [ "src/cipher_log.c" ]
32  }
33
34  include_dirs = [
35    "include",
36    "//third_party/bounds_checking_function/include",
37  ]
38  deps = [
39    "//third_party/bounds_checking_function:libsec_shared",
40    "//third_party/mbedtls",
41  ]
42
43  if (os_level == "small") {
44    deps += [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared" ]
45  } else if (os_level == "standard") {
46    external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
47    include_dirs +=
48        [ "//base/hiviewdfx/hilog/interfaces/native/innerkits/include" ]
49  }
50
51  cflags = [
52    "-Wall",
53    "-Werror",
54    "-Wno-format",
55    "-Wno-format-extra-args",
56  ]
57}
58