1# Copyright (c) 2021-2024 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("//build/ohos_var.gni") 16import("//foundation/deviceprofile/device_info_manager/deviceprofile.gni") 17 18config("distributed_device_profile_common_config") { 19 visibility = [ ":*" ] 20 include_dirs = [ 21 "include/interfaces", 22 "include/constants", 23 "include/utils", 24 ] 25} 26 27ohos_shared_library("distributed_device_profile_common") { 28 branch_protector_ret = "pac_ret" 29 30 cflags = [ 31 "-fstack-protector-strong", 32 "-D_FORTIFY_SOURCE=2", 33 "-O2", 34 ] 35 36 cflags_cc = cflags 37 38 sanitize = { 39 boundary_sanitize = true 40 integer_overflow = true 41 ubsan = true 42 debug = false 43 } 44 45 install_enable = true 46 47 sources = [ 48 "src/constants/distributed_device_profile_constants.cpp", 49 "src/interfaces/access_control_profile.cpp", 50 "src/interfaces/accessee.cpp", 51 "src/interfaces/accesser.cpp", 52 "src/interfaces/characteristic_profile.cpp", 53 "src/interfaces/device_profile.cpp", 54 "src/interfaces/dp_inited_callback_proxy.cpp", 55 "src/interfaces/dp_inited_callback_stub.cpp", 56 "src/interfaces/dp_subscribe_info.cpp", 57 "src/interfaces/dp_sync_options.cpp", 58 "src/interfaces/profile_change_listener_proxy.cpp", 59 "src/interfaces/profile_change_listener_stub.cpp", 60 "src/interfaces/service_profile.cpp", 61 "src/interfaces/sync_completed_callback_proxy.cpp", 62 "src/interfaces/sync_completed_callback_stub.cpp", 63 "src/interfaces/trust_device_profile.cpp", 64 "src/utils/content_sensor_manager_utils.cpp", 65 "src/utils/ipc_utils.cpp", 66 "src/utils/profile_utils.cpp", 67 ] 68 69 deps = [] 70 71 public_configs = [ ":distributed_device_profile_common_config" ] 72 73 external_deps = [ 74 "access_token:libaccesstoken_sdk", 75 "cJSON:cjson", 76 "c_utils:utils", 77 "device_manager:devicemanagersdk", 78 "dmsfwk:common_sdk", 79 "eventhandler:libeventhandler", 80 "hilog:libhilog", 81 "init:libbegetutil", 82 "ipc:ipc_core", 83 "relational_store:native_rdb", 84 "safwk:system_ability_fwk", 85 "samgr:samgr_proxy", 86 ] 87 88 part_name = "device_info_manager" 89 subsystem_name = "deviceprofile" 90} 91