Makefile.in revision 8fdc9985c1e2a4467630b33719b7feb281b7b33b
1# 2# Makefile for e2fsck 3# 4 5srcdir = @srcdir@ 6top_srcdir = @top_srcdir@ 7VPATH = @srcdir@ 8top_builddir = .. 9my_dir = e2fsck 10INSTALL = @INSTALL@ 11LDFLAG_STATIC = @LDFLAG_STATIC@ 12 13@MCONFIG@ 14 15PROGS= e2fsck 16MANPAGES= e2fsck.8 17XTRA_CFLAGS= -DRESOURCE_TRACK 18 19LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBUUID) 20DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(DEPLIBUUID) 21 22STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(STATIC_LIBUUID) 23STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(DEPSTATIC_LIBUUID) 24 25PROFILED_LIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) $(PROFILED_LIBUUID) 26PROFILED_DEPLIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) \ 27 $(DEPPROFILED_LIBUUID) 28 29.c.o: 30 $(CC) -c $(ALL_CFLAGS) $< -o $@ 31@PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $< 32 33# 34# Flags for using Checker 35# Note: The optimization flags must include -g 36# 37#MCHECK= -checker 38#LIBS= $(LIBCOM_ERR) $(LIB_EXT2FS) $(CHECKLIB) 39#DEPLIBS= $(LIBCOM_ERR) $(LIB_EXT2FS) 40#CHECKLIB= /usr/lib/libchecker.o 41 42# 43# Flags for doing mtrace --- uncomment to produce mtracing e2fsck 44# Note: The optimization flags must include -g 45# 46#MTRACE= -DMTRACE 47#MTRACE_OBJ= mtrace.o 48#MTRACE_SRC= $(srcdir)/mtrace.c 49#OPT= -g 50 51# 52# Flags for doing mcheck --- uncomment to produce mchecking e2fsck 53# Note: The optimization flags must include -g 54# 55#MCHECK= -DMCHECK 56 57OBJS= unix.o e2fsck.o super.o pass1.o pass1b.o pass2.o pass3.o pass4.o \ 58 pass5.o journal.o swapfs.o badblocks.o util.o dirinfo.o dx_dirinfo.o \ 59 ehandler.o problem.o message.o recovery.o region.o revoke.o \ 60 ea_refcount.o $(MTRACE_OBJ) 61 62PROFILED_OBJS= profiled/unix.o profiled/e2fsck.o profiled/super.o \ 63 profiled/pass1.o profiled/pass1b.o \ 64 profiled/pass2.o profiled/pass3.o profiled/pass4.o profiled/pass5.o \ 65 profiled/journal.o profiled/badblocks.o profiled/util.o \ 66 profiled/dirinfo.o profiled/dx_dirinfo.o profiled/ehandler.o \ 67 profiled/message.o profiled/problem.o profiled/swapfs.o \ 68 profiled/recovery.o profiled/region.o profiled/revoke.o \ 69 profiled/ea_refcount.o 70 71SRCS= $(srcdir)/e2fsck.c \ 72 $(srcdir)/super.c \ 73 $(srcdir)/pass1.c \ 74 $(srcdir)/pass1b.c \ 75 $(srcdir)/pass2.c \ 76 $(srcdir)/pass3.c \ 77 $(srcdir)/pass4.c \ 78 $(srcdir)/pass5.c \ 79 $(srcdir)/journal.c \ 80 $(srcdir)/recovery.c \ 81 $(srcdir)/revoke.c \ 82 $(srcdir)/badblocks.c \ 83 $(srcdir)/util.c \ 84 $(srcdir)/unix.c \ 85 $(srcdir)/dirinfo.c \ 86 $(srcdir)/dx_dirinfo.c \ 87 $(srcdir)/ehandler.c \ 88 $(srcdir)/problem.c \ 89 $(srcdir)/message.c \ 90 $(srcdir)/swapfs.c \ 91 $(srcdir)/ea_refcount.c \ 92 $(srcdir)/region.c \ 93 $(MTRACE_SRC) 94 95all:: profiled $(PROGS) e2fsck.static e2fsck.shared $(MANPAGES) 96 @sync 97 98@PROFILE_CMT@all:: e2fsck.profiled 99 100e2fsck: e2fsck.@E2FSCK_TYPE@ 101 $(CP) e2fsck.@E2FSCK_TYPE@ e2fsck 102 103e2fsck.static: $(OBJS) $(STATIC_DEPLIBS) 104 $(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o e2fsck.static $(OBJS) \ 105 $(STATIC_LIBS) 106 107e2fsck.shared: $(OBJS) $(DEPLIBS) 108 $(LD) $(ALL_LDFLAGS) -o e2fsck.shared $(OBJS) $(LIBS) 109 110e2fsck.profiled: $(PROFILED_OBJS) $(PROFILED_DEPLIBS) 111 $(LD) $(ALL_LDFLAGS) -g -pg -o e2fsck.profiled $(PROFILED_OBJS) \ 112 $(PROFILED_LIBS) 113 114tst_refcount: ea_refcount.c 115 $(CC) -o tst_refcount $(srcdir)/ea_refcount.c \ 116 $(ALL_CFLAGS) -DTEST_PROGRAM -lcom_err 117 118tst_region: region.c 119 $(CC) -o tst_region $(srcdir)/region.c \ 120 $(ALL_CFLAGS) -DTEST_PROGRAM -lcom_err 121 122extend: extend.o 123 $(LD) $(ALL_LDFLAGS) -o extend extend.o $(CHECKLIB) 124 125flushb: flushb.o 126 $(LD) $(ALL_LDFLAGS) -o flushb flushb.o $(CHECKLIB) 127 128iscan: iscan.o util.o ehandler.o $(DEPLIBS) 129 $(LD) $(ALL_LDFLAGS) -o iscan iscan.o util.o ehandler.o $(LIBS) 130 131profiled: 132 mkdir profiled 133 134e2fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/e2fsck.8.in 135 $(SUBSTITUTE) $(srcdir)/e2fsck.8.in e2fsck.8 136 137installdirs: 138 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(root_sbindir) \ 139 $(DESTDIR)$(man8dir) 140 141install: $(PROGS) $(MANPAGES) installdirs 142 for i in $(PROGS); do \ 143 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \ 144 $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \ 145 done 146 $(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \ 147 $(DESTDIR)$(root_sbindir)/fsck.ext2 148 $(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \ 149 $(DESTDIR)$(root_sbindir)/fsck.ext3 150 for i in $(MANPAGES); do \ 151 $(RM) -f $(DESTDIR)$(man8dir)/$$i.gz; \ 152 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \ 153 done 154 $(LN) -f $(DESTDIR)$(man8dir)/e2fsck.8 $(DESTDIR)$(man8dir)/fsck.ext2.8 155 $(LN) -f $(DESTDIR)$(man8dir)/e2fsck.8 $(DESTDIR)$(man8dir)/fsck.ext3.8 156 157uninstall: 158 for i in $(PROGS); do \ 159 $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \ 160 done 161 $(RM) -f $(DESTDIR)$(root_sbindir)/fsck.ext2 \ 162 $(DESTDIR)$(root_sbindir)/fsck.ext3 163 for i in $(MANPAGES); do \ 164 $(RM) -f $(DESTDIR)$(man8dir)/$$i; \ 165 done 166 $(RM) -f $(DESTDIR)$(root_sbindir)/fsck.ext2 \ 167 $(DESTDIR)$(root_sbindir)/fsck.ext3 168 169clean: 170 $(RM) -f $(PROGS) \#* *\# *.s *.o *.a *~ core e2fsck.static \ 171 e2fsck.shared e2fsck.profiled flushb e2fsck.8 172 $(RM) -rf profiled 173 174mostlyclean: clean 175distclean: clean 176 $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old 177 178# +++ Dependency line eater +++ 179# 180# Makefile dependencies follow. This must be the last section in 181# the Makefile.in file 182# 183e2fsck.o: $(srcdir)/e2fsck.c $(srcdir)/e2fsck.h \ 184 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 185 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 186 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 187 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h 188super.o: $(srcdir)/super.c $(top_srcdir)/lib/uuid/uuid.h $(srcdir)/e2fsck.h \ 189 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 190 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 191 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 192 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h 193pass1.o: $(srcdir)/pass1.c $(srcdir)/e2fsck.h \ 194 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 195 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 196 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 197 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h \ 198 $(srcdir)/problem.h 199pass1b.o: $(srcdir)/pass1b.c $(top_srcdir)/lib/et/com_err.h \ 200 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \ 201 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \ 202 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 203 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h 204pass2.o: $(srcdir)/pass2.c $(srcdir)/e2fsck.h \ 205 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 206 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 207 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 208 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h 209pass3.o: $(srcdir)/pass3.c $(srcdir)/e2fsck.h \ 210 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 211 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 212 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 213 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h 214pass4.o: $(srcdir)/pass4.c $(srcdir)/e2fsck.h \ 215 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 216 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 217 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 218 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h 219pass5.o: $(srcdir)/pass5.c $(srcdir)/e2fsck.h \ 220 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 221 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 222 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 223 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h 224journal.o: $(srcdir)/journal.c $(srcdir)/jfs_user.h $(srcdir)/e2fsck.h \ 225 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 226 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 227 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 228 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \ 229 $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h \ 230 $(srcdir)/problem.h $(top_srcdir)/lib/uuid/uuid.h 231recovery.o: $(srcdir)/recovery.c $(srcdir)/jfs_user.h $(srcdir)/e2fsck.h \ 232 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 233 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 234 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 235 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \ 236 $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h 237revoke.o: $(srcdir)/revoke.c $(srcdir)/jfs_user.h $(srcdir)/e2fsck.h \ 238 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 239 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 240 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 241 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \ 242 $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h 243badblocks.o: $(srcdir)/badblocks.c $(top_srcdir)/lib/et/com_err.h \ 244 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \ 245 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \ 246 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 247 $(top_srcdir)/lib/ext2fs/bitops.h 248util.o: $(srcdir)/util.c $(srcdir)/e2fsck.h \ 249 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 250 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 251 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 252 $(top_srcdir)/lib/ext2fs/bitops.h 253unix.o: $(srcdir)/unix.c $(top_srcdir)/lib/et/com_err.h $(srcdir)/e2fsck.h \ 254 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 255 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ 256 $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \ 257 $(srcdir)/problem.h $(top_srcdir)/version.h 258dirinfo.o: $(srcdir)/dirinfo.c $(srcdir)/e2fsck.h \ 259 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 260 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 261 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 262 $(top_srcdir)/lib/ext2fs/bitops.h 263ehandler.o: $(srcdir)/ehandler.c $(srcdir)/e2fsck.h \ 264 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 265 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 266 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 267 $(top_srcdir)/lib/ext2fs/bitops.h 268problem.o: $(srcdir)/problem.c $(srcdir)/e2fsck.h \ 269 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 270 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 271 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 272 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h $(srcdir)/problemP.h 273message.o: $(srcdir)/message.c $(srcdir)/e2fsck.h \ 274 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 275 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 276 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 277 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h 278swapfs.o: $(srcdir)/swapfs.c $(top_srcdir)/lib/et/com_err.h \ 279 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \ 280 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \ 281 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 282 $(top_srcdir)/lib/ext2fs/bitops.h 283ea_refcount.o: $(srcdir)/ea_refcount.c $(srcdir)/e2fsck.h \ 284 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 285 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 286 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 287 $(top_srcdir)/lib/ext2fs/bitops.h 288region.o: $(srcdir)/region.c $(srcdir)/e2fsck.h \ 289 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ 290 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \ 291 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ 292 $(top_srcdir)/lib/ext2fs/bitops.h 293