• 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.
13import("//build/ohos.gni")
14import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
15if (defined(ohos_lite)) {
16  group("hdf_vibrator_service") {
17    deps = []
18    public_configs = []
19  }
20} else {
21  ohos_shared_library("libvibrator_interface_service_1.1") {
22    include_dirs = [
23      "//drivers/hdf_core/adapter/uhdf2/include/hdi",
24      "//drivers/peripheral/vibrator/interfaces/include/",
25    ]
26    sources = [ "vibrator_interface_impl.cpp" ]
27    deps = [ "//drivers/peripheral/vibrator/hal:hdi_vibrator" ]
28
29    cflags = [
30      "-Wall",
31      "-Wextra",
32      "-Werror",
33      "-fsigned-char",
34      "-fno-common",
35      "-fno-strict-aliasing",
36    ]
37
38    if (is_standard_system) {
39      external_deps = [
40        "c_utils:utils",
41        "drivers_interface_vibrator:vibrator_idl_headers",
42        "hiviewdfx_hilog_native:libhilog",
43        "ipc:ipc_single",
44      ]
45    } else {
46      external_deps = [
47        "hilog:libhilog",
48        "ipc:ipc_single",
49      ]
50    }
51
52    install_images = [ chipset_base_dir ]
53    subsystem_name = "hdf"
54    part_name = "drivers_peripheral_vibrator"
55  }
56
57  ohos_shared_library("libvibrator_driver") {
58    include_dirs = [
59      "//drivers/hdf_core/adapter/uhdf2/ipc/include",
60      "//drivers/hdf_core/adapter/uhdf2/include/host",
61      "//drivers/hdf_core/adapter/uhdf2/include/hdi",
62      "//drivers/peripheral/vibrator/interfaces/include/",
63    ]
64    sources = [ "vibrator_interface_driver.cpp" ]
65
66    deps = [
67      "//drivers/hdf_core/adapter/uhdf2/ipc:libhdf_ipc_adapter",
68      "//drivers/interface/vibrator/v1_1:libvibrator_stub_1.1",
69    ]
70
71    cflags = [
72      "-Wall",
73      "-Wextra",
74      "-Werror",
75      "-fsigned-char",
76      "-fno-common",
77      "-fno-strict-aliasing",
78    ]
79
80    if (is_standard_system) {
81      external_deps = [
82        "c_utils:utils",
83        "hdf_core:libhdi",
84        "hiviewdfx_hilog_native:libhilog",
85        "ipc:ipc_single",
86      ]
87    } else {
88      external_deps = [
89        "hilog:libhilog",
90        "ipc:ipc_single",
91      ]
92    }
93
94    install_images = [ chipset_base_dir ]
95    subsystem_name = "hdf"
96    part_name = "drivers_peripheral_vibrator"
97  }
98
99  group("hdf_vibrator_service") {
100    deps = [
101      ":libvibrator_driver",
102      ":libvibrator_interface_service_1.1",
103    ]
104  }
105}
106