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