• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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.
13import("//build/ohos.gni")
14import("//drivers/adapter/uhdf2/uhdf.gni")
15
16ohos_shared_library("liblight_interface_service_1.0") {
17  include_dirs = [
18    "//drivers/adapter/uhdf2/include/hdi",
19    "//drivers/peripheral/misc/light/interfaces/include/",
20  ]
21  sources = [ "light_interface_impl.cpp" ]
22
23  public_deps = [
24    "//drivers/interface/light/v1_0:liblight_stub_1.0",
25    "//drivers/peripheral/misc/light/hal:hdi_light",
26    "//utils/native/base:utils",
27  ]
28  cflags = [
29    "-Wall",
30    "-Wextra",
31    "-Werror",
32    "-fsigned-char",
33    "-fno-common",
34    "-fno-strict-aliasing",
35  ]
36
37  if (is_standard_system) {
38    external_deps = [
39      "device_driver_framework:libhdf_utils",
40      "hiviewdfx_hilog_native:libhilog",
41    ]
42  } else {
43    external_deps = [ "hilog:libhilog" ]
44  }
45  external_deps += [ "ipc:ipc_single" ]
46
47  install_images = [ chipset_base_dir ]
48  subsystem_name = "hdf"
49  part_name = "light_device_driver"
50}
51
52ohos_shared_library("liblight_driver") {
53  include_dirs = [
54    "//drivers/adapter/uhdf2/ipc/include",
55    "//drivers/adapter/uhdf2/include/host",
56    "//drivers/adapter/uhdf2/include/hdi",
57    "//drivers/peripheral/misc/light/interfaces/include/",
58  ]
59  sources = [ "light_interface_driver.cpp" ]
60
61  deps = [
62    "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter",
63    "//drivers/peripheral/misc/light/hal:hdi_light",
64    "//drivers/peripheral/misc/light/hdi_service:liblight_interface_service_1.0",
65    "//utils/native/base:utils",
66  ]
67
68  cflags = [
69    "-Wall",
70    "-Wextra",
71    "-Werror",
72    "-fsigned-char",
73    "-fno-common",
74    "-fno-strict-aliasing",
75  ]
76
77  if (is_standard_system) {
78    external_deps = [
79      "device_driver_framework:libhdf_utils",
80      "hiviewdfx_hilog_native:libhilog",
81      "ipc:ipc_single",
82    ]
83  } else {
84    external_deps = [
85      "hilog:libhilog",
86      "ipc:ipc_single",
87    ]
88  }
89
90  install_images = [ chipset_base_dir ]
91  subsystem_name = "hdf"
92  part_name = "light_device_driver"
93}
94
95group("hdf_light_service") {
96  if (target_cpu == "arm") {
97    deps = [
98      ":liblight_driver",
99      ":liblight_interface_service_1.0",
100    ]
101  }
102}
103