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# 14 15import("//build/ohos.gni") 16 17if (defined(ohos_lite)) { 18 config("libhdi_vibrator_pub_config") { 19 visibility = [ ":*" ] 20 include_dirs = [] 21 } 22 ohos_shared_library("hdi_vibrator") { 23 output_extension = "z.so" 24 public_configs = [ ":libhdi_vibrator_pub_config" ] 25 sources = [ "src/vibrator_controller.c" ] 26 27 include_dirs = [ 28 "include", 29 "../interfaces/include", 30 "../utils/include", 31 "//third_party/bounds_checking_function/include", 32 ] 33 34 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 35 external_deps = [ 36 "hdf_core:libhdf_utils", 37 "hilog_lite:hilog_shared", 38 ] 39 public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 40 41 cflags = [ 42 "-Wall", 43 "-Wextra", 44 "-Werror", 45 "-fsigned-char", 46 "-fno-common", 47 "-fno-strict-aliasing", 48 ] 49 subsystem_name = "hdf" 50 part_name = "drivers_peripheral_vibrator" 51 } 52} else { 53 config("libhdi_vibrator_pub_config") { 54 visibility = [ ":*" ] 55 include_dirs = [ "../interfaces/include" ] 56 } 57 ohos_shared_library("hdi_vibrator") { 58 public_configs = [ ":libhdi_vibrator_pub_config" ] 59 sources = [ "src/vibrator_controller.c" ] 60 61 include_dirs = [ 62 "include", 63 "../utils/include", 64 "//third_party/bounds_checking_function/include", 65 ] 66 67 cflags = [ 68 "-Wall", 69 "-Wextra", 70 "-Werror", 71 "-fsigned-char", 72 "-fno-common", 73 "-fno-strict-aliasing", 74 ] 75 install_images = [ chipset_base_dir ] 76 subsystem_name = "hdf" 77 part_name = "drivers_peripheral_vibrator" 78 if (is_standard_system) { 79 external_deps = [ 80 "c_utils:utils", 81 "hdf_core:libhdf_utils", 82 "hilog:libhilog", 83 ] 84 } else { 85 external_deps = [ "hilog:libhilog" ] 86 } 87 } 88} 89