Whamcloud - gitweb
ChangeLog, dir_iterate.c:
[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) $(LIBUUID)
21
22 STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(STATIC_LIBUUID)
23 STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(STATIC_LIBUUID)
24
25 PROFILED_LIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) $(PROFILED_LIBUUID)
26 PROFILED_DEPLIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) $(PROFILED_LIBUUID)
27
28 .c.o:
29         $(CC) -c $(ALL_CFLAGS) $< -o $@
30 @PROFILE_CMT@   $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
31
32 #
33 # Flags for using Checker
34 #       Note: The optimization flags must include -g
35 #
36 #MCHECK=        -checker
37 #LIBS= $(LIBCOM_ERR) $(LIB_EXT2FS) $(CHECKLIB)
38 #DEPLIBS= $(LIBCOM_ERR) $(LIB_EXT2FS) 
39 #CHECKLIB= /usr/lib/libchecker.o
40
41 #
42 # Flags for doing mtrace --- uncomment to produce mtracing e2fsck
43 #       Note:  The optimization flags must include -g
44 #
45 #MTRACE=        -DMTRACE
46 #MTRACE_OBJ= mtrace.o
47 #MTRACE_SRC= $(srcdir)/mtrace.c
48 #OPT= -g
49
50 #
51 # Flags for doing mcheck --- uncomment to produce mchecking e2fsck
52 #       Note:  The optimization flags must include -g
53 #
54 #MCHECK= -DMCHECK
55
56 OBJS= unix.o e2fsck.o super.o pass1.o pass1b.o pass2.o pass3.o pass4.o \
57         pass5.o swapfs.o badblocks.o util.o dirinfo.o ehandler.o \
58         problem.o message.o $(MTRACE_OBJ)
59
60 PROFILED_OBJS= profiled/unix.o profiled/e2fsck.o profiled/super.o \
61         profiled/pass1.o profiled/pass1b.o \
62         profiled/pass2.o profiled/pass3.o profiled/pass4.o profiled/pass5.o \
63         profiled/badblocks.o profiled/util.o profiled/dirinfo.o \
64         profiled/ehandler.o profiled/message.o profiled/problem.o \
65         profiled/swapfs.o
66
67 SRCS= $(srcdir)/e2fsck.c \
68         $(srcdir)/super.c \
69         $(srcdir)/pass1.c \
70         $(srcdir)/pass1b.c \
71         $(srcdir)/pass2.c \
72         $(srcdir)/pass3.c \
73         $(srcdir)/pass4.c \
74         $(srcdir)/pass5.c \
75         $(srcdir)/badblocks.c \
76         $(srcdir)/util.c \
77         $(srcdir)/unix.c \
78         $(srcdir)/dirinfo.c \
79         $(srcdir)/ehandler.c \
80         $(srcdir)/problem.c \
81         $(MTRACE_SRC)
82
83 all:: profiled $(PROGS) e2fsck.static e2fsck.shared $(MANPAGES)
84
85 @PROFILE_CMT@all:: e2fsck.profiled
86
87 e2fsck: e2fsck.@E2FSCK_TYPE@
88         $(CP) e2fsck.@E2FSCK_TYPE@ e2fsck
89
90 e2fsck.static: $(OBJS)  $(STATIC_DEPLIBS)
91         $(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o e2fsck.static $(OBJS) \
92                 $(STATIC_LIBS) 
93
94 e2fsck.shared: $(OBJS)  $(DEPLIBS)
95         $(LD) $(ALL_LDFLAGS) -o e2fsck.shared $(OBJS) $(LIBS) 
96
97 e2fsck.profiled: $(PROFILED_OBJS)  $(PROFILED_DEPLIBS)
98         $(LD) $(ALL_LDFLAGS) -g -pg -o e2fsck.profiled $(PROFILED_OBJS) \
99                 $(PROFILED_LIBS) 
100
101 extend: extend.o
102         $(LD) $(ALL_LDFLAGS) -o extend extend.o $(CHECKLIB)
103
104 flushb: flushb.o
105         $(LD) $(ALL_LDFLAGS) -o flushb flushb.o $(CHECKLIB)
106
107 iscan: iscan.o util.o
108         $(LD) $(ALL_LDFLAGS) -o iscan iscan.o util.o ehandler.o $(LIBS)
109
110 profiled:
111         mkdir profiled
112
113 e2fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/e2fsck.8.in
114         $(SUBSTITUTE) $(srcdir)/e2fsck.8.in e2fsck.8
115
116 installdirs:
117         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(root_sbindir) \
118                 $(DESTDIR)$(man8dir)
119
120 install: $(PROGS) $(MANPAGES) installdirs
121         for i in $(PROGS); do \
122                 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
123                 $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
124         done
125         $(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \
126                         $(DESTDIR)$(root_sbindir)/fsck.ext2
127         for i in $(MANPAGES); do \
128                 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
129         done
130
131 uninstall:
132         for i in $(PROGS); do \
133                 $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
134         done
135         $(RM) -f $(DESTDIR)$(root_sbindir)/fsck.ext2
136         for i in $(MANPAGES); do \
137                 $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
138         done
139
140 clean:
141         $(RM) -f $(PROGS) \#* *\# *.s *.o *.a *~ core e2fsck.static \
142                 e2fsck.shared e2fsck.profiled e2fsck.8
143         $(RM) -rf profiled
144
145 mostlyclean: clean
146 distclean: clean
147         $(RM) -f .depend Makefile
148
149 # +++ Dependency line eater +++
150
151 # Makefile dependencies follow.  This must be the last section in
152 # the Makefile.in file
153 #
154 e2fsck.o: $(srcdir)/e2fsck.c $(srcdir)/e2fsck.h \
155  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
156  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
157  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
158 super.o: $(srcdir)/super.c $(top_srcdir)/lib/uuid/uuid.h $(srcdir)/e2fsck.h \
159  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
160  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
161  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
162 pass1.o: $(srcdir)/pass1.c $(srcdir)/e2fsck.h \
163  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
164  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
165  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
166 pass1b.o: $(srcdir)/pass1b.c $(top_srcdir)/lib/et/com_err.h \
167  $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.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
170 pass2.o: $(srcdir)/pass2.c $(srcdir)/e2fsck.h \
171  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
172  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
173  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
174 pass3.o: $(srcdir)/pass3.c $(srcdir)/e2fsck.h \
175  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
176  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
177  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
178 pass4.o: $(srcdir)/pass4.c $(srcdir)/e2fsck.h \
179  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
180  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
181  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
182 pass5.o: $(srcdir)/pass5.c $(srcdir)/e2fsck.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 badblocks.o: $(srcdir)/badblocks.c $(top_srcdir)/lib/et/com_err.h \
187  $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
188  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
189  $(top_srcdir)/lib/ext2fs/bitops.h
190 util.o: $(srcdir)/util.c $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
191  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
192  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h
193 unix.o: $(srcdir)/unix.c $(top_srcdir)/lib/et/com_err.h $(srcdir)/e2fsck.h \
194  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
195  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
196  $(srcdir)/problem.h $(srcdir)/../version.h
197 dirinfo.o: $(srcdir)/dirinfo.c $(srcdir)/e2fsck.h \
198  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
199  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
200  $(top_srcdir)/lib/ext2fs/bitops.h
201 ehandler.o: $(srcdir)/ehandler.c $(srcdir)/e2fsck.h \
202  $(top_srcdir)/lib/ext2fs/ext2fs.h \
203  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
204  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h 
205 problem.o: $(srcdir)/problem.c $(srcdir)/e2fsck.h \
206  $(top_srcdir)/lib/ext2fs/ext2fs.h \
207  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
208  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
209  $(srcdir)/problem.h $(srcdir)/problemP.h