• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Huawei Device Co., Ltd.
2# Redistribution and use in source and binary forms, with or without
3# modification, are permitted provided that the following conditions
4# are met:
5# 1. Redistributions of source code must retain the above copyright
6#    notice, this list of conditions and the following disclaimer.
7# 2. Redistributions in binary form must reproduce the above copyright
8#    notice, this list of conditions and the following disclaimer in the
9#    documentation and/or other materials provided with the distribution.
10#
11# THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
12# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
13# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
14# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
15# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21
22import("//build/ohos.gni")
23config("vfat-defaults") {
24  cflags = [
25    "-O2",
26    "-g",
27    "-Wall",
28    "-Werror",
29    "-D_BSD_SOURCE",
30    "-D_LARGEFILE_SOURCE",
31    "-D_FILE_OFFSET_BITS=64",
32    "-DELFTC_NEED_BYTEORDER_EXTENSIONS",
33    "-Wno-unused-variable",
34    "-Wno-unused-const-variable",
35    "-Wno-format",
36    "-Wno-sign-compare",
37    "-Wno-implicit-function-declaration",
38    "-Wno-return-type",
39    "-Wno-implicit-int",
40  ]
41  include_dirs = []
42}
43
44###################################################
45##Build fsck_msdos
46ohos_executable("fsck_msdos") {
47  configs = [ ":vfat-defaults" ]
48  sources = [
49    "boot.c",
50    "check.c",
51    "dir.c",
52    "fat.c",
53    "main.c",
54  ]
55
56  include_dirs = [
57    ".",
58    "//third_party/FreeBSD/sys",
59  ]
60
61  deps = []
62  install_enable = true
63  subsystem_name = "filemanagement"
64  part_name = "storage_service"
65  install_images = [ "system" ]
66}
67