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 = [ "hdf_core: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 relative_install_dir = "chipset-sdk" 61 part_name = "drivers_peripheral_input" 62 } 63} else { 64 INPUT_ROOT_DIR = "//drivers/peripheral/input" 65 config("input_hdi_public_config") { 66 visibility = [ ":*" ] 67 include_dirs = [ 68 "$INPUT_ROOT_DIR/interfaces/include", 69 "//third_party/FreeBSD/sys/dev/evdev", 70 ] 71 } 72 73 ohos_shared_library("hdi_input") { 74 sources = [ 75 "src/input_controller.c", 76 "src/input_manager.c", 77 "src/input_reporter.c", 78 ] 79 80 public_configs = [ ":input_hdi_public_config" ] 81 include_dirs = [ "$INPUT_ROOT_DIR/hal/include" ] 82 83 defines = [ "__OHOS__USER__" ] 84 85 cflags = [ 86 "-Wall", 87 "-Wextra", 88 "-Werror", 89 "-fsigned-char", 90 "-fno-common", 91 "-fno-strict-aliasing", 92 ] 93 94 subsystem_name = "hdf" 95 if (is_standard_system) { 96 external_deps = [ 97 "c_utils:utils", 98 "hdf_core:libhdf_utils", 99 "hiviewdfx_hilog_native:libhilog", 100 ] 101 } else { 102 external_deps = [ "hilog:libhilog" ] 103 } 104 install_images = [ 105 chipset_base_dir, 106 "updater", 107 ] 108 part_name = "drivers_peripheral_input" 109 } 110} 111