1# Copyright (c) 2021 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 20ohos_shared_library("huks_ndk") { 21 public_configs = [ ":huks_config" ] 22 defines = [ 23 "L2_STANDARD", 24 "_HARDWARE_ROOT_KEY_", 25 "_HUKS_LOG_ENABLE_", 26 ] 27 28 version_script = "libhuksndk.map" 29 branch_protector_ret = "pac_ret" 30 31 sanitize = { 32 integer_overflow = true 33 cfi = true 34 debug = false 35 cfi_cross_dso = true 36 boundary_sanitize = true 37 ubsan = true 38 } 39 40 include_dirs = [ 41 "//base/security/huks/interfaces/kits/c/include", 42 "//base/security/huks/interfaces/inner_api/huks_standard/main/include", 43 "//base/security/huks/frameworks/huks_standard/main/common/include", 44 ] 45 46 sources = [ 47 "//base/security/huks/interfaces/kits/c/src/native_huks_api_adapter.c", 48 "src/native_huks_api.c", 49 "src/native_huks_param.c", 50 ] 51 52 deps = [ 53 "//base/security/huks/interfaces/inner_api/huks_standard/main:libhukssdk", 54 ] 55 56 external_deps = [ "hilog:libhilog" ] 57 58 cflags_cc = [ 59 "-Wall", 60 "-Werror", 61 ] 62 63 innerapi_tags = [ "platformsdk" ] 64 part_name = "huks" 65 subsystem_name = "security" 66} 67