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 14import("//build/ohos.gni") 15import("../light.gni") 16 17config("light_vdi_config") { 18 include_dirs = [ 19 "../interfaces/include", 20 "../interfaces/v1_0", 21 ] 22} 23 24ohos_static_library("liblight_vdi_config") { 25 public_configs = [ ":light_vdi_config" ] 26} 27 28ohos_shared_library("liblight_interface_service_1.0") { 29 include_dirs = [ 30 "../interfaces/include/", 31 ".", 32 "../interfaces/v1_0/", 33 "../utils/include", 34 ] 35 36 sources = [ "light_if_service.cpp" ] 37 38 cflags = [ 39 "-Wall", 40 "-Wextra", 41 "-Werror", 42 "-fsigned-char", 43 "-fno-common", 44 "-fno-strict-aliasing", 45 ] 46 47 if (is_standard_system) { 48 external_deps = [ 49 "drivers_interface_light:liblight_stub_1.0", 50 "hdf_core:libhdf_host", 51 "hilog:libhilog", 52 "hitrace:hitrace_meter", 53 ] 54 if (c_utils_enable) { 55 external_deps += [ "c_utils:utils" ] 56 } 57 } else { 58 external_deps = [ "hilog:libhilog" ] 59 } 60 external_deps += [ "ipc:ipc_single" ] 61 62 install_images = [ chipset_base_dir ] 63 subsystem_name = "hdf" 64 part_name = "drivers_peripheral_light" 65} 66 67ohos_shared_library("liblight_driver") { 68 include_dirs = [ 69 "../interfaces/include/", 70 "../utils/include", 71 ] 72 sources = [ "light_if_driver.cpp" ] 73 74 cflags = [ 75 "-Wall", 76 "-Wextra", 77 "-Werror", 78 "-fsigned-char", 79 "-fno-common", 80 "-fno-strict-aliasing", 81 ] 82 83 if (is_standard_system) { 84 external_deps = [ 85 "drivers_interface_light:liblight_stub_1.0", 86 "hdf_core:libhdf_host", 87 "hdf_core:libhdf_ipc_adapter", 88 "hdf_core:libhdf_utils", 89 "hdf_core:libhdi", 90 "hilog:libhilog", 91 "ipc:ipc_single", 92 ] 93 if (c_utils_enable) { 94 external_deps += [ "c_utils:utils" ] 95 } 96 } else { 97 external_deps = [ 98 "hilog:libhilog", 99 "ipc:ipc_single", 100 ] 101 } 102 103 shlib_type = "hdi" 104 install_images = [ chipset_base_dir ] 105 subsystem_name = "hdf" 106 part_name = "drivers_peripheral_light" 107} 108 109group("hdf_light_service") { 110 deps = [ 111 ":liblight_driver", 112 ":liblight_interface_service_1.0", 113 ] 114} 115