• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2017 The Android Open Source Project
2
3package {
4    // See: http://go/android-license-faq
5    // A large-scale-change added 'default_applicable_licenses' to import
6    // all of the 'license_kinds' from "external_e2fsprogs_license"
7    // to get the below license kinds:
8    //   SPDX-license-identifier-GPL
9    //   SPDX-license-identifier-GPL-2.0
10    //   SPDX-license-identifier-LGPL
11    //   SPDX-license-identifier-LGPL-2.1
12    //   SPDX-license-identifier-LGPL-3.0
13    //   legacy_unencumbered
14    default_applicable_licenses: ["external_e2fsprogs_license"],
15}
16
17cc_library {
18    name: "libext2fs",
19    host_supported: true,
20    ramdisk_available: true,
21    vendor_ramdisk_available: true,
22    recovery_available: true,
23    unique_host_soname: true,
24    defaults: ["e2fsprogs-defaults"],
25    srcs: [
26        "ext2_err.c",
27        "alloc.c",
28        "alloc_sb.c",
29        "alloc_stats.c",
30        "alloc_tables.c",
31        "atexit.c",
32        "badblocks.c",
33        "bb_inode.c",
34        "bitmaps.c",
35        "bitops.c",
36        "blkmap64_ba.c",
37        "blkmap64_rb.c",
38        "blknum.c",
39        "block.c",
40        "bmap.c",
41        "check_desc.c",
42        "crc16.c",
43        "crc32c.c",
44        "csum.c",
45        "closefs.c",
46        "dblist.c",
47        "dblist_dir.c",
48        "digest_encode.c",
49        "dirblock.c",
50        "dirhash.c",
51        "dir_iterate.c",
52        "dupfs.c",
53        "expanddir.c",
54        "ext_attr.c",
55        "extent.c",
56        "fallocate.c",
57        "fileio.c",
58        "finddev.c",
59        "flushb.c",
60        "freefs.c",
61        "gen_bitmap.c",
62        "gen_bitmap64.c",
63        "get_num_dirs.c",
64        "get_pathname.c",
65        "getsize.c",
66        "getsectsize.c",
67        "hashmap.c",
68        "i_block.c",
69        "icount.c",
70        "imager.c",
71        "ind_block.c",
72        "initialize.c",
73        "inline.c",
74        "inline_data.c",
75        "inode.c",
76        "io_manager.c",
77        "ismounted.c",
78        "link.c",
79        "llseek.c",
80        "lookup.c",
81        "mmp.c",
82        "mkdir.c",
83        "mkjournal.c",
84        "namei.c",
85        "native.c",
86        "newdir.c",
87        "nls_utf8.c",
88        "openfs.c",
89        "progress.c",
90        "punch.c",
91        "qcow2.c",
92        "rbtree.c",
93        "read_bb.c",
94        "read_bb_file.c",
95        "res_gdt.c",
96        "rw_bitmaps.c",
97        "sha256.c",
98        "sha512.c",
99        "swapfs.c",
100        "symlink.c",
101        "undo_io.c",
102        "unix_io.c",
103        "sparse_io.c",
104        "unlink.c",
105        "valid_blk.c",
106        "version.c",
107        // get rid of this?!
108        "test_io.c",
109    ],
110    shared_libs: [
111        "libext2_com_err",
112        "libsparse",
113        "libz",
114    ],
115    cflags: ["-Wno-unused-parameter"],
116    target: {
117        android: {
118            shared_libs: [ "libext2_uuid" ],
119        },
120        windows: {
121            enabled: true,
122            include_dirs: [ "external/e2fsprogs/include/mingw" ],
123            cflags: [
124                "-Wno-error=cpp",
125                "-Wno-format",
126                "-Wno-unused-variable",
127            ],
128            clang_cflags: [
129                "-Wno-error=typedef-redefinition",
130            ],
131            host_ldlibs: ["-lws2_32"],
132        },
133    },
134
135    header_libs: ["libext2-headers"],
136    export_include_dirs: ["."],
137    export_header_lib_headers: ["libext2-headers"],
138}
139