• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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
16if (defined(ohos_lite)) {
17  config("input_hdi_public_config") {
18    visibility = [ ":*" ]
19    include_dirs = [
20      "include",
21      "//drivers/peripheral/input/interfaces/include",
22      "//third_party/bounds_checking_function/include",
23      "//third_party/FreeBSD/sys/dev/evdev",
24    ]
25  }
26
27  ohos_shared_library("hdi_input") {
28    output_extension = "z.so"
29    sources = [
30      "src/input_controller.c",
31      "src/input_manager.c",
32      "src/input_reporter.c",
33    ]
34
35    public_configs = [ ":input_hdi_public_config" ]
36    include_dirs = []
37
38    deps = [
39      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
40      "//third_party/bounds_checking_function:libsec_shared",
41    ]
42    external_deps = [ "device_driver_framework:libhdf_utils" ]
43    defines = [ "__USER__" ]
44
45    cflags = [
46      "-Wall",
47      "-Wextra",
48      "-Werror",
49      "-fsigned-char",
50      "-fno-common",
51      "-fno-strict-aliasing",
52    ]
53
54    subsystem_name = "hdf"
55
56    install_images = [
57      chipset_base_dir,
58      "updater",
59    ]
60    part_name = "input_device_driver"
61  }
62} else {
63  INPUT_ROOT_DIR = "//drivers/peripheral/input"
64  config("input_hdi_public_config") {
65    visibility = [ ":*" ]
66    include_dirs = [
67      "$INPUT_ROOT_DIR/interfaces/include",
68      "//third_party/FreeBSD/sys/dev/evdev",
69    ]
70  }
71
72  ohos_shared_library("hdi_input") {
73    sources = [
74      "src/input_controller.c",
75      "src/input_manager.c",
76      "src/input_reporter.c",
77    ]
78
79    public_configs = [ ":input_hdi_public_config" ]
80    include_dirs = [ "$INPUT_ROOT_DIR/hal/include" ]
81
82    defines = [ "__OHOS__USER__" ]
83
84    cflags = [
85      "-Wall",
86      "-Wextra",
87      "-Werror",
88      "-fsigned-char",
89      "-fno-common",
90      "-fno-strict-aliasing",
91    ]
92
93    subsystem_name = "hdf"
94    if (is_standard_system) {
95      external_deps = [
96        "device_driver_framework:libhdf_utils",
97        "hiviewdfx_hilog_native:libhilog",
98        "utils_base:utils",
99      ]
100    } else {
101      external_deps = [ "hilog:libhilog" ]
102    }
103    install_images = [
104      chipset_base_dir,
105      "updater",
106    ]
107    part_name = "input_device_driver"
108  }
109}
110