1# Copyright (C) 2021 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("../core_service/telephony_core_service.gni") 16 17ohos_shared_library("tel_state_registry") { 18 sanitize = { 19 cfi = true 20 cfi_cross_dso = true 21 debug = false 22 } 23 branch_protector_ret = "pac_ret" 24 part_name = "state_registry" 25 subsystem_name = "telephony" 26 27 sources = [ 28 "frameworks/native/observer/src/telephony_observer_proxy.cpp", 29 "services/src/telephony_state_registry_dump_helper.cpp", 30 "services/src/telephony_state_registry_record.cpp", 31 "services/src/telephony_state_registry_service.cpp", 32 "services/src/telephony_state_registry_stub.cpp", 33 "services/telephony_ext_wrapper/src/telephony_ext_wrapper.cpp", 34 ] 35 36 include_dirs = [ 37 "frameworks/native/observer/include", 38 "frameworks/native/common/include", 39 "services/include", 40 "services/telephony_ext_wrapper/include", 41 ] 42 43 external_deps = [ 44 "ability_base:want", 45 "access_token:libaccesstoken_sdk", 46 "c_utils:utils", 47 "common_event_service:cesfwk_innerkits", 48 "core_service:libtel_common", 49 "core_service:tel_core_service_api", 50 "hilog:libhilog", 51 "init:libbegetutil", 52 "ipc:ipc_core", 53 "safwk:system_ability_fwk", 54 "samgr:samgr_proxy", 55 ] 56 57 cflags_cc = [ 58 "-O2", 59 "-D_FORTIFY_SOURCE=2", 60 ] 61 62 defines = [ 63 "TELEPHONY_LOG_TAG = \"StateRegistry\"", 64 "LOG_DOMAIN = 0xD001F07", 65 ] 66 67 if (telephony_hicollie_able) { 68 external_deps += [ "hicollie:libhicollie" ] 69 defines += [ "HICOLLIE_ENABLE" ] 70 } 71 72 defines += telephony_extra_defines 73} 74