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