111fccf17Sopenharmony_ci# Copyright (C) 2021 Huawei Device Co., Ltd.
211fccf17Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
311fccf17Sopenharmony_ci# you may not use this file except in compliance with the License.
411fccf17Sopenharmony_ci# You may obtain a copy of the License at
511fccf17Sopenharmony_ci#
611fccf17Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
711fccf17Sopenharmony_ci#
811fccf17Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
911fccf17Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1011fccf17Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1111fccf17Sopenharmony_ci# See the License for the specific language governing permissions and
1211fccf17Sopenharmony_ci# limitations under the License.
1311fccf17Sopenharmony_ci
1411fccf17Sopenharmony_ciimport("//build/ohos.gni")
1511fccf17Sopenharmony_ci
1611fccf17Sopenharmony_ciRIL_ADAPTER = "../../"
1711fccf17Sopenharmony_ciRIL_HRIL = "../../services/hril/src"
1811fccf17Sopenharmony_ci
1911fccf17Sopenharmony_ciconfig("ril_hril_config") {
2011fccf17Sopenharmony_ci  include_dirs = [ "$RIL_ADAPTER/services/hril/include" ]
2111fccf17Sopenharmony_ci}
2211fccf17Sopenharmony_ci
2311fccf17Sopenharmony_ciohos_shared_library("hril") {
2411fccf17Sopenharmony_ci  sources = [
2511fccf17Sopenharmony_ci    "$RIL_HRIL/hril_base.cpp",
2611fccf17Sopenharmony_ci    "$RIL_HRIL/hril_call.cpp",
2711fccf17Sopenharmony_ci    "$RIL_HRIL/hril_data.cpp",
2811fccf17Sopenharmony_ci    "$RIL_HRIL/hril_event.cpp",
2911fccf17Sopenharmony_ci    "$RIL_HRIL/hril_manager.cpp",
3011fccf17Sopenharmony_ci    "$RIL_HRIL/hril_modem.cpp",
3111fccf17Sopenharmony_ci    "$RIL_HRIL/hril_network.cpp",
3211fccf17Sopenharmony_ci    "$RIL_HRIL/hril_sim.cpp",
3311fccf17Sopenharmony_ci    "$RIL_HRIL/hril_sms.cpp",
3411fccf17Sopenharmony_ci    "$RIL_HRIL/hril_timer_callback.cpp",
3511fccf17Sopenharmony_ci  ]
3611fccf17Sopenharmony_ci
3711fccf17Sopenharmony_ci  version_script = "$RIL_ADAPTER/services/hril/libhril.versionscript"
3811fccf17Sopenharmony_ci
3911fccf17Sopenharmony_ci  public_configs = [ ":ril_hril_config" ]
4011fccf17Sopenharmony_ci
4111fccf17Sopenharmony_ci  configs = [ "$RIL_ADAPTER/utils:utils_config" ]
4211fccf17Sopenharmony_ci
4311fccf17Sopenharmony_ci  defines = [
4411fccf17Sopenharmony_ci    "TELEPHONY_LOG_TAG = \"Hril\"",
4511fccf17Sopenharmony_ci    "LOG_DOMAIN = 0xD001F08",
4611fccf17Sopenharmony_ci  ]
4711fccf17Sopenharmony_ci
4811fccf17Sopenharmony_ci  deps = [ "$RIL_ADAPTER/interfaces/innerkits:hril_innerkits" ]
4911fccf17Sopenharmony_ci
5011fccf17Sopenharmony_ci  cflags_cc = [ "-fstack-protector-strong" ]
5111fccf17Sopenharmony_ci
5211fccf17Sopenharmony_ci  external_deps = [
5311fccf17Sopenharmony_ci    "bounds_checking_function:libsec_shared",
5411fccf17Sopenharmony_ci    "c_utils:utils",
5511fccf17Sopenharmony_ci    "drivers_interface_ril:libril_proxy_1.3",
5611fccf17Sopenharmony_ci    "hdf_core:libhdf_ipc_adapter",
5711fccf17Sopenharmony_ci    "hdf_core:libhdf_utils",
5811fccf17Sopenharmony_ci    "hilog:libhilog",
5911fccf17Sopenharmony_ci    "init:libbegetutil",
6011fccf17Sopenharmony_ci    "ipc:ipc_single",
6111fccf17Sopenharmony_ci  ]
6211fccf17Sopenharmony_ci
6311fccf17Sopenharmony_ci  if (defined(global_parts_info) &&
6411fccf17Sopenharmony_ci      defined(global_parts_info.hdf_drivers_interface_power) &&
6511fccf17Sopenharmony_ci      global_parts_info.hdf_drivers_interface_power) {
6611fccf17Sopenharmony_ci    external_deps += [ "drivers_interface_power:libpower_proxy_1.2" ]
6711fccf17Sopenharmony_ci    defines += [ "ABILITY_POWER_SUPPORT" ]
6811fccf17Sopenharmony_ci  }
6911fccf17Sopenharmony_ci
7011fccf17Sopenharmony_ci  install_images = [ chipset_base_dir ]
7111fccf17Sopenharmony_ci  part_name = "ril_adapter"
7211fccf17Sopenharmony_ci  subsystem_name = "telephony"
7311fccf17Sopenharmony_ci}
74