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") 15 16SUBSYSTEM_DIR = "../.." 17config("call_manager_config") { 18 include_dirs = [ 19 "include", 20 "${SUBSYSTEM_DIR}/interfaces/innerkits", 21 "${SUBSYSTEM_DIR}/utils/include", 22 ] 23} 24 25ohos_shared_library("tel_call_manager_api") { 26 sanitize = { 27 cfi = false # client target, not required to enable cfi 28 cfi_cross_dso = false 29 debug = false 30 } 31 branch_protector_ret = "pac_ret" 32 version_script = "tel_call_manager_api.versionscript" 33 sources = [ 34 "src/bluetooth_call_client.cpp", 35 "src/bluetooth_call_proxy.cpp", 36 "src/call_ability_callback.cpp", 37 "src/call_ability_callback_stub.cpp", 38 "src/call_manager_client.cpp", 39 "src/call_manager_proxy.cpp", 40 "src/call_manager_service_proxy.cpp", 41 "src/call_status_callback_proxy.cpp", 42 "src/cellular_call_proxy.cpp", 43 "src/native_call_manager_utils.cpp", 44 "src/super_privacy_manager_client.cpp", 45 "src/voip_call_manager_proxy.cpp", 46 ] 47 48 public_configs = [ ":call_manager_config" ] 49 50 external_deps = [ 51 "ability_base:base", 52 "ability_base:want", 53 "ability_runtime:ability_manager", 54 "ability_runtime:app_manager", 55 "c_utils:utils", 56 "common_event_service:cesfwk_innerkits", 57 "core_service:libtel_common", 58 "core_service:tel_core_service_api", 59 "graphic_surface:surface", 60 "hilog:libhilog", 61 "init:libbegetutil", 62 "ipc:ipc_single", 63 "safwk:system_ability_fwk", 64 "samgr:samgr_proxy", 65 ] 66 67 cflags_cc = [ 68 "-Wunused", 69 "-Wunreachable-code", 70 "-fno-exceptions", 71 "-fno-rtti", 72 "-fstack-protector-all", 73 "-Os", 74 "-flto", 75 "-Wno-unused-but-set-variable", 76 "-fdata-sections", 77 "-ffunction-sections", 78 "-fno-asynchronous-unwind-tables", 79 "-fno-unwind-tables", 80 ] 81 82 ldflags = [ 83 "-flto", 84 "-Wl,--gc-sections", 85 ] 86 87 defines = [ 88 "TELEPHONY_LOG_TAG = \"CallManagerApi\"", 89 "LOG_DOMAIN = 0xD001F10", 90 ] 91 92 if (device_name == "rk3568") { 93 defines += [ "CALL_MANAGER_AUTO_START_OPTIMIZE" ] 94 } 95 96 part_name = "call_manager" 97 innerapi_tags = [ "platformsdk" ] 98 subsystem_name = "telephony" 99} 100