# Copyright (c) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") config("e2fsprogs-defaults") { cflags = [ "-Wno-sign-compare", "-Wno-pointer-sign", "-Wno-implicit-function-declaration", "-Wno-int-conversion", ] defines = [ "secure_getenv=getenv" ] } ohos_shared_library("libext2fs") { sources = [ "alloc.c", "alloc_sb.c", "alloc_stats.c", "alloc_tables.c", "atexit.c", "badblocks.c", "bb_inode.c", "bitmaps.c", "bitops.c", "blkmap64_ba.c", "blkmap64_rb.c", "blknum.c", "block.c", "bmap.c", "check_desc.c", "closefs.c", "crc16.c", "crc32c.c", "csum.c", "dblist.c", "dblist_dir.c", "digest_encode.c", "dir_iterate.c", "dirblock.c", "dirhash.c", "dupfs.c", "expanddir.c", "ext2_err.c", "ext_attr.c", "extent.c", "fallocate.c", "fileio.c", "finddev.c", "flushb.c", "freefs.c", "gen_bitmap.c", "gen_bitmap64.c", "get_num_dirs.c", "get_pathname.c", "getsectsize.c", "getsize.c", "hashmap.c", "i_block.c", "icount.c", "imager.c", "ind_block.c", "initialize.c", "inline.c", "inline_data.c", "inode.c", "io_manager.c", "ismounted.c", "link.c", "llseek.c", "lookup.c", "mkdir.c", "mkjournal.c", "mmp.c", "namei.c", "native.c", "newdir.c", "nls_utf8.c", "openfs.c", "progress.c", "punch.c", "qcow2.c", "rbtree.c", "read_bb.c", "read_bb_file.c", "res_gdt.c", "rw_bitmaps.c", "sha256.c", "sha512.c", "sparse_io.c", "swapfs.c", "symlink.c", "test_io.c", "undo_io.c", "unix_io.c", "unlink.c", "valid_blk.c", "version.c", ] configs = [ ":e2fsprogs-defaults" ] deps = [ "//third_party/e2fsprogs/lib/et:libext2_com_err" ] cflags = [ "-Wno-unused-parameter" ] include_dirs = [ ".", "//third_party/e2fsprogs/lib", ] install_enable = true subsystem_name = "thirdparty" part_name = "e2fsprogs" install_images = [ "system", "updater", ] }