• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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("//drivers/adapter/uhdf2/uhdf.gni")
16import("$hdf_framework_path/tools/hc-gen/hc_gen.gni")
17
18hc_gen("build_hcs") {
19  hcs_source = "/hdf.hcs"
20
21  if (product_company == "openharmony") {
22    hcs_config_path = "default"
23  } else {
24    hcs_config_path = "//vendor/$product_company/$product_name/hdf_config/uhdf/"
25  }
26  sources = [ rebase_path(hcs_config_path + hcs_source) ]
27  outputs = [ "$target_gen_dir/hdf_default.hcb" ]
28}
29
30ohos_prebuilt_etc("hdf_default.hcb") {
31  deps = [ ":build_hcs" ]
32  hcs_outputs = get_target_outputs(":build_hcs")
33  source = hcs_outputs[0]
34  relative_install_dir = "hdfconfig"
35  install_images = [ chipset_base_dir ]
36  subsystem_name = "hdf"
37  part_name = "device_driver_framework"
38}
39