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