1# Copyright (C) 2025 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 16ohos_shared_library("cj_bluetooth_hfp_ffi") { 17 branch_protector_ret = "pac_ret" # Enable PAC CFI 18 sanitize = { 19 cfi = true # Enable/disable control flow integrity detection 20 boundary_sanitize = true # Enable boundary san detection 21 cfi_cross_dso = true # Cross-SO CFI Checks 22 integer_overflow = true # Enable integer overflow detection 23 ubsan = true # Enable some Ubsan options 24 debug = false 25 } 26 27 if (!defined(defines)) { 28 defines = [] 29 } 30 include_dirs = [ 31 "include", 32 "../../js/napi/include", 33 "../../../frameworks/inner/include", 34 ] 35 36 deps = [ 37 "../../../frameworks/inner:btframework", 38 "../../../frameworks/js/napi/src/common:bt_napi_common", 39 ] 40 41 external_deps = [ 42 "c_utils:utils", 43 "hilog:libhilog", 44 "ipc:ipc_single", 45 "napi:ace_napi", 46 "napi:cj_bind_ffi", 47 "napi:cj_bind_native", 48 ] 49 50 sources = [ 51 "src/bluetooth_hfp_ag_impl.cpp", 52 "src/bluetooth_hfp_ffi.cpp", 53 "src/bluetooth_hfp_hf_observer_impl.cpp", 54 "src/bluetooth_hfp_utils.cpp", 55 ] 56 57 if (is_ohos) { 58 defines += [ "OHOS_PLATFORM" ] 59 } 60 61 if (is_mingw) { 62 defines += [ "WINDOWS_PLATFORM" ] 63 } 64 65 innerapi_tags = [ "platformsdk" ] 66 67 part_name = "bluetooth" 68 subsystem_name = "communication" 69} 70