• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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.
13
14HDF_CORE_PATH = "../../../hdf_core"
15import("//build/ohos.gni")
16import("$HDF_CORE_PATH/adapter/uhdf2/uhdf.gni")
17
18ohos_shared_library("libsensor_interface_service_2.0") {
19  include_dirs = [
20    ".",
21    "../interfaces/include",
22    "../interfaces/v1_0",
23    "../utils/include",
24  ]
25
26  sources = [
27    "sensor_callback_vdi.cpp",
28    "sensor_client_info.cpp",
29    "sensor_clients_manager.cpp",
30    "sensor_if_service.cpp",
31  ]
32
33  cflags = [
34    "-Wall",
35    "-Wextra",
36    "-Werror",
37    "-fsigned-char",
38    "-fno-common",
39    "-fno-strict-aliasing",
40  ]
41
42  if (is_standard_system) {
43    external_deps = [
44      "c_utils:utils",
45      "drivers_interface_sensor:sensor_idl_headers",
46      "hdf_core:libhdf_host",
47      "hdf_core:libhdf_ipc_adapter",
48      "hdf_core:libhdf_utils",
49      "hilog:libhilog",
50      "hitrace:hitrace_meter",
51      "ipc:ipc_single",
52    ]
53  } else {
54    external_deps = [
55      "hilog:libhilog",
56      "ipc:ipc_single",
57    ]
58  }
59
60  install_images = [ chipset_base_dir ]
61  subsystem_name = "hdf"
62  part_name = "drivers_peripheral_sensor"
63}
64
65ohos_shared_library("libsensor_driver") {
66  include_dirs = [
67    "../interfaces/include/",
68    "../utils/include",
69  ]
70  sources = [ "sensor_if_driver.cpp" ]
71
72  cflags = [
73    "-Wall",
74    "-Wextra",
75    "-Werror",
76    "-fsigned-char",
77    "-fno-common",
78    "-fno-strict-aliasing",
79  ]
80
81  if (is_standard_system) {
82    external_deps = [
83      "c_utils:utils",
84      "drivers_interface_sensor:libsensor_stub_2.0",
85      "hdf_core:libhdf_host",
86      "hdf_core:libhdf_ipc_adapter",
87      "hdf_core:libhdf_utils",
88      "hdf_core:libhdi",
89      "hilog:libhilog",
90      "ipc:ipc_single",
91    ]
92  } else {
93    external_deps = [
94      "hilog:libhilog",
95      "ipc:ipc_single",
96    ]
97  }
98
99  shlib_type = "hdi"
100  install_images = [ chipset_base_dir ]
101  subsystem_name = "hdf"
102  part_name = "drivers_peripheral_sensor"
103}
104
105group("hdi_sensor_service") {
106  deps = [
107    ":libsensor_driver",
108    ":libsensor_interface_service_2.0",
109  ]
110}
111