• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021-2022 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
16declare_args() {
17  cellular_call_emc_set_radio_on = false
18}
19
20ohos_shared_library("tel_cellular_call") {
21  sanitize = {
22    cfi = true
23    cfi_cross_dso = true
24    debug = false
25  }
26  branch_protector_ret = "pac_ret"
27  sources = [
28    "services/common/src/base_request.cpp",
29    "services/common/src/cellular_call_hisysevent.cpp",
30    "services/common/src/cellular_call_rdb_helper.cpp",
31    "services/common/src/mmi_code_message.cpp",
32    "services/common/src/supplement_request_cs.cpp",
33    "services/common/src/supplement_request_ims.cpp",
34    "services/connection/src/base_connection.cpp",
35    "services/connection/src/cellular_call_connection_cs.cpp",
36    "services/connection/src/cellular_call_connection_ims.cpp",
37    "services/connection/src/cellular_call_connection_satellite.cpp",
38    "services/control/src/control_base.cpp",
39    "services/control/src/cs_control.cpp",
40    "services/control/src/ims_control.cpp",
41    "services/control/src/ims_video_call_control.cpp",
42    "services/control/src/satellite_control.cpp",
43    "services/ims_service_interaction/src/ims_call_callback_stub.cpp",
44    "services/ims_service_interaction/src/ims_call_client.cpp",
45    "services/ims_service_interaction/src/ims_call_proxy.cpp",
46    "services/manager/src/cellular_call_callback.cpp",
47    "services/manager/src/cellular_call_handler.cpp",
48    "services/manager/src/cellular_call_register.cpp",
49    "services/manager/src/cellular_call_service.cpp",
50    "services/manager/src/cellular_call_stub.cpp",
51    "services/satellite_service_interaction/src/satellite_call_callback_stub.cpp",
52    "services/satellite_service_interaction/src/satellite_call_client.cpp",
53    "services/satellite_service_interaction/src/satellite_call_proxy.cpp",
54    "services/telephony_ext_wrapper/src/telephony_ext_wrapper.cpp",
55    "services/utils/src/cellular_call_config.cpp",
56    "services/utils/src/cellular_call_dump_helper.cpp",
57    "services/utils/src/cellular_call_supplement.cpp",
58    "services/utils/src/config_request.cpp",
59    "services/utils/src/emergency_utils.cpp",
60    "services/utils/src/mmi_code_utils.cpp",
61    "services/utils/src/module_service_utils.cpp",
62    "services/utils/src/standardize_utils.cpp",
63  ]
64
65  include_dirs = [
66    "interfaces/innerkits/ims",
67    "interfaces/innerkits/ims_common",
68    "interfaces/innerkits/satellite",
69    "services/common/include",
70    "services/manager/include",
71    "services/control/include",
72    "services/connection/include",
73    "services/utils/include",
74    "services/telephony_ext_wrapper/include",
75  ]
76
77  defines = [
78    "TELEPHONY_LOG_TAG = \"CellularCall\"",
79    "LOG_DOMAIN = 0xD001F11",
80  ]
81
82  external_deps = [
83    "ability_base:want",
84    "ability_base:zuri",
85    "ability_runtime:dataobs_manager",
86    "cJSON:cjson",
87    "c_utils:utils",
88    "call_manager:tel_call_manager_api",
89    "common_event_service:cesfwk_innerkits",
90    "core_service:libtel_common",
91    "core_service:tel_core_service_api",
92    "data_share:datashare_common",
93    "data_share:datashare_consumer",
94    "eventhandler:libeventhandler",
95    "ffrt:libffrt",
96    "graphic_surface:surface",
97    "hilog:libhilog",
98    "hisysevent:libhisysevent",
99    "hitrace:hitrace_meter",
100    "init:libbegetutil",
101    "ipc:ipc_single",
102    "json:nlohmann_json_static",
103    "libphonenumber:phonenumber_standard",
104    "resource_management:global_resmgr",
105    "safwk:system_ability_fwk",
106    "samgr:samgr_proxy",
107    "telephony_data:tel_telephony_data",
108  ]
109
110  cflags_cc = [
111    "-fstack-protector-all",
112    "-O2",
113    "-D_FORTIFY_SOURCE=2",
114  ]
115
116  if (device_name == "rk3568") {
117    defines += [ "CALL_MANAGER_AUTO_START_OPTIMIZE" ]
118  }
119  if (defined(global_parts_info) &&
120      defined(global_parts_info.security_security_guard)) {
121    external_deps += [ "security_guard:libsg_collect_sdk" ]
122    defines += [ "SECURITY_GUARDE_ENABLE" ]
123  }
124
125  if (defined(global_parts_info) &&
126      defined(global_parts_info.telephony_telephony_enhanced) &&
127      global_parts_info.telephony_telephony_enhanced) {
128    defines += [ "OHOS_BUILD_ENABLE_TELEPHONY_EXT" ]
129  }
130
131  if (cellular_call_emc_set_radio_on) {
132    defines += [ "BASE_POWER_IMPROVEMENT_FEATURE" ]
133  }
134
135  part_name = "cellular_call"
136  subsystem_name = "telephony"
137}
138