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") 15 16config("e2fsprogs-defaults") { 17 cflags = [ 18 "-Wno-sign-compare", 19 "-Wno-pointer-sign", 20 "-Wno-implicit-function-declaration", 21 "-Wno-int-conversion", 22 ] 23 defines = [ "secure_getenv=getenv" ] 24} 25 26ohos_shared_library("libext2fs") { 27 sources = [ 28 "alloc.c", 29 "alloc_sb.c", 30 "alloc_stats.c", 31 "alloc_tables.c", 32 "atexit.c", 33 "badblocks.c", 34 "bb_inode.c", 35 "bitmaps.c", 36 "bitops.c", 37 "blkmap64_ba.c", 38 "blkmap64_rb.c", 39 "blknum.c", 40 "block.c", 41 "bmap.c", 42 "check_desc.c", 43 "closefs.c", 44 "crc16.c", 45 "crc32c.c", 46 "csum.c", 47 "dblist.c", 48 "dblist_dir.c", 49 "digest_encode.c", 50 "dir_iterate.c", 51 "dirblock.c", 52 "dirhash.c", 53 "dupfs.c", 54 "expanddir.c", 55 "ext2_err.c", 56 "ext_attr.c", 57 "extent.c", 58 "fallocate.c", 59 "fileio.c", 60 "finddev.c", 61 "flushb.c", 62 "freefs.c", 63 "gen_bitmap.c", 64 "gen_bitmap64.c", 65 "get_num_dirs.c", 66 "get_pathname.c", 67 "getsectsize.c", 68 "getsize.c", 69 "hashmap.c", 70 "i_block.c", 71 "icount.c", 72 "imager.c", 73 "ind_block.c", 74 "initialize.c", 75 "inline.c", 76 "inline_data.c", 77 "inode.c", 78 "io_manager.c", 79 "ismounted.c", 80 "link.c", 81 "llseek.c", 82 "lookup.c", 83 "mkdir.c", 84 "mkjournal.c", 85 "mmp.c", 86 "namei.c", 87 "native.c", 88 "newdir.c", 89 "nls_utf8.c", 90 "openfs.c", 91 "progress.c", 92 "punch.c", 93 "qcow2.c", 94 "rbtree.c", 95 "read_bb.c", 96 "read_bb_file.c", 97 "res_gdt.c", 98 "rw_bitmaps.c", 99 "sha256.c", 100 "sha512.c", 101 "sparse_io.c", 102 "swapfs.c", 103 "symlink.c", 104 "test_io.c", 105 "undo_io.c", 106 "unix_io.c", 107 "unlink.c", 108 "valid_blk.c", 109 "version.c", 110 ] 111 configs = [ ":e2fsprogs-defaults" ] 112 113 deps = [ "//third_party/e2fsprogs/lib/et:libext2_com_err" ] 114 115 cflags = [ "-Wno-unused-parameter" ] 116 include_dirs = [ 117 ".", 118 "//third_party/e2fsprogs/lib", 119 ] 120 install_enable = true 121 subsystem_name = "thirdparty" 122 part_name = "e2fsprogs" 123 install_images = [ 124 "system", 125 "updater", 126 ] 127} 128