• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15config("e2fsprogs-defaults") {
16  cflags = [ "-Wno-pointer-sign" ]
17}
18
19ohos_shared_library("libext2_misc") {
20  configs = [ ":e2fsprogs-defaults" ]
21  sources = [ "create_inode.c" ]
22  include_dirs = [
23    ".",
24    "//third_party/e2fsprogs/lib",
25  ]
26  cflags = [ "-Wno-error=format-extra-args" ]
27
28  deps = [
29    "//third_party/e2fsprogs/lib/et:libext2_com_err",
30    "//third_party/e2fsprogs/lib/ext2fs:libext2fs",
31  ]
32  install_enable = true
33  subsystem_name = "thirdparty"
34  part_name = "e2fsprogs"
35  install_images = [
36    "system",
37    "updater",
38  ]
39}
40
41###################################################
42###Build mke2fs
43ohos_executable("mke2fs") {
44  configs = [ ":e2fsprogs-defaults" ]
45  sources = [
46    "default_profile.c",
47    "mk_hugefiles.c",
48    "mke2fs.c",
49    "util.c",
50  ]
51
52  include_dirs = [
53    ".",
54    "//third_party/e2fsprogs/e2fsck",
55    "//third_party/e2fsprogs/lib",
56    "//third_party/e2fsprogs/lib/ext2fs",
57  ]
58  cflags = [
59    "-Wno-error=format",
60    "-Wno-error=type-limits",
61    "-Wno-format-extra-args",
62  ]
63
64  deps = [
65    "//third_party/e2fsprogs/lib/blkid:libext2_blkid",
66    "//third_party/e2fsprogs/lib/e2p:libext2_e2p",
67    "//third_party/e2fsprogs/lib/et:libext2_com_err",
68    "//third_party/e2fsprogs/lib/ext2fs:libext2fs",
69    "//third_party/e2fsprogs/lib/support:libext2_quota",
70    "//third_party/e2fsprogs/lib/uuid:libext2_uuid",
71    "//third_party/e2fsprogs/misc:libext2_misc",
72  ]
73
74  install_enable = true
75  subsystem_name = "thirdparty"
76  part_name = "e2fsprogs"
77  install_images = [
78    "system",
79    "updater",
80  ]
81}
82
83ohos_executable("blkid") {
84  configs = [ ":e2fsprogs-defaults" ]
85  sources = [ "blkid.c" ]
86
87  include_dirs = [
88    ".",
89    "//third_party/e2fsprogs/lib",
90    "//third_party/e2fsprogs/lib/blkid",
91  ]
92  cflags = [
93    "-Wno-error=format",
94    "-Wno-error=type-limits",
95    "-Wno-format-extra-args",
96  ]
97
98  deps = [
99    "//third_party/e2fsprogs/lib/blkid:libext2_blkid",
100    "//third_party/e2fsprogs/lib/ext2fs:libext2fs",
101  ]
102
103  install_enable = true
104  subsystem_name = "filemanagement"
105  part_name = "storage_service"
106  install_images = [
107    "system",
108    "updater",
109  ]
110  external_deps = [ "c_utils:utils" ]
111}
112