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_hisysevent.cpp", 44 "src/native_call_manager_utils.cpp", 45 "src/nearlink_call_client.cpp", 46 "src/super_privacy_manager_client.cpp", 47 "src/voip_call_manager_proxy.cpp", 48 ] 49 50 public_configs = [ ":call_manager_config" ] 51 52 external_deps = [ 53 "ability_base:base", 54 "ability_base:want", 55 "ability_runtime:ability_manager", 56 "ability_runtime:app_manager", 57 "c_utils:utils", 58 "common_event_service:cesfwk_innerkits", 59 "core_service:libtel_common", 60 "core_service:tel_core_service_api", 61 "graphic_surface:surface", 62 "hilog:libhilog", 63 "ffrt:libffrt", 64 "hisysevent:libhisysevent", 65 "hitrace:libhitracechain", 66 "init:libbegetutil", 67 "ipc:ipc_single", 68 "safwk:system_ability_fwk", 69 "samgr:samgr_proxy", 70 ] 71 72 cflags_cc = [ 73 "-Wunused", 74 "-Wunreachable-code", 75 "-fno-exceptions", 76 "-fno-rtti", 77 "-fstack-protector-all", 78 "-Os", 79 "-flto", 80 "-Wno-unused-but-set-variable", 81 "-fdata-sections", 82 "-ffunction-sections", 83 "-fno-asynchronous-unwind-tables", 84 "-fno-unwind-tables", 85 ] 86 87 ldflags = [ 88 "-flto", 89 "-Wl,--gc-sections", 90 ] 91 92 defines = [ 93 "TELEPHONY_LOG_TAG = \"CallManagerApi\"", 94 "LOG_DOMAIN = 0xD001F10", 95 ] 96 97 if (device_name == "rk3568") { 98 defines += [ "CALL_MANAGER_AUTO_START_OPTIMIZE" ] 99 } 100 101 part_name = "call_manager" 102 innerapi_tags = [ "platformsdk" ] 103 subsystem_name = "telephony" 104} 105