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