• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15config("libagnss_interface_service_cfg") {
16  visibility = [":*"]
17  include_dirs = [ "//drivers/peripheral/location/gnss/hdi_service" ]
18}
19
20ohos_shared_library("libgnss_interface_service_2.0") {
21  public_configs = [":libagnss_interface_service_cfg"]
22  sources = [
23    "gnss_interface_impl.cpp",
24    "location_vendor_interface.cpp",
25    "string_utils.cpp",
26  ]
27
28  sanitize = {
29    cfi = true
30    cfi_cross_dso = true
31    debug = false
32  }
33  branch_protector_ret = "pac_ret"
34
35  cflags = [
36    "-Wall",
37    "-Wextra",
38    "-Werror",
39    "-fsigned-char",
40    "-fno-common",
41    "-fno-strict-aliasing",
42  ]
43
44  if (is_standard_system) {
45    external_deps = [
46      "c_utils:utils",
47      "drivers_interface_location_gnss:location_gnss_idl_headers",
48      "hdf_core:libhdi",
49      "hilog:libhilog",
50      "ipc:ipc_single",
51    ]
52  } else {
53    external_deps = [
54      "hilog:libhilog",
55      "ipc:ipc_single",
56    ]
57  }
58
59  defines = []
60  if (is_emulator) {
61    defines += [ "EMULATOR_ENABLED" ]
62  }
63
64  install_images = [ chipset_base_dir ]
65  subsystem_name = "hdf"
66  part_name = "drivers_peripheral_location_gnss"
67}
68
69ohos_shared_library("liblocation_gnss_hdi_driver") {
70  include_dirs = [ "//drivers/peripheral/location/gnss/hdi_service" ]
71
72  sources = [ "gnss_interface_driver.cpp" ]
73
74  cflags = [
75    "-Wall",
76    "-Wextra",
77    "-Werror",
78    "-fsigned-char",
79    "-fno-common",
80    "-fno-strict-aliasing",
81  ]
82
83  if (is_standard_system) {
84    external_deps = [
85      "c_utils:utils",
86      "hdf_core:libhdf_host",
87      "hdf_core:libhdf_ipc_adapter",
88      "hdf_core:libhdf_utils",
89      "hdf_core:libhdi",
90      "hilog:libhilog",
91      "ipc:ipc_single",
92    ]
93  } else {
94    external_deps = [
95      "hilog:libhilog",
96      "ipc:ipc_single",
97    ]
98  }
99
100  external_deps +=
101      [ "drivers_interface_location_gnss:liblocation_gnss_stub_2.0" ]
102
103  shlib_type = "hdi"
104  install_images = [ chipset_base_dir ]
105  subsystem_name = "hdf"
106  part_name = "drivers_peripheral_location_gnss"
107}
108
109group("hdi_location_gnss_service") {
110  deps = [
111    ":libgnss_interface_service_2.0",
112    ":liblocation_gnss_hdi_driver",
113  ]
114}
115