• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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/config/components/ets_frontend/ets2abc_config.gni")
15import("//build/ohos.gni")
16import("./../../../miscdevice.gni")
17
18ohos_shared_library("vibrator_ani") {
19  sanitize = {
20    ubsan = true
21    boundary_sanitize = true
22    cfi = true
23    cfi_cross_dso = true
24    debug = false
25  }
26  sources = [ "$SUBSYSTEM_DIR/frameworks/js/ani/vibrator/src/vibrator_ani.cpp" ]
27  include_dirs = [
28    "$SUBSYSTEM_DIR/frameworks/js/ani/vibrator/include",
29    "$SUBSYSTEM_DIR/utils/common/include",
30  ]
31  deps = [
32    "$SUBSYSTEM_DIR/frameworks/native/vibrator:vibrator_interface_native",
33    "$SUBSYSTEM_DIR/utils/common:libmiscdevice_utils",
34  ]
35  external_deps = [
36    "hilog:libhilog",
37    "napi:ace_napi",
38    "runtime_core:ani",
39  ]
40  subsystem_name = "sensors"
41  part_name = "miscdevice"
42  output_extension = "so"
43}
44
45generate_static_abc("vibrator_abc") {
46  base_url = "./vibrator/ets"
47  files = [ "./vibrator/ets/@ohos.vibrator.ets" ]
48  dst_file = "$target_out_dir/vibrator.abc"
49  out_puts = [ "$target_out_dir/vibrator.abc" ]
50  is_boot_abc = "True"
51  device_dst_file = "/system/framework/vibrator.abc"
52}
53
54ohos_prebuilt_etc("vibrator_abc_etc") {
55  source = "$target_out_dir/vibrator.abc"
56  module_install_dir = "framework"
57  subsystem_name = "sensors"
58  part_name = "miscdevice"
59  deps = [ ":vibrator_abc" ]
60}
61
62group("vibrator_ani_target") {
63  deps = [
64    ":vibrator_abc_etc",
65    ":vibrator_ani",
66  ]
67}
68