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