• 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_2.0") {
35    include_dirs = [
36      "../interfaces/include/",
37      "../interfaces/",
38      ".",
39      "../interfaces/v1_1",
40      "../utils/include",
41    ]
42    sources = [ "vibrator_if_service.cpp" ]
43
44    if (drivers_peripheral_vibrator_feature_tv_flag) {
45      defines = ["TV_FLAG"]
46    }
47
48    cflags = [
49      "-Wall",
50      "-Wextra",
51      "-Werror",
52      "-fsigned-char",
53      "-fno-common",
54      "-fno-strict-aliasing",
55    ]
56
57    if (is_standard_system) {
58      external_deps = [
59        "drivers_interface_vibrator:libvibrator_stub_2.0",
60        "hdf_core:libhdf_host",
61        "hilog:libhilog",
62        "hitrace:hitrace_meter",
63        "ipc:ipc_single",
64      ]
65      if (c_utils_enable) {
66        external_deps += [ "c_utils:utils" ]
67      }
68    } else {
69      external_deps = [
70        "hilog:libhilog",
71        "ipc:ipc_single",
72      ]
73    }
74
75    install_images = [ chipset_base_dir ]
76    subsystem_name = "hdf"
77    part_name = "drivers_peripheral_vibrator"
78  }
79
80  ohos_shared_library("libvibrator_driver") {
81    include_dirs = [
82      "../interfaces/include/",
83      "../utils/include",
84    ]
85    sources = [ "vibrator_if_driver.cpp" ]
86
87    cflags = [
88      "-Wall",
89      "-Wextra",
90      "-Werror",
91      "-fsigned-char",
92      "-fno-common",
93      "-fno-strict-aliasing",
94    ]
95
96    if (is_standard_system) {
97      external_deps = [
98        "drivers_interface_vibrator:libvibrator_stub_2.0",
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_2.0") {
123    deps = [
124      ":libvibrator_driver",
125      ":libvibrator_interface_service_2.0",
126    ]
127  }
128}
129