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:want", 52 "ability_runtime:ability_manager", 53 "ability_runtime:app_manager", 54 "c_utils:utils", 55 "common_event_service:cesfwk_innerkits", 56 "core_service:libtel_common", 57 "core_service:tel_core_service_api", 58 "graphic_surface:surface", 59 "hilog:libhilog", 60 "init:libbegetutil", 61 "ipc:ipc_single", 62 "safwk:system_ability_fwk", 63 "samgr:samgr_proxy", 64 ] 65 66 cflags_cc = [ 67 "-Wunused", 68 "-Wunreachable-code", 69 "-fno-exceptions", 70 "-fno-rtti", 71 "-fstack-protector-all", 72 "-Os", 73 "-flto", 74 "-Wno-unused-but-set-variable", 75 "-fdata-sections", 76 "-ffunction-sections", 77 "-fno-asynchronous-unwind-tables", 78 "-fno-unwind-tables", 79 ] 80 81 ldflags = [ 82 "-flto", 83 "-Wl,--gc-sections", 84 ] 85 86 defines = [ 87 "TELEPHONY_LOG_TAG = \"CallManagerApi\"", 88 "LOG_DOMAIN = 0xD001F10", 89 ] 90 91 if (device_name == "rk3568") { 92 defines += [ "CALL_MANAGER_AUTO_START_OPTIMIZE" ] 93 } 94 95 part_name = "call_manager" 96 innerapi_tags = [ "platformsdk" ] 97 subsystem_name = "telephony" 98} 99