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