• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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.
13import("//build/ohos.gni")
14import("//foundation/filemanagement/storage_service/storage_service_aafwk.gni")
15
16## build sm execute bin file
17config("fscrypt_utils_config") {
18  visibility = [ ":*" ]
19
20  include_dirs = [
21    "../include/libfscrypt",
22    "${start_init_interfaces_path}/innerkits/include",
23    "${start_init_services_path}/log",
24    "${start_init_services_path}/include",
25    "${start_init_services_path}/include/param",
26  ]
27
28  cflags = [
29    "-g3",
30    "-Wall",
31  ]
32}
33
34ohos_static_library("libfscryptutils") {
35  output_name = "libfscryptutils"
36  sources = [
37    "src/fscrypt_control.c",
38    "src/fscrypt_utils.c",
39    "src/init_utils.c",
40    "src/key_control.c",
41    "src/sysparam_dynamic.c",
42  ]
43
44  if (storage_service_user_crypto_manager) {
45    defines = [ "USER_CRYPTO_MANAGER" ]
46  }
47
48  configs = [ ":fscrypt_utils_config" ]
49
50  external_deps = [
51    "c_utils:utils",
52    "init:libbegetutil",
53  ]
54
55  subsystem_name = "filemanagement"
56  part_name = "storage_service"
57}
58
59ohos_static_library("libfscryptutils_static") {
60  output_name = "libfscryptutils_static"
61  sources = [
62    "src/fscrypt_control.c",
63    "src/fscrypt_utils.c",
64    "src/key_control.c",
65    "src/sysparam_static.c",
66  ]
67
68  if (storage_service_user_crypto_manager) {
69    defines = [ "USER_CRYPTO_MANAGER" ]
70  }
71
72  configs = [ ":fscrypt_utils_config" ]
73
74  subsystem_name = "filemanagement"
75  part_name = "storage_service"
76  deps = [ "//third_party/bounds_checking_function:libsec_static" ]
77}
78