2021-12-15 02:45:47 +00:00
|
|
|
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
2022-01-12 09:11:18 +00:00
|
|
|
#
|
2021-12-20 13:44:20 +00:00
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License version 2 as
|
|
|
|
# published by the Free Software Foundation.
|
2021-12-15 02:45:47 +00:00
|
|
|
|
|
|
|
import("//build/ohos.gni")
|
2022-01-12 09:11:18 +00:00
|
|
|
config("f2fs-defaults") {
|
|
|
|
cflags = [
|
|
|
|
"-std=gnu89",
|
|
|
|
"-Wno-implicit-function-declaration",
|
|
|
|
"-Wno-pointer-sign",
|
|
|
|
]
|
2021-12-15 02:45:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
###################################################
|
|
|
|
##Build f2fscrypt
|
|
|
|
ohos_executable("f2fscrypt") {
|
2022-01-12 09:11:18 +00:00
|
|
|
configs = [ ":f2fs-defaults" ]
|
|
|
|
sources = [
|
|
|
|
"f2fscrypt.c",
|
|
|
|
"sha512.c",
|
2021-12-15 02:45:47 +00:00
|
|
|
]
|
|
|
|
include_dirs = [
|
|
|
|
".",
|
2022-01-12 09:11:18 +00:00
|
|
|
"//third_party/f2fs-tools",
|
|
|
|
"//third_party/f2fs-tools/include",
|
2023-05-20 08:59:34 +00:00
|
|
|
"//third_party/e2fsprogs/e2fsprogs/lib/uuid",
|
2021-12-15 02:45:47 +00:00
|
|
|
]
|
|
|
|
cflags = [ "-Wno-error=format-extra-args" ]
|
|
|
|
|
2023-05-20 08:59:34 +00:00
|
|
|
deps = [ "//third_party/e2fsprogs/e2fsprogs/lib/uuid:libext2_uuid" ]
|
2021-12-15 02:45:47 +00:00
|
|
|
|
|
|
|
install_enable = true
|
2022-08-18 07:57:49 +00:00
|
|
|
subsystem_name = "thirdparty"
|
|
|
|
part_name = "f2fs_tools"
|
2022-01-12 09:11:18 +00:00
|
|
|
install_images = [ "system" ]
|
2021-12-15 02:45:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
###################################################
|
|
|
|
##Build f2fstat
|
|
|
|
ohos_executable("f2fstat") {
|
2022-01-12 09:11:18 +00:00
|
|
|
configs = [ ":f2fs-defaults" ]
|
|
|
|
sources = [ "f2fstat.c" ]
|
2021-12-15 02:45:47 +00:00
|
|
|
|
2022-01-12 09:11:18 +00:00
|
|
|
include_dirs = [ "." ]
|
2021-12-15 02:45:47 +00:00
|
|
|
cflags = [
|
|
|
|
"-Wno-error=format",
|
|
|
|
"-Wno-error=type-limits",
|
|
|
|
"-Wno-format-extra-args",
|
|
|
|
]
|
|
|
|
|
2022-01-12 09:11:18 +00:00
|
|
|
deps = []
|
2021-12-15 02:45:47 +00:00
|
|
|
|
|
|
|
install_enable = true
|
2022-08-18 07:57:49 +00:00
|
|
|
subsystem_name = "thirdparty"
|
|
|
|
part_name = "f2fs_tools"
|
2022-01-12 09:11:18 +00:00
|
|
|
install_images = [ "system" ]
|
2021-12-15 02:45:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
###################################################
|
|
|
|
##Build fibmap.f2fs
|
|
|
|
ohos_executable("fibmap.f2fs") {
|
2022-01-12 09:11:18 +00:00
|
|
|
configs = [ ":f2fs-defaults" ]
|
|
|
|
sources = [ "fibmap.c" ]
|
2021-12-15 02:45:47 +00:00
|
|
|
|
|
|
|
include_dirs = [
|
|
|
|
".",
|
2022-01-12 09:11:18 +00:00
|
|
|
"//third_party/f2fs-tools",
|
|
|
|
"//third_party/f2fs-tools/include",
|
|
|
|
"//third_party/f2fs-tools/lib",
|
2021-12-15 02:45:47 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
cflags = [
|
|
|
|
"-Wno-error=format",
|
|
|
|
"-Wno-error=type-limits",
|
|
|
|
"-Wno-format-extra-args",
|
|
|
|
]
|
|
|
|
|
2022-01-12 09:11:18 +00:00
|
|
|
deps = [ "//third_party/f2fs-tools/lib:libf2fs" ]
|
2021-12-15 02:45:47 +00:00
|
|
|
|
2022-01-12 09:11:18 +00:00
|
|
|
defines = [ "HAVE_CONFIG_H" ]
|
2021-12-15 02:45:47 +00:00
|
|
|
|
|
|
|
install_enable = true
|
2022-08-18 07:57:49 +00:00
|
|
|
subsystem_name = "thirdparty"
|
|
|
|
part_name = "f2fs_tools"
|
2022-01-12 09:11:18 +00:00
|
|
|
install_images = [ "system" ]
|
2021-12-15 02:45:47 +00:00
|
|
|
}
|