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