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