• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3#
4# This file is dual licensed: you can use it either under the terms of
5# the GPL, or the BSD license, at your option.
6# See the LICENSE file in the root of this repository for complete details.
7#
8
9import("//drivers/hdf_core/adapter/khdf/liteos_m/hdf.gni")
10
11module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_MIPI_DSI)
12module_name = get_path_info(rebase_path("."), "name")
13
14hdf_driver(module_name) {
15  sources = []
16  if (defined(LOSCFG_SOC_COMPANY_OSWARE)) {
17    sources += [ "mipi_drm_imx8mm.c" ]
18  }
19
20  include_dirs = [ "." ]
21  if (defined(LOSCFG_DRIVERS_HDF_CONFIG_MACRO)) {
22    HDF_HCS_BUILD_PATH = rebase_path(
23            "//device/board/$device_company/$device_name/liteos_m/hdf_config")
24    cmd = "if [ -f ${HDF_HCS_BUILD_PATH}/BUILD.gn ]; then echo true; else echo false; fi"
25    HAVE_HCS_BUILD_PATH =
26        exec_script("//build/lite/run_shell_cmd.py", [ cmd ], "value")
27    if (HAVE_HCS_BUILD_PATH) {
28      deps = [ "${HDF_HCS_BUILD_PATH}" ]
29    }
30  }
31}
32