Makefile.in revision 16f095ee6e0f82490fedca01e1be729bd22a7efb
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 ehandler.o \
59	problem.o message.o recovery.o revoke.o $(MTRACE_OBJ)
60
61PROFILED_OBJS= profiled/unix.o profiled/e2fsck.o profiled/super.o \
62	profiled/pass1.o profiled/pass1b.o \
63	profiled/pass2.o profiled/pass3.o profiled/pass4.o profiled/pass5.o \
64	profiled/journal.o profiled/badblocks.o profiled/util.o \
65	profiled/dirinfo.o profiled/ehandler.o profiled/message.o \
66	profiled/problem.o profiled/swapfs.o profiled/recovery.o \
67	profiled/revoke.o
68
69SRCS= $(srcdir)/e2fsck.c \
70	$(srcdir)/super.c \
71	$(srcdir)/pass1.c \
72	$(srcdir)/pass1b.c \
73	$(srcdir)/pass2.c \
74	$(srcdir)/pass3.c \
75	$(srcdir)/pass4.c \
76	$(srcdir)/pass5.c \
77	$(srcdir)/journal.c \
78	$(srcdir)/recovery.c \
79	$(srcdir)/revoke.c \
80	$(srcdir)/badblocks.c \
81	$(srcdir)/util.c \
82	$(srcdir)/unix.c \
83	$(srcdir)/dirinfo.c \
84	$(srcdir)/ehandler.c \
85	$(srcdir)/problem.c \
86	$(srcdir)/message.c \
87	$(srcdir)/swapfs.c \
88	$(MTRACE_SRC)
89
90all:: profiled $(PROGS) e2fsck.static e2fsck.shared $(MANPAGES)
91	@sync
92
93@PROFILE_CMT@all:: e2fsck.profiled
94
95e2fsck: e2fsck.@E2FSCK_TYPE@
96	$(CP) e2fsck.@E2FSCK_TYPE@ e2fsck
97
98e2fsck.static: $(OBJS)  $(STATIC_DEPLIBS)
99	$(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o e2fsck.static $(OBJS) \
100		$(STATIC_LIBS) 
101
102e2fsck.shared: $(OBJS)  $(DEPLIBS)
103	$(LD) $(ALL_LDFLAGS) -o e2fsck.shared $(OBJS) $(LIBS) 
104
105e2fsck.profiled: $(PROFILED_OBJS)  $(PROFILED_DEPLIBS)
106	$(LD) $(ALL_LDFLAGS) -g -pg -o e2fsck.profiled $(PROFILED_OBJS) \
107		$(PROFILED_LIBS) 
108
109extend: extend.o
110	$(LD) $(ALL_LDFLAGS) -o extend extend.o $(CHECKLIB)
111
112flushb: flushb.o
113	$(LD) $(ALL_LDFLAGS) -o flushb flushb.o $(CHECKLIB)
114
115iscan: iscan.o util.o
116	$(LD) $(ALL_LDFLAGS) -o iscan iscan.o util.o ehandler.o $(LIBS)
117
118profiled:
119	mkdir profiled
120
121e2fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/e2fsck.8.in
122	$(SUBSTITUTE) $(srcdir)/e2fsck.8.in e2fsck.8
123
124installdirs:
125	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(root_sbindir) \
126		$(DESTDIR)$(man8dir)
127
128install: $(PROGS) $(MANPAGES) installdirs
129	for i in $(PROGS); do \
130		$(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
131		$(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
132	done
133	$(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \
134			$(DESTDIR)$(root_sbindir)/fsck.ext2
135	$(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \
136			$(DESTDIR)$(root_sbindir)/fsck.ext3
137	for i in $(MANPAGES); do \
138		$(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
139	done
140
141uninstall:
142	for i in $(PROGS); do \
143		$(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
144	done
145	$(RM) -f $(DESTDIR)$(root_sbindir)/fsck.ext2 \
146		$(DESTDIR)$(root_sbindir)/fsck.ext3
147	for i in $(MANPAGES); do \
148		$(RM) -f $(DESTDIR)$(man8dir)/$$i; \
149	done
150
151clean:
152	$(RM) -f $(PROGS) \#* *\# *.s *.o *.a *~ core e2fsck.static \
153		e2fsck.shared e2fsck.profiled flushb e2fsck.8
154	$(RM) -rf profiled
155
156mostlyclean: clean
157distclean: clean
158	$(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
159
160# +++ Dependency line eater +++
161# 
162# Makefile dependencies follow.  This must be the last section in
163# the Makefile.in file
164#
165e2fsck.o: $(srcdir)/e2fsck.c $(srcdir)/e2fsck.h \
166 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
167 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
168 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
169 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
170super.o: $(srcdir)/super.c $(top_srcdir)/lib/uuid/uuid.h $(srcdir)/e2fsck.h \
171 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
172 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
173 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
174 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
175pass1.o: $(srcdir)/pass1.c $(srcdir)/e2fsck.h \
176 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
177 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
178 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
179 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
180pass1b.o: $(srcdir)/pass1b.c $(top_srcdir)/lib/et/com_err.h \
181 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
182 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
183 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
184 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
185pass2.o: $(srcdir)/pass2.c $(srcdir)/e2fsck.h \
186 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
187 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
188 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
189 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
190pass3.o: $(srcdir)/pass3.c $(srcdir)/e2fsck.h \
191 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
192 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
193 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
194 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
195pass4.o: $(srcdir)/pass4.c $(srcdir)/e2fsck.h \
196 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
197 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
198 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
199 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
200pass5.o: $(srcdir)/pass5.c $(srcdir)/e2fsck.h \
201 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
202 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
203 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
204 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
205journal.o: $(srcdir)/journal.c $(srcdir)/jfs_user.h $(srcdir)/e2fsck.h \
206 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
207 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
208 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
209 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/include/linux/jfs.h \
210 $(top_srcdir)/include/linux/jfs_compat.h $(top_srcdir)/include/linux/list.h \
211 $(srcdir)/problem.h $(top_srcdir)/lib/uuid/uuid.h
212recovery.o: $(srcdir)/recovery.c $(srcdir)/jfs_user.h $(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 $(top_srcdir)/include/linux/jfs.h \
217 $(top_srcdir)/include/linux/jfs_compat.h $(top_srcdir)/include/linux/list.h
218revoke.o: $(srcdir)/revoke.c $(srcdir)/jfs_user.h $(srcdir)/e2fsck.h \
219 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
220 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
221 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
222 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/include/linux/jfs.h \
223 $(top_srcdir)/include/linux/jfs_compat.h $(top_srcdir)/include/linux/list.h
224badblocks.o: $(srcdir)/badblocks.c $(top_srcdir)/lib/et/com_err.h \
225 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
226 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
227 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
228 $(top_srcdir)/lib/ext2fs/bitops.h
229util.o: $(srcdir)/util.c $(srcdir)/e2fsck.h \
230 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
231 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
232 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
233 $(top_srcdir)/lib/ext2fs/bitops.h
234unix.o: $(srcdir)/unix.c $(top_srcdir)/lib/et/com_err.h $(srcdir)/e2fsck.h \
235 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
236 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
237 $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
238 $(srcdir)/problem.h $(top_srcdir)/version.h
239dirinfo.o: $(srcdir)/dirinfo.c $(srcdir)/e2fsck.h \
240 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
241 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
242 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
243 $(top_srcdir)/lib/ext2fs/bitops.h
244ehandler.o: $(srcdir)/ehandler.c $(srcdir)/e2fsck.h \
245 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
246 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
247 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
248 $(top_srcdir)/lib/ext2fs/bitops.h
249problem.o: $(srcdir)/problem.c $(srcdir)/e2fsck.h \
250 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
251 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
252 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
253 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h $(srcdir)/problemP.h
254message.o: $(srcdir)/message.c $(srcdir)/e2fsck.h \
255 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
256 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
257 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
258 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
259swapfs.o: $(srcdir)/swapfs.c $(top_srcdir)/lib/et/com_err.h \
260 $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
261 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
262 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
263 $(top_srcdir)/lib/ext2fs/bitops.h
264