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("libgnss_interface_service_1.0") { 17 include_dirs = [ "//drivers/peripheral/location/gnss/hdi_service" ] 18 sources = [ 19 "gnss_interface_impl.cpp", 20 "location_vendor_interface.cpp", 21 ] 22 23 cflags = [ 24 "-Wall", 25 "-Wextra", 26 "-Werror", 27 "-fsigned-char", 28 "-fno-common", 29 "-fno-strict-aliasing", 30 ] 31 32 if (is_standard_system) { 33 external_deps = [ 34 "c_utils:utils", 35 "drivers_interface_location_gnss:location_gnss_idl_headers", 36 "hiviewdfx_hilog_native:libhilog", 37 "ipc:ipc_single", 38 ] 39 } else { 40 external_deps = [ 41 "hilog:libhilog", 42 "ipc:ipc_single", 43 ] 44 } 45 46 install_images = [ chipset_base_dir ] 47 subsystem_name = "hdf" 48 part_name = "drivers_peripheral_location_gnss" 49} 50 51ohos_shared_library("liblocation_gnss_hdi_driver") { 52 include_dirs = [ "//drivers/peripheral/location/gnss/hdi_service" ] 53 54 sources = [ "gnss_interface_driver.cpp" ] 55 56 deps = [ "//drivers/interface/location/gnss/v1_0:liblocation_gnss_stub_1.0" ] 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:libhdi", 73 "hiviewdfx_hilog_native:libhilog", 74 "ipc:ipc_single", 75 ] 76 } else { 77 external_deps = [ 78 "hilog:libhilog", 79 "ipc:ipc_single", 80 ] 81 } 82 83 install_images = [ chipset_base_dir ] 84 subsystem_name = "hdf" 85 part_name = "drivers_peripheral_location_gnss" 86} 87 88group("hdi_location_gnss_service") { 89 deps = [ 90 ":libgnss_interface_service_1.0", 91 ":liblocation_gnss_hdi_driver", 92 ] 93} 94