• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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")
15
16declare_args() {
17  miscdevice_feature_vibrator_custom = true
18  miscdevice_feature_hiviewdfx_hisysevent = true
19  miscdevice_feature_vibrator_input_method_enable = true
20  miscdevice_feature_crown_vibrator_enable = false
21}
22
23print(
24    "miscdevice_feature_vibrator_custom = ${miscdevice_feature_vibrator_custom}")
25
26SUBSYSTEM_DIR = "//base/sensors/miscdevice"
27
28FUZZ_MODULE_OUT_PATH = "miscdevice/miscdevice"
29
30miscdevice_default_defines = []
31
32if (miscdevice_feature_vibrator_custom) {
33  miscdevice_default_defines += [ "OHOS_BUILD_ENABLE_VIBRATOR_CUSTOM" ]
34}
35
36if (miscdevice_feature_vibrator_input_method_enable) {
37  miscdevice_default_defines += [ "OHOS_BUILD_ENABLE_VIBRATOR_INPUT_METHOD" ]
38}
39
40if (miscdevice_feature_crown_vibrator_enable) {
41  miscdevice_default_defines += [ "OHOS_BUILD_ENABLE_VIBRATOR_CROWN" ]
42}
43
44if (!defined(global_parts_info) ||
45    defined(global_parts_info.hdf_drivers_interface_light)) {
46  hdf_drivers_interface_light = true
47  miscdevice_default_defines += [ "HDF_DRIVERS_INTERFACE_LIGHT" ]
48} else {
49  hdf_drivers_interface_light = false
50}
51
52if (!defined(global_parts_info) ||
53    defined(global_parts_info.resourceschedule_memmgr_override)) {
54  miscdevice_memmgr_enable = true
55} else {
56  miscdevice_memmgr_enable = false
57}
58
59if (build_variant == "root") {
60  miscdevice_default_defines += [ "BUILD_VARIANT_ENG" ]
61  miscdevice_build_eng = true
62} else {
63  miscdevice_build_eng = false
64}
65
66if (!defined(global_parts_info) ||
67    defined(global_parts_info.hdf_drivers_interface_vibrator)) {
68  miscdevice_feature_hdf_drivers_interface_vibrator = true
69  miscdevice_default_defines += [ "HDF_DRIVERS_INTERFACE_VIBRATOR" ]
70} else {
71  miscdevice_feature_hdf_drivers_interface_vibrator = false
72}
73
74if (!defined(global_parts_info) ||
75    defined(global_parts_info.hiviewdfx_hisysevent)) {
76  miscdevice_feature_hiviewdfx_hisysevent = true
77  miscdevice_default_defines += [ "HIVIEWDFX_HISYSEVENT_ENABLE" ]
78} else {
79  miscdevice_feature_hiviewdfx_hisysevent = false
80}
81
82if (!defined(global_parts_info) ||
83    defined(global_parts_info.hiviewdfx_hitrace)) {
84  miscdevice_feature_hiviewdfx_hitrace = true
85  miscdevice_default_defines += [ "HIVIEWDFX_HITRACE_ENABLE" ]
86} else {
87  miscdevice_feature_hiviewdfx_hitrace = false
88}
89