• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021-2023 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("callmanager.gni")
16
17declare_args() {
18  call_manager_feature_hfp_async_enable = false
19  call_manager_feature_not_support_multicall = false
20}
21
22ohos_shared_library("tel_call_manager") {
23  sanitize = {
24    cfi = true
25    cfi_cross_dso = true
26    debug = false
27    cfi_vcall_icall_only = true
28  }
29  branch_protector_ret = "pac_ret"
30  sources = call_manager_sources
31
32  include_dirs = call_manager_include_dirs
33
34  deps = [
35    "frameworks/native:tel_call_manager_api",
36  ]
37
38  external_deps = [
39    "cJSON:cjson",
40    "libphonenumber:phonenumber_standard",
41  ]
42
43  external_deps += call_manager_external_deps
44
45  cflags_cc = [
46    "-Wunused",
47    "-Wunreachable-code",
48    "-fno-exceptions",
49    "-fno-rtti",
50    "-fstack-protector-all",
51    "-Os",
52    "-D_FORTIFY_SOURCE=2",
53    "-flto",
54    "-Wno-unused-but-set-variable",
55    "-fdata-sections",
56    "-ffunction-sections",
57    "-fno-asynchronous-unwind-tables",
58    "-fno-unwind-tables",
59    "-fvisibility=hidden",
60  ]
61
62  ldflags = [
63    "-flto",
64    "-Wl,--gc-sections",
65  ]
66
67  defines = [
68    "TELEPHONY_LOG_TAG = \"CallManager\"",
69    "LOG_DOMAIN = 0xD001F10",
70  ]
71
72  if (call_manager_feature_hfp_async_enable) {
73    print("Support hfp async enable.")
74    defines += [ "HFP_ASYNC_ENABLE" ]
75  }
76
77  if (call_manager_feature_not_support_multicall) {
78    print("not Support multi call.")
79    defines += [ "NOT_SUPPORT_MULTICALL" ]
80  }
81  defines += call_manager_defines
82
83  part_name = "call_manager"
84  subsystem_name = "telephony"
85}
86