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("libgnss_interface_service_1.0") { 18 include_dirs = [ "${location_driver_path}/gnss/hdi_service" ] 19 sources = [ 20 "gnss_interface_impl.cpp", 21 "location_vendor_interface.cpp", 22 ] 23 24 cflags = [ 25 "-Wall", 26 "-Wextra", 27 "-Werror", 28 "-fsigned-char", 29 "-fno-common", 30 "-fno-strict-aliasing", 31 ] 32 33 if (is_standard_system) { 34 external_deps = [ 35 "c_utils:utils", 36 "drivers_interface_location_gnss:location_gnss_idl_headers", 37 "hdf_core:libhdi", 38 "hilog: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_gnss" 51} 52 53ohos_shared_library("liblocation_gnss_hdi_driver") { 54 include_dirs = [ "${location_driver_path}/gnss/hdi_service" ] 55 56 sources = [ "gnss_interface_driver.cpp" ] 57 58 cflags = [ 59 "-Wall", 60 "-Wextra", 61 "-Werror", 62 "-fsigned-char", 63 "-fno-common", 64 "-fno-strict-aliasing", 65 ] 66 67 if (is_standard_system) { 68 external_deps = [ 69 "c_utils:utils", 70 "hdf_core:libhdf_host", 71 "hdf_core:libhdf_ipc_adapter", 72 "hdf_core:libhdf_utils", 73 "hdf_core:libhdi", 74 "hilog:libhilog", 75 "ipc:ipc_single", 76 ] 77 } else { 78 external_deps = [ 79 "hilog:libhilog", 80 "ipc:ipc_single", 81 ] 82 } 83 84 external_deps += 85 [ "drivers_interface_location_gnss:liblocation_gnss_stub_1.0" ] 86 87 shlib_type = "hdi" 88 install_images = [ chipset_base_dir ] 89 subsystem_name = "hdf" 90 part_name = "drivers_peripheral_location_gnss" 91} 92 93group("hdi_location_gnss_service") { 94 deps = [ 95 ":libgnss_interface_service_1.0", 96 ":liblocation_gnss_hdi_driver", 97 ] 98} 99