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") 15INPUT_ROOT_DIR = "./.." 16 17if (defined(ohos_lite)) { 18 config("input_hdi_public_config") { 19 visibility = [ ":*" ] 20 include_dirs = [ 21 "include", 22 "$INPUT_ROOT_DIR/interfaces/include", 23 "//third_party/bounds_checking_function/include", 24 "//third_party/FreeBSD/sys/dev/evdev", 25 ] 26 } 27 28 ohos_shared_library("hdi_input") { 29 output_extension = "z.so" 30 sources = [ 31 "src/input_controller.c", 32 "src/input_manager.c", 33 "src/input_reporter.c", 34 ] 35 36 public_configs = [ ":input_hdi_public_config" ] 37 include_dirs = [] 38 39 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 40 external_deps = [ 41 "hdf_core:libhdf_utils", 42 "hilog_featured_lite:hilog_shared", 43 ] 44 defines = [ "__USER__" ] 45 46 cflags = [ 47 "-Wall", 48 "-Wextra", 49 "-Werror", 50 "-fsigned-char", 51 "-fno-common", 52 "-fno-strict-aliasing", 53 ] 54 55 subsystem_name = "hdf" 56 57 install_images = [ 58 chipset_base_dir, 59 "updater", 60 ] 61 part_name = "drivers_peripheral_input" 62 } 63} else { 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 "c_utils:utils", 97 "hdf_core:libhdf_utils", 98 "hilog:libhilog", 99 ] 100 } else { 101 external_deps = [ "hilog:libhilog" ] 102 } 103 install_images = [ 104 chipset_base_dir, 105 "updater", 106 ] 107 innerapi_tags = [ "passthrough_indirect" ] 108 part_name = "drivers_peripheral_input" 109 } 110} 111