• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
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("//drivers/adapter/khdf/liteos/hdf.gni")
15
16group("drivers") {
17  deps = [
18    "adc",
19    "dmac",
20    "gpio",
21    "hieth-sf",
22    "hisi_sdk",
23    "i2c",
24    "i2s",
25    "mipi_dsi",
26    "mmc",
27    "mtd",
28    "pwm",
29    "rtc",
30    "spi",
31    "uart",
32    "watchdog",
33  ]
34}
35
36config("public") {
37  include_dirs = []
38  lib_dirs = [ "libs/ohos/llvm/$LOSCFG_PLATFORM" ]
39  ldflags = [ "-Wl,--push-state,--whole-archive" ]
40  if (defined(LOSCFG_DRIVERS_HIEDMAC)) {
41    ldflags += [ "-lhiedmac" ]
42  }
43
44  if (!defined(LOSCFG_DRIVERS_HDF_STORAGE_MTD)) {
45    if (defined(LOSCFG_DRIVERS_MTD)) {
46      include_dirs += [ "include/mtd/common/include" ]
47      ldflags += [ "-lmtd_common" ]
48    }
49    if (defined(LOSCFG_DRIVERS_MTD_SPI_NOR)) {
50      if (!defined(LOSCFG_SHELL)) {
51        ldflags += [ "-lspinor_flash_noshell" ]
52      } else {
53        ldflags += [ "-lspinor_flash" ]
54      }
55    }
56    if (defined(LOSCFG_DRIVERS_MTD_NAND)) {
57      ldflags += [ "-lnand_flash" ]
58    }
59  }
60
61  if (defined(LOSCFG_DRIVERS_MMC)) {
62    ldflags += [ "-lmmc" ]
63  }
64  if (defined(LOSCFG_DRIVERS_HDF_WIFI)) {
65    ldflags += [ "-lhdf_vendor_wifi" ]
66  }
67  if (defined(LOSCFG_DRIVERS_HDF_WIFI) && defined(LOSCFG_DRIVERS_HI3881)) {
68    ldflags += [ "-lhi3881" ]
69  }
70  ldflags += [ "-Wl,--pop-state" ]
71}
72