Whamcloud - gitweb
TODO:
[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 swapfs.o badblocks.o util.o dirinfo.o ehandler.o \
59         problem.o message.o $(MTRACE_OBJ)
60
61 PROFILED_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/badblocks.o profiled/util.o profiled/dirinfo.o \
65         profiled/ehandler.o profiled/message.o profiled/problem.o \
66         profiled/swapfs.o
67
68 SRCS= $(srcdir)/e2fsck.c \
69         $(srcdir)/super.c \
70         $(srcdir)/pass1.c \
71         $(srcdir)/pass1b.c \
72         $(srcdir)/pass2.c \
73         $(srcdir)/pass3.c \
74         $(srcdir)/pass4.c \
75         $(srcdir)/pass5.c \
76         $(srcdir)/badblocks.c \
77         $(srcdir)/util.c \
78         $(srcdir)/unix.c \
79         $(srcdir)/dirinfo.c \
80         $(srcdir)/ehandler.c \
81         $(srcdir)/problem.c \
82         $(MTRACE_SRC)
83
84 all:: profiled $(PROGS) e2fsck.static e2fsck.shared $(MANPAGES)
85         @sync
86
87 @PROFILE_CMT@all:: e2fsck.profiled
88
89 e2fsck: e2fsck.@E2FSCK_TYPE@
90         $(CP) e2fsck.@E2FSCK_TYPE@ e2fsck
91
92 e2fsck.static: $(OBJS)  $(STATIC_DEPLIBS)
93         $(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o e2fsck.static $(OBJS) \
94                 $(STATIC_LIBS) 
95
96 e2fsck.shared: $(OBJS)  $(DEPLIBS)
97         $(LD) $(ALL_LDFLAGS) -o e2fsck.shared $(OBJS) $(LIBS) 
98
99 e2fsck.profiled: $(PROFILED_OBJS)  $(PROFILED_DEPLIBS)
100         $(LD) $(ALL_LDFLAGS) -g -pg -o e2fsck.profiled $(PROFILED_OBJS) \
101                 $(PROFILED_LIBS) 
102
103 extend: extend.o
104         $(LD) $(ALL_LDFLAGS) -o extend extend.o $(CHECKLIB)
105
106 flushb: flushb.o
107         $(LD) $(ALL_LDFLAGS) -o flushb flushb.o $(CHECKLIB)
108
109 iscan: iscan.o util.o
110         $(LD) $(ALL_LDFLAGS) -o iscan iscan.o util.o ehandler.o $(LIBS)
111
112 profiled:
113         mkdir profiled
114
115 e2fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/e2fsck.8.in
116         $(SUBSTITUTE) $(srcdir)/e2fsck.8.in e2fsck.8
117
118 installdirs:
119         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(root_sbindir) \
120                 $(DESTDIR)$(man8dir)
121
122 install: $(PROGS) $(MANPAGES) installdirs
123         for i in $(PROGS); do \
124                 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
125                 $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
126         done
127         $(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \
128                         $(DESTDIR)$(root_sbindir)/fsck.ext2
129         for i in $(MANPAGES); do \
130                 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
131         done
132
133 uninstall:
134         for i in $(PROGS); do \
135                 $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
136         done
137         $(RM) -f $(DESTDIR)$(root_sbindir)/fsck.ext2
138         for i in $(MANPAGES); do \
139                 $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
140         done
141
142 clean:
143         $(RM) -f $(PROGS) \#* *\# *.s *.o *.a *~ core e2fsck.static \
144                 e2fsck.shared e2fsck.profiled flushb e2fsck.8
145         $(RM) -rf profiled
146
147 mostlyclean: clean
148 distclean: clean
149         $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
150
151 # +++ Dependency line eater +++
152
153 # Makefile dependencies follow.  This must be the last section in
154 # the Makefile.in file
155 #
156 e2fsck.o: $(srcdir)/e2fsck.c $(srcdir)/e2fsck.h \
157  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
158  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
159  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
160 super.o: $(srcdir)/super.c $(top_srcdir)/lib/uuid/uuid.h $(srcdir)/e2fsck.h \
161  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
162  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
163  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
164 pass1.o: $(srcdir)/pass1.c $(srcdir)/e2fsck.h \
165  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
166  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
167  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
168 pass1b.o: $(srcdir)/pass1b.c $(top_srcdir)/lib/et/com_err.h \
169  $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
170  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
171  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
172 pass2.o: $(srcdir)/pass2.c $(srcdir)/e2fsck.h \
173  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
174  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
175  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
176 pass3.o: $(srcdir)/pass3.c $(srcdir)/e2fsck.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
180 pass4.o: $(srcdir)/pass4.c $(srcdir)/e2fsck.h \
181  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
182  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
183  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h
184 pass5.o: $(srcdir)/pass5.c $(srcdir)/e2fsck.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
188 badblocks.o: $(srcdir)/badblocks.c $(top_srcdir)/lib/et/com_err.h \
189  $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
190  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
191  $(top_srcdir)/lib/ext2fs/bitops.h
192 util.o: $(srcdir)/util.c $(srcdir)/e2fsck.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
193  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
194  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h
195 unix.o: $(srcdir)/unix.c $(top_srcdir)/lib/et/com_err.h $(srcdir)/e2fsck.h \
196  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
197  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
198  $(srcdir)/problem.h $(srcdir)/../version.h
199 dirinfo.o: $(srcdir)/dirinfo.c $(srcdir)/e2fsck.h \
200  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
201  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
202  $(top_srcdir)/lib/ext2fs/bitops.h
203 ehandler.o: $(srcdir)/ehandler.c $(srcdir)/e2fsck.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
207 problem.o: $(srcdir)/problem.c $(srcdir)/e2fsck.h \
208  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
209  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
210  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/problem.h $(srcdir)/problemP.h