1# Copyright (C) 2024 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 16BT_PART_DIR = "../../.." 17BT_CJ_DIR = "$BT_PART_DIR/frameworks/cj/ble" 18BT_NAPI_DIR = "$BT_PART_DIR/frameworks/js/napi" 19 20ohos_shared_library("cj_bluetooth_ble_ffi") { 21 sanitize = { 22 cfi = true # Enable/disable control flow integrity detection 23 boundary_sanitize = true # Enable boundary san detection 24 cfi_cross_dso = true # Cross-SO CFI Checks 25 integer_overflow = true # Enable integer overflow detection 26 ubsan = true # Enable some Ubsan options 27 debug = false 28 } 29 30 include_dirs = [ 31 "$BT_CJ_DIR/include", 32 "$BT_CJ_DIR/src", 33 "$BT_NAPI_DIR/include", 34 "$BT_PART_DIR/frameworks/inner/include", 35 ] 36 37 sources = [ 38 "src/bluetooth_ble_clientDevice.cpp", 39 "src/bluetooth_ble_common.cpp", 40 "src/bluetooth_ble_ffi.cpp", 41 "src/bluetooth_ble_ffiAdvertiseCallback.cpp", 42 "src/bluetooth_ble_ffiCentralManagerCallback.cpp", 43 "src/bluetooth_ble_ffiGattClientCallback.cpp", 44 "src/bluetooth_ble_ffiGattServerCallback.cpp", 45 "src/bluetooth_ble_gattServer.cpp", 46 "src/bluetooth_ble_impl.cpp", 47 ] 48 49 deps = [ 50 "$BT_PART_DIR/frameworks/inner:btframework", 51 "$BT_PART_DIR/frameworks/js/napi/src/common:bt_napi_common", 52 ] 53 54 external_deps = [ 55 "c_utils:utils", 56 "hicollie:libhicollie", 57 "hilog:libhilog", 58 "napi:ace_napi", 59 "napi:cj_bind_ffi", 60 "napi:cj_bind_native", 61 ] 62 63 innerapi_tags = [ "platformsdk" ] 64 subsystem_name = "communication" 65 part_name = "bluetooth" 66} 67