• 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
14import("//build/ohos.gni")
15import("../motion.gni")
16
17config("motion_vdi_config") {
18  include_dirs = [ "../interfaces/v1_0" ]
19}
20
21ohos_static_library("libmotion_vdi_config") {
22  public_configs = [ ":motion_vdi_config" ]
23}
24
25ohos_shared_library("libmotion_interface_service_1.1") {
26  include_dirs = [
27    ".",
28    "../interfaces/v1_0",
29    "../utils/include",
30  ]
31  sources = [
32    "motion_callback_vdi.cpp",
33    "motion_if_service.cpp",
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      "drivers_interface_motion:libmotion_stub_1.0",
47      "drivers_interface_motion:libmotion_stub_1.1",
48      "hdf_core:libhdf_host",
49      "hdf_core:libhdf_ipc_adapter",
50      "hdf_core:libhdf_utils",
51      "hilog:libhilog",
52      "hitrace:hitrace_meter",
53      "ipc:ipc_single",
54    ]
55    if (motion_c_utils_enable) {
56      external_deps += [ "c_utils:utils" ]
57    }
58  }
59
60  install_images = [ chipset_base_dir ]
61  subsystem_name = "hdf"
62  part_name = "drivers_peripheral_motion"
63}
64
65ohos_shared_library("libmotion_driver") {
66  include_dirs = [ "../utils/include" ]
67  sources = [ "motion_if_driver.cpp" ]
68
69  cflags = [
70    "-Wall",
71    "-Wextra",
72    "-Werror",
73    "-fsigned-char",
74    "-fno-common",
75    "-fno-strict-aliasing",
76  ]
77
78  if (is_standard_system) {
79    external_deps = [
80      "drivers_interface_motion:libmotion_stub_1.0",
81      "drivers_interface_motion:libmotion_stub_1.1",
82      "hdf_core:libhdf_host",
83      "hdf_core:libhdf_ipc_adapter",
84      "hdf_core:libhdf_utils",
85      "hdf_core:libhdi",
86      "hilog:libhilog",
87      "ipc:ipc_single",
88    ]
89    if (motion_c_utils_enable) {
90      external_deps += [ "c_utils:utils" ]
91    }
92  }
93
94  shlib_type = "hdi"
95  install_images = [ chipset_base_dir ]
96  subsystem_name = "hdf"
97  part_name = "drivers_peripheral_motion"
98}
99
100group("hdi_motion_service") {
101  deps = [
102    ":libmotion_driver",
103    ":libmotion_interface_service_1.1",
104  ]
105}
106