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") 16import("../light.gni") 17 18if (defined(ohos_lite)) { 19 config("libhdi_light_pub_config") { 20 visibility = [ ":*" ] 21 } 22 23 ohos_shared_library("hdi_light") { 24 output_extension = "z.so" 25 sources = [ "src/light_controller.c" ] 26 27 include_dirs = [ 28 "include", 29 "../interfaces/include", 30 "../utils/include", 31 ] 32 33 public_configs = [ ":libhdi_light_pub_config" ] 34 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 ] 68 cflags = [ 69 "-Wall", 70 "-Wextra", 71 "-Werror", 72 "-fsigned-char", 73 "-fno-common", 74 "-fno-strict-aliasing", 75 ] 76 install_images = [ chipset_base_dir ] 77 subsystem_name = "hdf" 78 part_name = "drivers_peripheral_light" 79 if (is_standard_system) { 80 external_deps = [ 81 "hdf_core:libhdf_host", 82 "hdf_core:libhdf_utils", 83 "hilog:libhilog", 84 ] 85 if (c_utils_enable) { 86 external_deps += [ "c_utils:utils" ] 87 } 88 } else { 89 external_deps = [ "hilog:libhilog" ] 90 } 91 } 92} 93