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_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 "-fstack-protector-strong", 40 "-D_FORTIFY_SOURCE=2", 41 "-O2", 42 ] 43 44 cflags_cc = cflags 45 46 sanitize = { 47 boundary_sanitize = true 48 integer_overflow = true 49 ubsan = true 50 debug = false 51 } 52 53 install_enable = true 54 55 sources = [ 56 "src/callback/device_profile_load_callback.cpp", 57 "src/distributed_device_profile_client.cpp", 58 "src/distributed_device_profile_proxy.cpp", 59 ] 60 61 public_configs = [ ":distributed_device_profile_sdk_config" ] 62 63 deps = [ 64 "${device_profile_common}:distributed_device_profile_common", 65 "${device_profile_path}/radar:device_profile_radar", 66 ] 67 68 external_deps = [ 69 "cJSON:cjson", 70 "c_utils:utils", 71 "eventhandler:libeventhandler", 72 "hilog:libhilog", 73 "ipc:ipc_core", 74 "relational_store:native_rdb", 75 "samgr:samgr_proxy", 76 ] 77 78 part_name = "device_info_manager" 79 subsystem_name = "deviceprofile" 80} 81