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 ldflags = [ 30 "-Wl,-z,relro", 31 "-Wl,-z,now", 32 ] 33 34 cflags = [ 35 "-fPIC", 36 "-fstack-protector-strong", 37 "-D_FORTIFY_SOURCE=2", 38 "-O2", 39 ] 40 41 cflags_cc = cflags 42 43 sanitize = { 44 boundary_sanitize = true 45 integer_overflow = true 46 ubsan = true 47 debug = false 48 } 49 50 install_enable = true 51 52 sources = [ 53 "src/constants/distributed_device_profile_constants.cpp", 54 "src/interfaces/access_control_profile.cpp", 55 "src/interfaces/accessee.cpp", 56 "src/interfaces/accesser.cpp", 57 "src/interfaces/characteristic_profile.cpp", 58 "src/interfaces/device_icon_info.cpp", 59 "src/interfaces/device_icon_info_filter_options.cpp", 60 "src/interfaces/device_profile.cpp", 61 "src/interfaces/device_profile_filter_options.cpp", 62 "src/interfaces/dp_inited_callback_proxy.cpp", 63 "src/interfaces/dp_inited_callback_stub.cpp", 64 "src/interfaces/dp_subscribe_info.cpp", 65 "src/interfaces/dp_sync_options.cpp", 66 "src/interfaces/i_profile_change_listener.cpp", 67 "src/interfaces/local_service_info.cpp", 68 "src/interfaces/pincode_invalid_callback_proxy.cpp", 69 "src/interfaces/pincode_invalid_callback_stub.cpp", 70 "src/interfaces/product_info.cpp", 71 "src/interfaces/profile_change_listener_proxy.cpp", 72 "src/interfaces/profile_change_listener_stub.cpp", 73 "src/interfaces/query_profile.cpp", 74 "src/interfaces/service_info_profile.cpp", 75 "src/interfaces/service_info_unique_key.cpp", 76 "src/interfaces/service_profile.cpp", 77 "src/interfaces/sync_completed_callback_proxy.cpp", 78 "src/interfaces/sync_completed_callback_stub.cpp", 79 "src/interfaces/trust_device_profile.cpp", 80 "src/interfaces/trusted_device_info.cpp", 81 "src/utils/content_sensor_manager_utils.cpp", 82 "src/utils/ipc_utils.cpp", 83 "src/utils/profile_utils.cpp", 84 ] 85 86 deps = [] 87 88 public_configs = [ ":distributed_device_profile_common_config" ] 89 90 external_deps = [ 91 "access_token:libaccesstoken_sdk", 92 "cJSON:cjson", 93 "c_utils:utils", 94 "device_manager:devicemanagersdk", 95 "dmsfwk:common_sdk", 96 "dsoftbus:softbus_client", 97 "eventhandler:libeventhandler", 98 "hilog:libhilog", 99 "init:libbegetutil", 100 "ipc:ipc_core", 101 "relational_store:native_rdb", 102 "safwk:system_ability_fwk", 103 "samgr:samgr_proxy", 104 ] 105 106 part_name = "device_info_manager" 107 subsystem_name = "deviceprofile" 108} 109