• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
14import("//build/ohos.gni")
15import("//drivers/adapter/uhdf2/uhdf.gni")
16
17HDF_FRAMEWORKS = "//drivers/framework"
18
19config("libhdf_platform_pub_config") {
20  visibility = [ ":*" ]
21
22  include_dirs = [
23    "$hdf_framework_path/include/core",
24    "$hdf_framework_path/include/utils",
25    "$hdf_framework_path/include/osal",
26    "$hdf_framework_path/utils/include",
27    "$hdf_framework_path/include/platform",
28    "$hdf_uhdf_path/osal/include",
29    "$hdf_uhdf_path/utils/include",
30  ]
31}
32
33ohos_shared_library("libhdf_platform") {
34  public_configs = [ ":libhdf_platform_pub_config" ]
35  sources = [
36    "$HDF_FRAMEWORKS/support/platform/src/adc/adc_if_u.c",
37    "$HDF_FRAMEWORKS/support/platform/src/gpio/gpio_if_u.c",
38    "$HDF_FRAMEWORKS/support/platform/src/i2c/i2c_if_u.c",
39    "$HDF_FRAMEWORKS/support/platform/src/rtc/rtc_base.c",
40    "$HDF_FRAMEWORKS/support/platform/src/rtc/rtc_if_u.c",
41    "$HDF_FRAMEWORKS/support/platform/src/spi/spi_if_u.c",
42    "$HDF_FRAMEWORKS/support/platform/src/timer/timer_if_u.c",
43    "$HDF_FRAMEWORKS/support/platform/src/uart/uart_if_u.c",
44  ]
45
46  include_dirs = [
47    "$HDF_FRAMEWORKS/support/platform/include",
48    "$HDF_FRAMEWORKS/support/platform/include/fwk",
49  ]
50
51  deps = [
52    "//drivers/adapter/uhdf2/host:libhdf_host",
53    "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter",
54    "//drivers/adapter/uhdf2/utils:libhdf_utils",
55  ]
56
57  defines = [ "__USER__" ]
58
59  if (is_standard_system) {
60    external_deps = [
61      "hiviewdfx_hilog_native:libhilog",
62      "utils_base:utils",
63    ]
64  } else {
65    external_deps = [ "hilog:libhilog" ]
66  }
67
68  cflags = [
69    "-Wall",
70    "-Wextra",
71    "-Werror",
72    "-fsigned-char",
73    "-fno-common",
74    "-fno-strict-aliasing",
75  ]
76
77  install_images = [ chipset_base_dir ]
78  subsystem_name = "hdf"
79  part_name = "device_driver_framework"
80}
81