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. 13import("//build/ohos.gni") 14 15SUBSYSTEM_DIR = "../.." 16TELEPHONY_DATA_DIR = "../../../telephony_data" 17config("cellular_data_util_config") { 18 # header file path 19 include_dirs = [ 20 "$SUBSYSTEM_DIR/interfaces/innerkits", 21 "$SUBSYSTEM_DIR/services/include/apn_manager", 22 "$SUBSYSTEM_DIR/services/include/common", 23 "$TELEPHONY_DATA_DIR/interfaces/innerkits/include", 24 ] 25 26 cflags = [] 27 if (is_double_framework) { 28 cflags = [ "-DCONFIG_DUAL_FRAMEWORK" ] 29 } 30 if (target_cpu == "arm") { 31 cflags += [ "-DBINDER_IPC_32BIT" ] 32 } 33 if (is_standard_system) { 34 cflags += [ "-DCONFIG_STANDARD_SYSTEM" ] 35 } 36 if (defined(build_public_version) && build_public_version) { 37 cflags += [ "-DBUILD_PUBLIC_VERSION" ] 38 } 39} 40 41ohos_shared_library("tel_cellular_data_api") { 42 sanitize = { 43 cfi = true 44 cfi_cross_dso = true 45 debug = false 46 } 47 branch_protector_ret = "pac_ret" 48 sources = [ 49 "$SUBSYSTEM_DIR/frameworks/native/cellular_data_client.cpp", 50 "$SUBSYSTEM_DIR/frameworks/native/cellular_data_service_proxy.cpp", 51 "$SUBSYSTEM_DIR/frameworks/native/data_sim_account_call_back.cpp", 52 "$SUBSYSTEM_DIR/frameworks/native/sim_account_callback_stub.cpp", 53 ] 54 55 version_script = "$SUBSYSTEM_DIR/interfaces/innerkits/libtel_cellular_data_api.versionscript" 56 57 public_configs = [ ":cellular_data_util_config" ] 58 59 external_deps = [ 60 "c_utils:utils", 61 "core_service:libtel_common", 62 "core_service:tel_core_service_api", 63 "hilog:libhilog", 64 "init:libbegetutil", 65 "ipc:ipc_single", 66 "samgr:samgr_proxy", 67 "telephony_data:tel_telephony_data", 68 ] 69 defines = [ 70 "TELEPHONY_LOG_TAG = \"CellularDataApi\"", 71 "LOG_DOMAIN = 0xD001F03", 72 ] 73 74 cflags_cc = [ 75 "-O2", 76 "-D_FORTIFY_SOURCE=2", 77 ] 78 79 innerapi_tags = [ "platformsdk" ] 80 part_name = "cellular_data" 81 subsystem_name = "telephony" 82} 83