1# Copyright (c) 2022 Huawei Device Co., Ltd. 2# 3# This software is licensed under the terms of the GNU General Public 4# License version 2, as published by the Free Software Foundation, and 5# may be copied, distributed, and modified under those terms. 6# 7# This program is distributed in the hope that it will be useful, 8# but WITHOUT ANY WARRANTY; without even the implied warranty of 9# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10# GNU General Public License for more details. 11 12import("//build/config/clang/clang.gni") 13import("//build/ohos.gni") 14import("//build/ohos/kernel/kernel.gni") 15 16action("module_make") { 17 script = "./build/build_hdf_module.sh" 18 outputs = [ "${target_out_dir}/hdf_test_helper.ko" ] 19 args = [ 20 rebase_path("//"), #ohos root path 21 rebase_path("./src/"), #source path 22 rebase_path("${target_out_dir}"), #out path 23 rebase_path("$clang_base_path"), #toolchain path 24 linux_kernel_version, 25 ] 26 deps = [ "//kernel/linux/build:linux_kernel" ] 27} 28 29ohos_prebuilt_shared_library("hdf_test_helper") { 30 deps = [ ":module_make" ] 31 sources = get_target_outputs(":module_make") 32 source = sources[0] 33 module_install_dir = "modules" 34 install_images = [ chipset_base_dir ] 35 subsystem_name = "hdf" 36 part_name = "device_driver_framework" 37} 38 39group("test_helper_module") { 40 deps = [ ":hdf_test_helper" ] 41} 42