• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2#
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License version 2 as
5# published by the Free Software Foundation.
6
7import("//build/ohos.gni")
8config("f2fs-defaults") {
9  cflags = [
10    "-std=gnu89",
11    "-Wno-implicit-function-declaration",
12    "-Wno-pointer-sign",
13  ]
14}
15
16###################################################
17##Build f2fscrypt
18ohos_executable("f2fscrypt") {
19  configs = [ ":f2fs-defaults" ]
20  sources = [
21    "f2fscrypt.c",
22    "sha512.c",
23  ]
24  include_dirs = [
25    ".",
26    "//third_party/f2fs-tools",
27    "//third_party/f2fs-tools/include",
28    "//third_party/e2fsprogs/lib/uuid",
29  ]
30  cflags = [ "-Wno-error=format-extra-args" ]
31
32  deps = [ "//third_party/e2fsprogs/lib/uuid:libext2_uuid" ]
33
34  install_enable = true
35  subsystem_name = "thirdparty"
36  part_name = "f2fs_tools"
37  install_images = [ "system" ]
38}
39
40###################################################
41##Build f2fstat
42ohos_executable("f2fstat") {
43  configs = [ ":f2fs-defaults" ]
44  sources = [ "f2fstat.c" ]
45
46  include_dirs = [ "." ]
47  cflags = [
48    "-Wno-error=format",
49    "-Wno-error=type-limits",
50    "-Wno-format-extra-args",
51  ]
52
53  deps = []
54
55  install_enable = true
56  subsystem_name = "thirdparty"
57  part_name = "f2fs_tools"
58  install_images = [ "system" ]
59}
60
61###################################################
62##Build fibmap.f2fs
63ohos_executable("fibmap.f2fs") {
64  configs = [ ":f2fs-defaults" ]
65  sources = [ "fibmap.c" ]
66
67  include_dirs = [
68    ".",
69    "//third_party/f2fs-tools",
70    "//third_party/f2fs-tools/include",
71    "//third_party/f2fs-tools/lib",
72  ]
73
74  cflags = [
75    "-Wno-error=format",
76    "-Wno-error=type-limits",
77    "-Wno-format-extra-args",
78  ]
79
80  deps = [ "//third_party/f2fs-tools/lib:libf2fs" ]
81
82  defines = [ "HAVE_CONFIG_H" ]
83
84  install_enable = true
85  subsystem_name = "thirdparty"
86  part_name = "f2fs_tools"
87  install_images = [ "system" ]
88}
89