• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
13
14HDF_CORE_PATH = "../../../hdf_core"
15import("//build/ohos.gni")
16import("$HDF_CORE_PATH/adapter/uhdf2/uhdf.gni")
17
18ohos_shared_library("libmotion_interface_service_1.1") {
19  include_dirs = [
20    ".",
21    "../interfaces/v1_0",
22  ]
23  sources = [
24    "motion_callback_vdi.cpp",
25    "motion_if_service.cpp",
26  ]
27  cflags = [
28    "-Wall",
29    "-Wextra",
30    "-Werror",
31    "-fsigned-char",
32    "-fno-common",
33    "-fno-strict-aliasing",
34  ]
35
36  if (is_standard_system) {
37    external_deps = [
38      "c_utils:utils",
39      "drivers_interface_motion:libmotion_stub_1.1",
40      "hdf_core:libhdf_host",
41      "hdf_core:libhdf_ipc_adapter",
42      "hdf_core:libhdf_utils",
43      "hilog:libhilog",
44      "hitrace:hitrace_meter",
45      "ipc:ipc_single",
46    ]
47  }
48
49  install_images = [ chipset_base_dir ]
50  subsystem_name = "hdf"
51  part_name = "drivers_peripheral_motion"
52}
53
54ohos_shared_library("libmotion_driver") {
55  sources = [ "motion_if_driver.cpp" ]
56
57  cflags = [
58    "-Wall",
59    "-Wextra",
60    "-Werror",
61    "-fsigned-char",
62    "-fno-common",
63    "-fno-strict-aliasing",
64  ]
65
66  if (is_standard_system) {
67    external_deps = [
68      "c_utils:utils",
69      "drivers_interface_motion:libmotion_stub_1.1",
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  }
78
79  shlib_type = "hdi"
80  install_images = [ chipset_base_dir ]
81  subsystem_name = "hdf"
82  part_name = "drivers_peripheral_motion"
83}
84
85group("hdi_motion_service") {
86  deps = [
87    ":libmotion_driver",
88    ":libmotion_interface_service_1.1",
89  ]
90}
91