1# Copyright (c) 2023 Huawei Device Co., Ltd.
2#
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
17#group("libhvb") {
18#   deps = [ ":libhvb_static" ]
19#}
20# For init only
21config("libhvb_exported_configs") {
22  visibility = [ ":*" ]
23  include_dirs = [ "include" ]
24  if (target_cpu == "arm64") {
25    defines = [ "__LP64__" ]
26  } else {
27    defines = [ "__LP32__" ]
28  }
29}
30
31ohos_static_library("libhvb_static") {
32  sources = [
33    "src/auth/hvb.c",
34    "src/cert/hvb_cert.c",
35    "src/cmdline/hvb_cmdline.c",
36    "src/crypto/hvb_hash_sha256.c",
37    "src/crypto/hvb_rsa.c",
38    "src/crypto/hvb_rsa_verify.c",
39    "src/deps/hvb_sysdeps.c",
40    "src/footer/hvb_footer.c",
41    "src/rvt/hvb_rvt.c",
42    "src/utils/hvb_util.c",
43  ]
44  include_dirs = [
45    "incldue",
46    "//third_party/bounds_checking_function/include",
47  ]
48  public_configs = [ ":libhvb_exported_configs" ]
49  part_name = "hvb"
50  subsystem_name = "startup"
51}
52