1# Copyright (c) 2021-2025 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_sdk_config") { 19 visibility = [ ":*" ] 20 include_dirs = [ 21 "include", 22 "include/callback", 23 "${device_profile_common}/include/constants", 24 "${device_profile_common}/include/interfaces", 25 "${device_profile_common}/include/utils", 26 "${device_profile_path}/radar/include", 27 ] 28} 29 30ohos_shared_library("distributed_device_profile_sdk") { 31 branch_protector_ret = "pac_ret" 32 ldflags = [ 33 "-Wl,-z,relro", 34 "-Wl,-z,now", 35 ] 36 37 cflags = [ 38 "-fPIC", 39 "-D_FORTIFY_SOURCE=2", 40 "-O2", 41 ] 42 43 cflags_cc = cflags 44 45 sanitize = { 46 boundary_sanitize = true 47 integer_overflow = true 48 ubsan = true 49 cfi = true 50 cfi_cross_dso = true 51 debug = false 52 } 53 54 install_enable = true 55 56 sources = [ 57 "src/callback/device_profile_load_callback.cpp", 58 "src/distributed_device_profile_client.cpp", 59 "src/distributed_device_profile_proxy.cpp", 60 ] 61 62 public_configs = [ 63 ":distributed_device_profile_sdk_config", 64 "${device_profile_common}:business_callback_interfaces_ipc_config" 65 ] 66 67 deps = [ 68 "${device_profile_common}:business_callback_interfaces_ipc", 69 "${device_profile_common}:distributed_device_profile_common", 70 "${device_profile_path}/radar:device_profile_radar", 71 ] 72 73 external_deps = [ 74 "cJSON:cjson", 75 "c_utils:utils", 76 "eventhandler:libeventhandler", 77 "hilog:libhilog", 78 "ipc:ipc_core", 79 "relational_store:native_rdb", 80 "samgr:samgr_proxy", 81 ] 82 83 part_name = "device_info_manager" 84 subsystem_name = "deviceprofile" 85} 86