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