• 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/hdf_core/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_csi",
26    "mipi_dsi",
27    "mmc",
28    "mtd",
29    "pin",
30    "pwm",
31    "rtc",
32    "spi",
33    "timer",
34    "uart",
35    "watchdog",
36    "wifi/hi3881v100/firmware:wifi_firmware",
37  ]
38}
39
40config("public") {
41  include_dirs = []
42  if (defined(LOSCFG_COMPILER_CLANG_LLVM)) {
43    cur_compiler = "llvm"
44  } else {
45    cur_compiler = "gcc"
46  }
47  lib_dirs = [ "libs/ohos/$cur_compiler/$LOSCFG_PLATFORM" ]
48  ldflags = [ "-Wl,--push-state,--whole-archive" ]
49  if (defined(LOSCFG_DRIVERS_HIEDMAC)) {
50    ldflags += [ "-lhiedmac" ]
51  }
52
53  if (!defined(LOSCFG_DRIVERS_HDF_STORAGE_MTD)) {
54    if (defined(LOSCFG_DRIVERS_MTD)) {
55      include_dirs += [ "include/mtd/common/include" ]
56      ldflags += [ "-lmtd_common" ]
57    }
58    if (defined(LOSCFG_DRIVERS_MTD_SPI_NOR)) {
59      if (!defined(LOSCFG_SHELL)) {
60        ldflags += [ "-lspinor_flash_noshell" ]
61      } else {
62        ldflags += [ "-lspinor_flash" ]
63      }
64    }
65    if (defined(LOSCFG_DRIVERS_MTD_NAND)) {
66      ldflags += [ "-lnand_flash" ]
67    }
68  }
69
70  if (defined(LOSCFG_DRIVERS_MMC)) {
71    ldflags += [ "-lmmc" ]
72  }
73  if (defined(LOSCFG_DRIVERS_HDF_WIFI)) {
74    ldflags += [ "-lhdf_vendor_wifi" ]
75  }
76  if (defined(LOSCFG_DRIVERS_HDF_WIFI) && defined(LOSCFG_DRIVERS_HI3881)) {
77    ldflags += [ "-lhi3881" ]
78  }
79  ldflags += [ "-Wl,--pop-state" ]
80  if (defined(LOSCFG_DRIVERS_HDF_USB)) {
81    if (LOSCFG_PLATFORM == "hi3516dv300") {
82      ldflags += [ "-lusb_dwc3" ]
83    }
84  }
85}
86