1 // Copyright 2017 The Android Open Source Project 2 3 // Library used to export files from this directory to other programs in this 4 // project. 5 cc_library { 6 name: "libext2_misc", 7 host_supported: true, 8 9 srcs: [ 10 "create_inode.c", 11 ], 12 cflags: ["-W", "-Wall", "-Wno-macro-redefined"], 13 shared_libs: [ 14 "libext2_quota", 15 "libext2fs", 16 ], 17 system_shared_libs: ["libc"], 18 export_include_dirs: ["."], 19 } 20 21 //######################################################################## 22 // Build mke2fs 23 24 cc_binary { 25 name: "mke2fs", 26 host_supported: true, 27 28 srcs: [ 29 "mke2fs.c", 30 "util.c", 31 "mk_hugefiles.c", 32 "default_profile.c", 33 "create_inode.c", 34 ], 35 cflags: ["-W", "-Wall", "-Wno-macro-redefined"], 36 shared_libs: [ 37 "libext2fs", 38 "libext2_blkid", 39 "libext2_uuid", 40 "libext2_quota", 41 "libext2_com_err", 42 "libext2_e2p", 43 ], 44 system_shared_libs: ["libc"], 45 include_dirs: ["external/e2fsprogs/e2fsck"], 46 } 47 48 //########################################################################## 49 // Build tune2fs 50 51 cc_defaults { 52 name: "tune2fs-defaults", 53 srcs: [ 54 "tune2fs.c", 55 "util.c", 56 ], 57 cflags: [ 58 "-W", 59 "-Wall", 60 "-DNO_RECOVERY", 61 "-Wno-macro-redefined", 62 ], 63 include_dirs: ["external/e2fsprogs/e2fsck"], 64 } 65 66 tune2fs_libs = [ 67 "libext2_com_err", 68 "libext2_blkid", 69 "libext2_quota", 70 "libext2_uuid", 71 "libext2_e2p", 72 "libext2fs", 73 ] 74 75 cc_binary { 76 name: "tune2fs", 77 host_supported: true, 78 defaults: ["tune2fs-defaults"], 79 80 shared_libs: tune2fs_libs, 81 system_shared_libs: ["libc"], 82 } 83 84 cc_binary { 85 name: "tune2fs_static", 86 static_executable: true, 87 defaults: ["tune2fs-defaults"], 88 89 static_libs: tune2fs_libs, 90 } 91 92 cc_library_static { 93 name: "libtune2fs", 94 defaults: ["tune2fs-defaults"], 95 96 cflags: ["-DBUILD_AS_LIB"], 97 static_libs: tune2fs_libs, 98 } 99 100 //######################################################################## 101 // Build badblocks 102 103 cc_binary { 104 name: "badblocks", 105 host_supported: true, 106 107 srcs: ["badblocks.c"], 108 cflags: ["-W", "-Wall", "-Wno-macro-redefined"], 109 shared_libs: [ 110 "libext2fs", 111 "libext2_com_err", 112 "libext2_uuid", 113 "libext2_blkid", 114 "libext2_e2p", 115 ], 116 system_shared_libs: ["libc"], 117 } 118 119 //######################################################################## 120 // Build chattr 121 122 cc_binary { 123 name: "chattr", 124 host_supported: true, 125 126 srcs: ["chattr.c"], 127 cflags: ["-W", "-Wall", "-Wno-macro-redefined"], 128 shared_libs: [ 129 "libext2_com_err", 130 "libext2_e2p", 131 ], 132 system_shared_libs: ["libc"], 133 } 134 135 //######################################################################## 136 // Build lsattr 137 138 cc_defaults { 139 name: "lsattr-defaults", 140 srcs: ["lsattr.c"], 141 cflags: ["-W", "-Wall", "-Wno-macro-redefined"], 142 } 143 144 lsattr_libs = [ 145 "libext2_com_err", 146 "libext2_e2p", 147 ] 148 149 cc_binary { 150 name: "lsattr", 151 host_supported: true, 152 defaults: ["lsattr-defaults"], 153 154 shared_libs: lsattr_libs, 155 system_shared_libs: ["libc"], 156 } 157 158 cc_binary { 159 name: "lsattr_static", 160 static_executable: true, 161 defaults: ["lsattr-defaults"], 162 163 static_libs: lsattr_libs, 164 } 165 166 //######################################################################## 167 // Build blkid 168 169 cc_binary { 170 name: "blkid", 171 172 srcs: ["blkid.c"], 173 cflags: ["-W", "-Wall", "-Wno-macro-redefined"], 174 shared_libs: [ 175 "libext2fs", 176 "libext2_blkid", 177 "libext2_com_err", 178 "libext2_e2p", 179 ], 180 system_shared_libs: ["libc"], 181 } 182 183 //######################################################################## 184 // Build e4crypt 185 186 cc_binary { 187 name: "e4crypt", 188 host_supported: true, 189 190 srcs: ["e4crypt.c"], 191 cflags: ["-W", "-Wall", "-Wno-macro-redefined"], 192 shared_libs: [ 193 "libext2fs", 194 "libext2_uuid", 195 ], 196 system_shared_libs: ["libc"], 197 198 target: { 199 darwin: { 200 enabled: false, 201 }, 202 }, 203 } 204 205 //########################################################################## 206 // Build e2image 207 208 cc_binary { 209 name: "e2image", 210 host_supported: true, 211 212 srcs: ["e2image.c"], 213 cflags: ["-W", "-Wall", "-Wno-macro-redefined"], 214 shared_libs: [ 215 "libext2fs", 216 "libext2_blkid", 217 "libext2_com_err", 218 "libext2_quota", 219 ], 220 system_shared_libs: ["libc"], 221 } 222