1# Copyright (c) 2022-2023 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 15ohos_shared_library("libgeofence_interface_service_2.0") { 16 include_dirs = [ 17 "//drivers/peripheral/location/geofence/hdi_service", 18 ] 19 sources = [ "geofence_interface_impl.cpp" ] 20 21 sanitize = { 22 cfi = true 23 cfi_cross_dso = true 24 debug = false 25 } 26 branch_protector_ret = "pac_ret" 27 28 deps = [] 29 30 cflags = [ 31 "-Wall", 32 "-Wextra", 33 "-Werror", 34 "-fsigned-char", 35 "-fno-common", 36 "-fno-strict-aliasing", 37 ] 38 39 if (is_standard_system) { 40 external_deps = [ 41 "c_utils:utils", 42 "drivers_interface_location_geofence:location_geofence_idl_headers", 43 "hilog:libhilog", 44 "ipc:ipc_single", 45 ] 46 } else { 47 external_deps = [ 48 "hilog:libhilog", 49 "ipc:ipc_single", 50 ] 51 } 52 53 external_deps += 54 [ "drivers_peripheral_location_gnss:libgnss_interface_service_2.0" ] 55 56 install_images = [ chipset_base_dir ] 57 subsystem_name = "hdf" 58 part_name = "drivers_peripheral_location_geofence" 59} 60 61ohos_shared_library("liblocation_geofence_hdi_driver") { 62 include_dirs = [ "//drivers/peripheral/location/geofence/hdi_service" ] 63 64 sources = [ "geofence_interface_driver.cpp" ] 65 66 cflags = [ 67 "-Wall", 68 "-Wextra", 69 "-Werror", 70 "-fsigned-char", 71 "-fno-common", 72 "-fno-strict-aliasing", 73 ] 74 75 if (is_standard_system) { 76 external_deps = [ 77 "c_utils:utils", 78 "hdf_core:libhdf_host", 79 "hdf_core:libhdf_ipc_adapter", 80 "hdf_core:libhdf_utils", 81 "hdf_core:libhdi", 82 "hilog:libhilog", 83 "ipc:ipc_single", 84 ] 85 } else { 86 external_deps = [ 87 "hilog:libhilog", 88 "ipc:ipc_single", 89 ] 90 } 91 92 external_deps += 93 [ "drivers_interface_location_geofence:liblocation_geofence_stub_2.0" ] 94 95 shlib_type = "hdi" 96 install_images = [ chipset_base_dir ] 97 subsystem_name = "hdf" 98 part_name = "drivers_peripheral_location_geofence" 99} 100 101group("hdi_location_geofence_service") { 102 deps = [ 103 ":libgeofence_interface_service_2.0", 104 ":liblocation_geofence_hdi_driver", 105 ] 106} 107