1# Copyright (c) 2023-2024 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("common_config") { 17 cflags = [ 18 "-Wall", 19 "-Wundef", 20 "-Wdeclaration-after-statement", 21 "-Wimplicit-fallthrough", 22 "-Wmissing-field-initializers", 23 "-Wmissing-prototypes", 24 "-Wstrict-prototypes", 25 "-Wunused-parameter", 26 "-Wvla", 27 "-Wno-deprecated-declarations", 28 ] 29} 30 31config("libfsverity_public_config") { 32 include_dirs = [ 33 "include", 34 "common", 35 ] 36} 37 38ohos_shared_library("libfsverity_utils") { 39 sources = [ 40 "lib/compute_digest.c", 41 "lib/enable.c", 42 "lib/hash_algs.c", 43 "lib/sign_digest.c", 44 "lib/utils.c", 45 ] 46 external_deps = [ "openssl:libcrypto_shared" ] 47 configs = [ ":common_config" ] 48 public_configs = [ ":libfsverity_public_config" ] 49 install_enable = true 50 51 output_name = "libfsverity_utils" 52 part_name = "fsverity-utils" 53 subsystem_name = "thirdparty" 54 install_images = [ "system" ] 55} 56 57ohos_static_library("libfsverity_utils_static") { 58 sources = [ 59 "lib/compute_digest.c", 60 "lib/enable.c", 61 "lib/hash_algs.c", 62 "lib/sign_digest.c", 63 "lib/utils.c", 64 ] 65 include_dirs = [ 66 "include", 67 "common", 68 ] 69 configs = [ ":common_config" ] 70 deps = [ "//third_party/openssl:libcrypto_static" ] 71} 72