1# Copyright (C) 2021-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("//base/security/huks/huks.gni") 14import("//build/ohos.gni") 15 16config("huks_config") { 17 include_dirs = [ 18 "service", 19 "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_base/include", 20 ] 21} 22 23ohos_static_library("libhuks_service_os_dependency_standard_static") { 24 sanitize = { 25 integer_overflow = true 26 cfi = true 27 debug = false 28 } 29 subsystem_name = "security" 30 part_name = "huks" 31 public_configs = [ ":huks_config" ] 32 configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ] 33 defines = [ 34 "L2_STANDARD", 35 "_HARDWARE_ROOT_KEY_", 36 "_HUKS_LOG_ENABLE_", 37 ] 38 sources = [ 39 "posix/hks_rwlock.c", 40 "sa/hks_sa.cpp", 41 ] 42 deps = [ 43 "//base/security/huks/frameworks/huks_standard/main/common:libhuks_common_standard_static", 44 "//base/security/huks/services/huks_standard/huks_service/main/core:libhuks_service_core_standard_static", 45 "//base/security/huks/utils/mutex:libhuks_utils_mutex_static", 46 ] 47 public_deps = [ "//base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl:libhuks_service_idl_standard_static" ] 48 49 external_deps = [ 50 "hiviewdfx_hilog_native:libhilog", 51 "ipc:ipc_core", 52 "safwk:system_ability_fwk", 53 "samgr:samgr_proxy", 54 ] 55 if (support_jsapi) { 56 sources += [ "sa/hks_event_observer.cpp" ] 57 defines += [ "SUPPORT_COMMON_EVENT" ] 58 external_deps += [ 59 "ability_base:want", 60 "common_event_service:cesfwk_innerkits", 61 ] 62 if (has_os_account_part) { 63 defines += [ "HAS_OS_ACCOUNT_PART" ] 64 external_deps += [ "os_account:os_account_innerkits" ] 65 } 66 } 67 cflags_cc = [ 68 "-Wall", 69 "-Werror", 70 ] 71 cflags = cflags_cc 72 complete_static_lib = true 73} 74