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.1",
47      "hdf_core:libhdf_host",
48      "hdf_core:libhdf_ipc_adapter",
49      "hdf_core:libhdf_utils",
50      "hilog:libhilog",
51      "hitrace:hitrace_meter",
52      "ipc:ipc_single",
53    ]
54    if (motion_c_utils_enable) {
55      external_deps += [ "c_utils:utils" ]
56    }
57  }
58
59  install_images = [ chipset_base_dir ]
60  subsystem_name = "hdf"
61  part_name = "drivers_peripheral_motion"
62}
63
64ohos_shared_library("libmotion_driver") {
65  include_dirs = [ "../utils/include" ]
66  sources = [ "motion_if_driver.cpp" ]
67
68  cflags = [
69    "-Wall",
70    "-Wextra",
71    "-Werror",
72    "-fsigned-char",
73    "-fno-common",
74    "-fno-strict-aliasing",
75  ]
76
77  if (is_standard_system) {
78    external_deps = [
79      "drivers_interface_motion:libmotion_stub_1.1",
80      "hdf_core:libhdf_host",
81      "hdf_core:libhdf_ipc_adapter",
82      "hdf_core:libhdf_utils",
83      "hdf_core:libhdi",
84      "hilog:libhilog",
85      "ipc:ipc_single",
86    ]
87    if (motion_c_utils_enable) {
88      external_deps += [ "c_utils:utils" ]
89    }
90  }
91
92  shlib_type = "hdi"
93  install_images = [ chipset_base_dir ]
94  subsystem_name = "hdf"
95  part_name = "drivers_peripheral_motion"
96}
97
98group("hdi_motion_service") {
99  deps = [
100    ":libmotion_driver",
101    ":libmotion_interface_service_1.1",
102  ]
103}
104