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