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