6 top_srcdir = @top_srcdir@
11 LDFLAG_STATIC = @LDFLAG_STATIC@
15 PROGS= e2fsck @EXTRA_PROGS@
18 LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBUUID)
19 DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBUUID)
21 STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(STATIC_LIBUUID)
22 STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(STATIC_LIBUUID)
24 PROFILED_LIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) $(PROFILED_LIBUUID)
25 PROFILED_DEPLIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) $(PROFILED_LIBUUID)
28 $(CC) -c $(ALL_CFLAGS) $< -o $@
29 @PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
32 # Flags for using Checker
33 # Note: The optimization flags must include -g
36 #LIBS= $(LIBCOM_ERR) $(LIB_EXT2FS) $(CHECKLIB)
37 #DEPLIBS= $(LIBCOM_ERR) $(LIB_EXT2FS)
38 #CHECKLIB= /usr/lib/libchecker.o
41 # Flags for doing mtrace --- uncomment to produce mtracing e2fsck
42 # Note: The optimization flags must include -g
46 #MTRACE_SRC= $(srcdir)/mtrace.c
50 # Flags for doing mcheck --- uncomment to produce mchecking e2fsck
51 # Note: The optimization flags must include -g
55 OBJS= e2fsck.o pass1.o pass1b.o pass2.o pass3.o pass4.o pass5.o \
56 swapfs.o badblocks.o util.o dirinfo.o ehandler.o problem.o message.o \
59 PROFILED_OBJS= profiled/e2fsck.o profiled/pass1.o profiled/pass1b.o \
60 profiled/pass2.o profiled/pass3.o profiled/pass4.o profiled/pass5.o \
61 profiled/badblocks.o profiled/util.o profiled/dirinfo.o \
62 profiled/ehandler.o profiled/message.o profiled/problem.o \
65 SRCS= $(srcdir)/e2fsck.c \
72 $(srcdir)/badblocks.c \
75 $(srcdir)/ehandler.c \
79 all:: profiled $(PROGS) e2fsck.static e2fsck.shared $(MANPAGES)
81 @PROFILE_CMT@all:: e2fsck.profiled
83 e2fsck: e2fsck.@E2FSCK_TYPE@
84 $(CP) e2fsck.@E2FSCK_TYPE@ e2fsck
86 e2fsck.static: $(OBJS) $(STATIC_DEPLIBS)
87 $(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o e2fsck.static $(OBJS) \
90 e2fsck.shared: $(OBJS) $(DEPLIBS)
91 $(LD) $(ALL_LDFLAGS) -o e2fsck.shared $(OBJS) $(LIBS)
93 e2fsck.profiled: $(PROFILED_OBJS) $(PROFILED_DEPLIBS)
94 $(LD) $(ALL_LDFLAGS) -g -pg -o e2fsck.profiled $(PROFILED_OBJS) \
98 $(LD) $(ALL_LDFLAGS) -o extend extend.o $(CHECKLIB)
101 $(LD) $(ALL_LDFLAGS) -o flushb flushb.o $(CHECKLIB)
103 iscan: iscan.o util.o
104 $(LD) $(ALL_LDFLAGS) -o iscan iscan.o util.o ehandler.o $(LIBS)
109 e2fsck.8: $(SUBSTITUTE) $(srcdir)/e2fsck.8.in
110 -$(CHMOD) +x $(SUBSTITUTE)
111 $(SUBSTITUTE) $(srcdir)/e2fsck.8.in e2fsck.8
114 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir) \
117 install: $(PROGS) $(MANPAGES) installdirs
118 for i in $(PROGS); do \
119 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \
120 $(STRIP) $(DESTDIR)$(sbindir)/$$i; \
122 $(LN) -f $(DESTDIR)$(sbindir)/e2fsck $(DESTDIR)$(sbindir)/fsck.ext2
123 for i in $(MANPAGES); do \
124 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
128 for i in $(PROGS); do \
129 $(RM) -f $(sbindir)/$$i; \
131 $(RM) -f $(sbindir)/fsck.ext2
132 for i in $(MANPAGES); do \
133 $(RM) -f $(man8dir)/$$i; \
137 $(RM) -f $(PROGS) \#* *\# *.s *.o *.a *~ core e2fsck.static \
138 e2fsck.shared e2fsck.profiled e2fsck.8
143 $(RM) -f .depend Makefile
145 # +++ Dependency line eater +++
147 # Makefile dependencies follow. This must be the last section in
148 # the Makefile.in file
150 e2fsck.o: $(srcdir)/e2fsck.c $(top_srcdir)/lib/et/com_err.h \
151 $(top_srcdir)/lib/uuid/uuid.h $(srcdir)/e2fsck.h \
152 $(top_srcdir)/lib/ext2fs/ext2fs.h \
153 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
154 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h \
155 $(srcdir)/../version.h
156 pass1.o: $(srcdir)/pass1.c $(top_srcdir)/lib/et/com_err.h \
157 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
158 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
159 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
160 pass1b.o: $(srcdir)/pass1b.c $(top_srcdir)/lib/et/com_err.h \
161 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
162 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
163 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
164 pass2.o: $(srcdir)/pass2.c $(top_srcdir)/lib/et/com_err.h $(srcdir)/e2fsck.h \
165 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/io.h \
166 $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
168 pass3.o: $(srcdir)/pass3.c $(top_srcdir)/lib/et/com_err.h \
169 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
170 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
171 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
172 pass4.o: $(srcdir)/pass4.c $(srcdir)/e2fsck.h \
173 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
174 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
175 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
176 pass5.o: $(srcdir)/pass5.c $(top_srcdir)/lib/et/com_err.h \
177 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
178 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
179 $(top_srcdir)/lib/ext2fs/bitops.h
180 badblocks.o: $(srcdir)/badblocks.c $(top_srcdir)/lib/et/com_err.h \
181 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
182 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
183 $(top_srcdir)/lib/ext2fs/bitops.h
184 util.o: $(srcdir)/util.c $(srcdir)/e2fsck.h \
185 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
186 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
187 $(top_srcdir)/lib/ext2fs/bitops.h
188 dirinfo.o: $(srcdir)/dirinfo.c $(top_srcdir)/lib/et/com_err.h \
189 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
190 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
191 $(top_srcdir)/lib/ext2fs/bitops.h
192 ehandler.o: $(srcdir)/ehandler.c $(srcdir)/e2fsck.h \
193 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
194 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
195 $(top_srcdir)/lib/ext2fs/bitops.h
196 problem.o: $(srcdir)/problem.c $(srcdir)/e2fsck.h \
197 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
198 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
199 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h