device_hisilicon_modules/middleware/BUILD.gn
starfish002 4d6e4281a2 update to use third_party_ffmpeg
Signed-off-by: starfish002 <shaoyuan.zhang@huawei.com>
2021-08-13 19:42:14 +08:00

101 lines
3.2 KiB
Plaintext
Executable File

# Copyright (c) Hisilicon Technologies Co., Ltd. 2021-2021. All rights reserved.
if (defined(ohos_lite)) {
import("//build/lite/config/component/lite_component.gni")
} else {
import("//build/ohos.gni")
}
if (defined(ohos_lite)) {
if (board_name == "hi3516dv300" || board_name == "hispark_taurus" ||
board_name == "aegis_hi3516dv300") {
board = "hi3516dv300"
} else if (board_name == "hi3518ev300" || board_name == "hispark_aries") {
board = "hi3518ev300"
}
build_ext_component("middleware_source_sdk") {
exec_path = rebase_path(".", root_build_dir)
outdir = rebase_path("$root_out_dir")
clang_dir = ""
if (ohos_build_compiler_dir != "") {
clang_dir = rebase_path("${ohos_build_compiler_dir}/bin")
}
sysroot_path = rebase_path(ohos_current_sysroot)
arch_cflags = string_join(" ", target_arch_cflags)
arch_cflags += " --target=$target_triple -fuse-ld=lld --rtlib=compiler-rt"
command = "./build.sh ${outdir} ${board} ${ohos_kernel_type} ${ohos_build_compiler} ${storage_type} ${clang_dir} ${sysroot_path} \"${arch_cflags}\""
}
} else {
group("middleware_group") {
deps = [
":hitimer",
":mbuf",
":messagehandler",
":mwlog",
":dtcf",
":recorder_pro",
":exif",
":fileformat",
":mp4",
":ts",
]
}
if (use_musl) {
sub_path = "linux_standard"
} else {
sub_path = "ext"
}
ohos_prebuilt_shared_library("hitimer") {
source = "source/common/hitimer/lib/llvm/$sub_path/libhitimer.so"
subsystem_name = "hisilicon_products"
}
ohos_prebuilt_shared_library("mbuf") {
source = "source/common/mbuffer/lib/llvm/$sub_path/libmbuf.so"
subsystem_name = "hisilicon_products"
}
ohos_prebuilt_shared_library("messagehandler") {
source = "source/common/msghandler/lib/llvm/$sub_path/libmessagehandler.so"
subsystem_name = "hisilicon_products"
}
ohos_prebuilt_shared_library("mwlog") {
source = "source/common/log/lib/llvm/$sub_path/libmwlog.so"
subsystem_name = "hisilicon_products"
}
ohos_prebuilt_shared_library("dtcf") {
source = "source/component/dtcf/lib/llvm/$sub_path/libdtcf.so"
subsystem_name = "hisilicon_products"
}
ohos_prebuilt_shared_library("recorder_pro") {
source = "source/component/recorder_pro/lib/llvm/$sub_path/librecorder_pro.so"
subsystem_name = "hisilicon_products"
}
ohos_prebuilt_shared_library("exif") {
source = "source/component/fileformat/exif/lib/llvm/$sub_path/libexif.so"
subsystem_name = "hisilicon_products"
}
ohos_prebuilt_shared_library("fileformat") {
source = "source/component/fileformat/common/lib/llvm/$sub_path/libfileformat.so"
subsystem_name = "hisilicon_products"
}
ohos_prebuilt_shared_library("mp4") {
source = "source/component/fileformat/mp4/lib/llvm/$sub_path/libmp4.so"
subsystem_name = "hisilicon_products"
}
ohos_prebuilt_shared_library("ts") {
source = "source/component/fileformat/ts/lib/llvm/$sub_path/libts.so"
subsystem_name = "hisilicon_products"
}
}