1# Copyright (c) 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. 13 14import("//build/ohos.gni") 15import("../../dbms.gni") 16 17group("dbms_target") { 18 if (distributed_bundle_framework_graphics) { 19 deps = [ ":libdbms" ] 20 } 21} 22 23config("distributed_bms_config") { 24 include_dirs = [ "include" ] 25} 26 27ohos_shared_library("libdbms") { 28 branch_protector_ret = "pac_ret" 29 30 sanitize = { 31 boundary_sanitize = true 32 cfi = true 33 cfi_cross_dso = true 34 debug = false 35 integer_overflow = true 36 ubsan = true 37 } 38 39 cflags = [ "-fstack-protector-strong" ] 40 cflags_cc = [ 41 "-Os", 42 "-fno-unwind-tables", 43 "-fstack-protector-strong", 44 ] 45 46 sources = [ 47 "src/account_manager_helper.cpp", 48 "src/dbms_device_manager.cpp", 49 "src/distributed_bms.cpp", 50 "src/distributed_bms_host.cpp", 51 "src/distributed_data_storage.cpp", 52 ] 53 54 defines = [ 55 "APP_LOG_TAG = \"DistributedBundleMgrService\"", 56 "LOG_DOMAIN = 0xD0011E0", 57 ] 58 59 configs = [ ":distributed_bms_config" ] 60 61 deps = [ "${dbms_inner_api_path}:dbms_fwk" ] 62 63 external_deps = [ 64 "ability_base:want", 65 "access_token:libaccesstoken_sdk", 66 "access_token:libtokenid_sdk", 67 "bundle_framework:appexecfwk_base", 68 "bundle_framework:appexecfwk_core", 69 "bundle_framework:libappexecfwk_common", 70 "c_utils:utils", 71 "common_event_service:cesfwk_innerkits", 72 "device_manager:devicemanagersdk", 73 "hicollie:libhicollie", 74 "hilog:libhilog", 75 "i18n:intl_util", 76 "init:libbegetutil", 77 "ipc:ipc_core", 78 "kv_store:distributeddata_inner", 79 "resource_management:global_resmgr", 80 "safwk:system_ability_fwk", 81 "samgr:samgr_proxy", 82 ] 83 84 if (hisysevent_enable_dbms) { 85 sources += [ "src/event_report.cpp" ] 86 external_deps += [ "hisysevent:libhisysevent" ] 87 defines += [ "HISYSEVENT_ENABLE" ] 88 } 89 90 if (account_enable_dbms) { 91 external_deps += [ "os_account:os_account_innerkits" ] 92 defines += [ "ACCOUNT_ENABLE" ] 93 } 94 95 if (distributed_bundle_image_framework_enable) { 96 sources += [ "src/image_compress.cpp" ] 97 external_deps += [ "image_framework:image_native" ] 98 defines += [ "DISTRIBUTED_BUNDLE_IMAGE_ENABLE" ] 99 } 100 101 shlib_type = "sa" 102 part_name = "distributed_bundle_framework" 103 subsystem_name = "bundlemanager" 104} 105