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 "//third_party/bounds_checking_function/include", 31 ] 32 33 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 34 external_deps = [ 35 "hdf_core:libhdf_utils", 36 "hilog_featured_lite:hilog_shared", 37 ] 38 public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 39 40 cflags = [ 41 "-Wall", 42 "-Wextra", 43 "-Werror", 44 "-fsigned-char", 45 "-fno-common", 46 "-fno-strict-aliasing", 47 ] 48 subsystem_name = "hdf" 49 part_name = "drivers_peripheral_vibrator" 50 } 51} else { 52 config("libhdi_vibrator_pub_config") { 53 visibility = [ ":*" ] 54 include_dirs = [ "../interfaces/include" ] 55 } 56 ohos_shared_library("hdi_vibrator") { 57 public_configs = [ ":libhdi_vibrator_pub_config" ] 58 sources = [ "src/vibrator_controller.c" ] 59 60 include_dirs = [ 61 "include", 62 "//third_party/bounds_checking_function/include", 63 ] 64 65 cflags = [ 66 "-Wall", 67 "-Wextra", 68 "-Werror", 69 "-fsigned-char", 70 "-fno-common", 71 "-fno-strict-aliasing", 72 ] 73 install_images = [ chipset_base_dir ] 74 subsystem_name = "hdf" 75 part_name = "drivers_peripheral_vibrator" 76 if (is_standard_system) { 77 external_deps = [ 78 "c_utils:utils", 79 "hdf_core:libhdf_utils", 80 "hilog:libhilog", 81 ] 82 } else { 83 external_deps = [ "hilog:libhilog" ] 84 } 85 } 86} 87