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
16RIL_ADAPTER = "../../"
17RIL_HRIL = "../../services/hril/src"
18
19config("ril_hril_config") {
20  include_dirs = [ "$RIL_ADAPTER/services/hril/include" ]
21}
22
23ohos_shared_library("hril") {
24  sources = [
25    "$RIL_HRIL/hril_base.cpp",
26    "$RIL_HRIL/hril_call.cpp",
27    "$RIL_HRIL/hril_data.cpp",
28    "$RIL_HRIL/hril_event.cpp",
29    "$RIL_HRIL/hril_manager.cpp",
30    "$RIL_HRIL/hril_modem.cpp",
31    "$RIL_HRIL/hril_network.cpp",
32    "$RIL_HRIL/hril_sim.cpp",
33    "$RIL_HRIL/hril_sms.cpp",
34    "$RIL_HRIL/hril_timer_callback.cpp",
35  ]
36
37  version_script = "$RIL_ADAPTER/services/hril/libhril.versionscript"
38
39  public_configs = [ ":ril_hril_config" ]
40
41  configs = [ "$RIL_ADAPTER/utils:utils_config" ]
42
43  defines = [
44    "TELEPHONY_LOG_TAG = \"Hril\"",
45    "LOG_DOMAIN = 0xD001F08",
46  ]
47
48  deps = [ "$RIL_ADAPTER/interfaces/innerkits:hril_innerkits" ]
49
50  external_deps = [
51    "bounds_checking_function:libsec_shared",
52    "c_utils:utils",
53    "drivers_interface_ril:libril_proxy_1.3",
54    "hdf_core:libhdf_ipc_adapter",
55    "hdf_core:libhdf_utils",
56    "hilog:libhilog",
57    "init:libbegetutil",
58    "ipc:ipc_single",
59  ]
60
61  if (defined(global_parts_info) &&
62      defined(global_parts_info.hdf_drivers_interface_power) &&
63      global_parts_info.hdf_drivers_interface_power) {
64    external_deps += [ "drivers_interface_power:libpower_proxy_1.2" ]
65    defines += [ "ABILITY_POWER_SUPPORT" ]
66  }
67
68  install_images = [ chipset_base_dir ]
69  part_name = "ril_adapter"
70  subsystem_name = "telephony"
71}
72