# Copyright (c) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("../../access_token.gni") ohos_prebuilt_etc("el5_filekey_manager_cfg") { source = "el5_filekey_manager.cfg" relative_install_dir = "init" subsystem_name = "security" part_name = "access_token" } group("el5filekeymanager") { if (is_standard_system && ability_base_enable == true) { deps = [ "${access_token_path}/services/el5filekeymanager:el5_filekey_manager_service", "${access_token_path}/services/el5filekeymanager/sa_profile:efm_sa_profile", ] } } if (is_standard_system && ability_base_enable == true) { ohos_shared_library("el5_filekey_manager_service") { sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } branch_protector_ret = "pac_ret" shlib_type = "sa" cflags = [] cflags_cc = [] defines = [] sources = [ "src/el5_filekey_callback_proxy.cpp", "src/el5_filekey_manager_service.cpp", "src/el5_filekey_manager_service_ability.cpp", "src/el5_filekey_manager_stub.cpp", ] configs = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } include_dirs = [ "${access_token_path}/services/el5filekeymanager/include", "${access_token_path}/frameworks/el5filekeymanager/include/", ] deps = [ "${access_token_path}/interfaces/innerkits/accesstoken:libaccesstoken_sdk", "${access_token_path}/interfaces/innerkits/accesstoken:libtokenid_sdk", "${access_token_path}/interfaces/innerkits/el5filekeymanager:el5_filekey_manager_sdk", "${access_token_path}/services/el5filekeymanager:el5_filekey_manager_cfg", ] external_deps = [ "ability_base:want", "c_utils:utils", "hilog:libhilog", "ipc:ipc_single", "json:nlohmann_json_static", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] if (common_event_service_enable) { cflags_cc += [ "-DCOMMON_EVENT_SERVICE_ENABLE" ] external_deps += [ "common_event_service:cesfwk_innerkits" ] sources += [ "src/el5_filekey_manager_subscriber.cpp" ] } if (eventhandler_enable == true) { cflags_cc += [ "-DEVENTHANDLER_ENABLE" ] external_deps += [ "eventhandler:libeventhandler" ] } if (theme_screenlock_mgr_enable) { cflags_cc += [ "-DTHEME_SCREENLOCK_MGR_ENABLE" ] external_deps += [ "screenlock_mgr:screenlock_client" ] } subsystem_name = "security" part_name = "access_token" } }