• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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 as published by
5# the Free Software Foundation, either version 2 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License along
14# with this program; if not, write to the Free Software Foundation, Inc.,
15# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16
17import("//build/ohos.gni")
18
19group("exfat-utils") {
20  deps = [
21    ":fsck.exfat",
22    ":mkfs.exfat",
23  ]
24}
25
26config("exfat-defaults") {
27  cflags = [
28    "-std=gnu99",
29    "-Wno-error",
30    "-D_FILE_OFFSET_BITS=64",
31    "-DPACKAGE=\"exfatprogs\"",
32    "-DVERSION=\"1.1.3\"",
33  ]
34  include_dirs = [
35    "dump",
36    "fsck",
37    "include",
38    "label",
39    "mkfs",
40    "tune",
41  ]
42}
43
44ohos_shared_library("libexfat") {
45  configs = [ ":exfat-defaults" ]
46  sources = [ "lib/libexfat.c" ]
47
48  include_dirs = [ "./libexfat" ]
49
50  deps = []
51  install_enable = true
52  subsystem_name = "filemanagement"
53  part_name = "storage_service"
54  install_images = [ "system" ]
55}
56
57###################################################
58##Build mkfs.exfat
59ohos_executable("mkfs.exfat") {
60  configs = [ ":exfat-defaults" ]
61  sources = [
62    "mkfs/mkfs.c",
63    "mkfs/upcase.c",
64  ]
65
66  include_dirs = [
67    "./lib",
68    "./mkfs",
69  ]
70
71  deps = [ ":libexfat" ]
72  install_enable = true
73  subsystem_name = "filemanagement"
74  part_name = "storage_service"
75  install_images = [ "system" ]
76}
77
78###################################################
79##Build fsck.exfat
80ohos_executable("fsck.exfat") {
81  configs = [ ":exfat-defaults" ]
82  sources = [
83    "fsck/de_iter.c",
84    "fsck/fsck.c",
85    "fsck/repair.c",
86  ]
87
88  include_dirs = [
89    "./lib",
90    "./mkfs",
91    "./fsck",
92  ]
93
94  deps = [ ":libexfat" ]
95  install_enable = true
96  subsystem_name = "filemanagement"
97  part_name = "storage_service"
98  install_images = [ "system" ]
99}
100
101###################################################
102##Build dump.exfat
103ohos_executable("dump.exfat") {
104  configs = [ ":exfat-defaults" ]
105  sources = [ "dump/dump.c" ]
106
107  include_dirs = [
108    "./lib",
109    "./mkfs",
110    "./fsck",
111    "./dump",
112  ]
113
114  deps = [ ":libexfat" ]
115  subsystem_name = "filemanagement"
116  part_name = "storage_service"
117}
118
119###################################################
120##Build exfatlable
121ohos_executable("exfatlable") {
122  configs = [ ":exfat-defaults" ]
123  sources = [ "label/label.c" ]
124
125  include_dirs = [
126    "./lib",
127    "./mkfs",
128    "./fsck",
129    "./label",
130  ]
131
132  deps = [ ":libexfat" ]
133  subsystem_name = "filemanagement"
134  part_name = "storage_service"
135}
136
137###################################################
138##Build tune.exfat
139ohos_executable("tune.exfat") {
140  configs = [ ":exfat-defaults" ]
141  sources = [ "tune/tune.c" ]
142
143  include_dirs = [
144    "./lib",
145    "./mkfs",
146    "./fsck",
147    "./label",
148  ]
149
150  deps = [ ":libexfat" ]
151  subsystem_name = "filemanagement"
152  part_name = "storage_service"
153}
154