• 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/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.0") {
22    include_dirs = [
23      "//drivers/adapter/uhdf2/include/hdi",
24      "//drivers/peripheral/misc/vibrator/interfaces/include/",
25    ]
26    sources = [ "vibrator_interface_impl.cpp" ]
27
28    public_deps = [
29      "//drivers/interface/vibrator/v1_0:libvibrator_stub_1.0",
30      "//drivers/peripheral/misc/vibrator/hal:hdi_vibrator",
31      "//utils/native/base:utils",
32    ]
33
34    cflags = [
35      "-Wall",
36      "-Wextra",
37      "-Werror",
38      "-fsigned-char",
39      "-fno-common",
40      "-fno-strict-aliasing",
41    ]
42
43    if (is_standard_system) {
44      external_deps = [
45        "device_driver_framework:libhdf_utils",
46        "hiviewdfx_hilog_native:libhilog",
47        "ipc:ipc_single",
48      ]
49    } else {
50      external_deps = [
51        "hilog:libhilog",
52        "ipc:ipc_single",
53      ]
54    }
55
56    install_images = [ chipset_base_dir ]
57    subsystem_name = "hdf"
58    part_name = "vibrator_device_driver"
59  }
60
61  ohos_shared_library("libvibrator_driver") {
62    include_dirs = [
63      "//drivers/adapter/uhdf2/ipc/include",
64      "//drivers/adapter/uhdf2/include/host",
65      "//drivers/adapter/uhdf2/include/hdi",
66      "//drivers/peripheral/misc/vibrator/interfaces/include/",
67    ]
68    sources = [ "vibrator_interface_driver.cpp" ]
69
70    deps = [
71      "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter",
72      "//drivers/peripheral/misc/vibrator/hal:hdi_vibrator",
73      "//drivers/peripheral/misc/vibrator/hdi_service:libvibrator_interface_service_1.0",
74      "//utils/native/base:utils",
75    ]
76
77    cflags = [
78      "-Wall",
79      "-Wextra",
80      "-Werror",
81      "-fsigned-char",
82      "-fno-common",
83      "-fno-strict-aliasing",
84    ]
85
86    if (is_standard_system) {
87      external_deps = [
88        "device_driver_framework:libhdf_utils",
89        "hiviewdfx_hilog_native:libhilog",
90        "ipc:ipc_single",
91      ]
92    } else {
93      external_deps = [
94        "hilog:libhilog",
95        "ipc:ipc_single",
96      ]
97    }
98
99    install_images = [ chipset_base_dir ]
100    subsystem_name = "hdf"
101    part_name = "vibrator_device_driver"
102  }
103
104  group("hdf_vibrator_service") {
105    if (target_cpu == "arm") {
106      deps = [
107        ":libvibrator_driver",
108        ":libvibrator_interface_service_1.0",
109      ]
110    }
111  }
112}
113