• 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
14import("//build/ohos.gni")
15import("../vibrator.gni")
16
17if (defined(ohos_lite)) {
18  group("hdf_vibrator_service") {
19    deps = []
20    public_configs = []
21  }
22} else {
23  config("vibrator_vdi_config") {
24    include_dirs = [
25      "../interfaces/include",
26      "../interfaces/v1_1",
27    ]
28  }
29
30  ohos_static_library("libvibrator_vdi_config") {
31    public_configs = [ ":vibrator_vdi_config" ]
32  }
33
34  ohos_shared_library("libvibrator_interface_service_1.3") {
35    include_dirs = [
36      "../interfaces/include/",
37      ".",
38      "../interfaces/v1_1/",
39      "../utils/include",
40    ]
41    sources = [ "vibrator_if_service.cpp" ]
42
43    cflags = [
44      "-Wall",
45      "-Wextra",
46      "-Werror",
47      "-fsigned-char",
48      "-fno-common",
49      "-fno-strict-aliasing",
50    ]
51
52    if (is_standard_system) {
53      external_deps = [
54        "drivers_interface_vibrator:libvibrator_stub_1.1",
55        "drivers_interface_vibrator:libvibrator_stub_1.2",
56        "drivers_interface_vibrator:libvibrator_stub_1.3",
57        "hdf_core:libhdf_host",
58        "hdf_core:libhdf_utils",
59        "hilog:libhilog",
60        "hitrace:hitrace_meter",
61        "ipc:ipc_single",
62      ]
63      if (c_utils_enable) {
64        external_deps += [ "c_utils:utils" ]
65      }
66    } else {
67      external_deps = [
68        "hilog:libhilog",
69        "ipc:ipc_single",
70      ]
71    }
72
73    install_images = [ chipset_base_dir ]
74    subsystem_name = "hdf"
75    part_name = "drivers_peripheral_vibrator"
76  }
77
78  ohos_shared_library("libvibrator_driver_1.3") {
79    include_dirs = [
80      "../interfaces/include/",
81      "../utils/include",
82    ]
83    sources = [ "vibrator_if_driver.cpp" ]
84
85    cflags = [
86      "-Wall",
87      "-Wextra",
88      "-Werror",
89      "-fsigned-char",
90      "-fno-common",
91      "-fno-strict-aliasing",
92    ]
93
94    if (is_standard_system) {
95      external_deps = [
96        "drivers_interface_vibrator:libvibrator_stub_1.1",
97        "drivers_interface_vibrator:libvibrator_stub_1.2",
98        "drivers_interface_vibrator:libvibrator_stub_1.3",
99        "hdf_core:libhdf_host",
100        "hdf_core:libhdf_ipc_adapter",
101        "hdf_core:libhdf_utils",
102        "hdf_core:libhdi",
103        "hilog:libhilog",
104        "ipc:ipc_single",
105      ]
106      if (c_utils_enable) {
107        external_deps += [ "c_utils:utils" ]
108      }
109    } else {
110      external_deps = [
111        "hilog:libhilog",
112        "ipc:ipc_single",
113      ]
114    }
115
116    shlib_type = "hdi"
117    install_images = [ chipset_base_dir ]
118    subsystem_name = "hdf"
119    part_name = "drivers_peripheral_vibrator"
120  }
121
122  group("hdf_vibrator_service") {
123    deps = [
124      ":libvibrator_driver_1.3",
125      ":libvibrator_interface_service_1.3",
126    ]
127  }
128}
129