• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020-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
14hdf_framework_path = "../../../framework"
15hdf_interfaces_path = "../../../interfaces"
16hdf_adapter_path = "../../../adapter"
17
18import("//build/ohos.gni")
19config("hdf_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/utils/include",
26    "$hdf_framework_path/include/osal",
27    "$hdf_framework_path/include/platform",
28    "$hdf_framework_path/support/platform/include",
29    "$hdf_interfaces_path/inner_api/osal/shared",
30    "$hdf_interfaces_path/inner_api/utils",
31    "$hdf_interfaces_path/inner_api/core",
32    "$hdf_framework_path/support/platform/include/fwk",
33    "$hdf_framework_path/support/platform/include/gpio",
34    "$hdf_framework_path/support/platform/include/hdmi",
35    "$hdf_framework_path/support/platform/include/i2c",
36    "$hdf_framework_path/support/platform/include/pin",
37    "$hdf_framework_path/support/platform/include/pwm",
38    "$hdf_framework_path/support/platform/include/spi",
39    "$hdf_framework_path/support/platform/include/uart",
40    "$hdf_framework_path/support/platform/include/adc",
41    "$hdf_framework_path/support/platform/include/dac",
42    "$hdf_framework_path/support/platform/include/regulator",
43    "$hdf_framework_path/support/platform/include/rtc",
44    "$hdf_framework_path/support/platform/include/timer",
45    "$hdf_framework_path/support/platform/include/watchdog",
46    "$hdf_framework_path/../adapter/uhdf/posix/include",
47  ]
48}
49
50ohos_shared_library("hdf_platform") {
51  include_dirs = []
52
53  public_configs = [ ":hdf_platform_pub_config" ]
54
55  sources = [
56    "$hdf_framework_path/model/storage/src/mmc/emmc_if.c",
57    "$hdf_framework_path/model/storage/src/mmc/mmc_if.c",
58    "$hdf_framework_path/support/platform/src/adc/adc_if_u.c",
59    "$hdf_framework_path/support/platform/src/dac/dac_if_u.c",
60    "$hdf_framework_path/support/platform/src/fwk/platform_listener_u.c",
61    "$hdf_framework_path/support/platform/src/gpio/gpio_if_u.c",
62    "$hdf_framework_path/support/platform/src/hdmi/hdmi_if.c",
63    "$hdf_framework_path/support/platform/src/i2c/i2c_if_u.c",
64    "$hdf_framework_path/support/platform/src/pcie/pcie_if_u.c",
65    "$hdf_framework_path/support/platform/src/pin/pin_if_u.c",
66    "$hdf_framework_path/support/platform/src/pwm/pwm_if_u.c",
67    "$hdf_framework_path/support/platform/src/rtc/rtc_base.c",
68    "$hdf_framework_path/support/platform/src/rtc/rtc_if_u.c",
69    "$hdf_framework_path/support/platform/src/spi/spi_if_u.c",
70    "$hdf_framework_path/support/platform/src/timer/timer_if_u.c",
71    "$hdf_framework_path/support/platform/src/uart/uart_if_u.c",
72    "$hdf_framework_path/support/platform/src/watchdog/watchdog_if_u.c",
73  ]
74
75  deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
76  public_deps = [ "$hdf_adapter_path/uhdf/manager:hdf_core" ]
77
78  external_deps = [
79    "hdf_core:hdf_posix_osal",
80    "hilog_featured_lite:hilog_shared",
81  ]
82
83  defines = [ "__USER__" ]
84
85  cflags = [
86    "-Wall",
87    "-Wextra",
88    "-Werror",
89    "-fsigned-char",
90    "-fno-common",
91    "-fno-strict-aliasing",
92  ]
93
94  # install_images = [ chipset_base_dir ]
95  subsystem_name = "hdf"
96  part_name = "hdf_core"
97}
98