Whamcloud - gitweb
Makefile.in (install): Search all compression extensions when
[tools/e2fsprogs.git] / misc / Makefile.in
1 #
2 # Standard e2fsprogs prologue....
3 #
4
5 srcdir = @srcdir@
6 top_srcdir = @top_srcdir@
7 VPATH = @srcdir@
8 top_builddir = ..
9 my_dir = misc
10 INSTALL = @INSTALL@
11
12 @MCONFIG@
13
14 @IMAGER_CMT@E2IMAGE_PROG= e2image
15 @IMAGER_CMT@E2IMAGE_MAN= e2image.8
16
17 SPROGS=         mke2fs badblocks tune2fs dumpe2fs $(E2IMAGE_PROG) @FSCK_PROG@
18 USPROGS=        mklost+found
19 SMANPAGES=      tune2fs.8 mklost+found.8 mke2fs.8 dumpe2fs.8 badblocks.8 \
20                         e2label.8 findfs.8 $(E2IMAGE_MAN) @FSCK_MAN@
21
22 UPROGS=         chattr lsattr uuidgen
23 UMANPAGES=      chattr.1 lsattr.1 uuidgen.1
24
25 TUNE2FS_OBJS=   tune2fs.o util.o get_device_by_label.o
26 MKLPF_OBJS=     mklost+found.o
27 MKE2FS_OBJS=    mke2fs.o util.o get_device_by_label.o
28 CHATTR_OBJS=    chattr.o
29 LSATTR_OBJS=    lsattr.o
30 UUIDGEN_OBJS=   uuidgen.o
31 DUMPE2FS_OBJS=  dumpe2fs.o
32 BADBLOCKS_OBJS= badblocks.o
33 E2IMAGE_OBJS=   e2image.o
34 FSCK_OBJS=      fsck.o get_device_by_label.o base_device.o fstype.o
35
36 SRCS=   $(srcdir)/tune2fs.c $(srcdir)/mklost+found.c $(srcdir)/mke2fs.c \
37                 $(srcdir)/chattr.c $(srcdir)/lsattr.c $(srcdir)/dumpe2fs.c \
38                 $(srcdir)/badblocks.c $(srcdir)/fsck.c $(srcdir)/util.c \
39                 $(srcdir)/uuidgen.c $(srcdir)/fstype.c
40
41 LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) 
42 DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR) 
43
44 STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) 
45 STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) 
46
47 LIBS_E2P= $(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR) 
48 DEPLIBS_E2P= $(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR) 
49
50 .c.o:
51         $(CC) -c $(ALL_CFLAGS) $< -o $@
52
53 all:: $(SPROGS) $(UPROGS) $(USPROGS) $(SMANPAGES) $(UMANPAGES)
54
55 findsuper: findsuper.o
56         $(CC) $(ALL_LDFLAGS) -o findsuper findsuper.o
57
58 tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS_E2P) $(DEPLIBUUID)
59         $(CC) $(ALL_LDFLAGS) -o tune2fs $(TUNE2FS_OBJS) $(LIBS_E2P) $(LIBUUID)
60
61 e2image: $(E2IMAGE_OBJS) $(DEPLIBS)
62         $(CC) $(ALL_LDFLAGS) -o e2image $(E2IMAGE_OBJS) $(LIBS)
63
64 base_device: base_device.c
65         $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(srcdir)/base_device.c \
66                 -DDEBUG -o base_device
67
68 fstype: fstype.c
69         $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -DTEST_PROGRAM $(srcdir)/fstype.c \
70                 get_device_by_label.o $(LIBUUID) $(LIBS) -o fstype
71
72 check:: base_device
73         ./base_device < $(srcdir)/base_device.tst > base_device.out
74         cmp $(srcdir)/base_device.tst base_device.out
75
76 mklost+found: $(MKLPF_OBJS)
77         $(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS)
78
79 mke2fs: $(MKE2FS_OBJS) $(DEPLIBS) $(LIBE2P) $(DEPLIBUUID)
80         $(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS) $(LIBE2P) $(LIBUUID)
81
82 mke2fs.static: $(MKE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBUUID)
83         $(CC) $(ALL_LDFLAGS) -static -o mke2fs.static $(MKE2FS_OBJS) \
84                 $(STATIC_LIBS) $(STATIC_LIBE2P) $(STATIC_LIBUUID)
85
86 resize2fs: resize2fs.o $(DEPLIBS)
87         $(CC) $(ALL_LDFLAGS) -o resize2fs resize2fs.o $(LIBS)
88
89 chattr: $(CHATTR_OBJS) $(DEPLIBS_E2P)
90         $(CC) $(ALL_LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS_E2P)
91
92 lsattr: $(LSATTR_OBJS) $(DEPLIBS_E2P)
93         $(CC) $(ALL_LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS_E2P)
94
95 uuidgen: $(UUIDGEN_OBJS) $(DEPLIBUUID)
96         $(CC) $(ALL_LDFLAGS) -o uuidgen $(UUIDGEN_OBJS) $(LIBUUID)
97
98 dumpe2fs: $(DUMPE2FS_OBJS) $(DEPLIBS_E2P) $(DEPLIBUUID)
99         $(CC) $(ALL_LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS_E2P) $(LIBUUID)
100
101 fsck: $(FSCK_OBJS)
102         $(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBS)
103
104 badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS)
105         $(CC) $(ALL_LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS)
106
107 tune2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/tune2fs.8.in
108         $(SUBSTITUTE) $(srcdir)/tune2fs.8.in tune2fs.8
109
110 mklost+found.8: $(DEP_SUBSTITUTE) $(srcdir)/mklost+found.8.in
111         $(SUBSTITUTE) $(srcdir)/mklost+found.8.in mklost+found.8
112
113 mke2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/mke2fs.8.in
114         $(SUBSTITUTE) $(srcdir)/mke2fs.8.in mke2fs.8
115
116 e2label.8: $(DEP_SUBSTITUTE) $(srcdir)/e2label.8.in
117         $(SUBSTITUTE) $(srcdir)/e2label.8.in e2label.8
118
119 findfs.8: $(DEP_SUBSTITUTE) $(srcdir)/findfs.8.in
120         $(SUBSTITUTE) $(srcdir)/findfs.8.in findfs.8
121
122 e2image.8: $(DEP_SUBSTITUTE) $(srcdir)/e2image.8.in
123         $(SUBSTITUTE) $(srcdir)/e2image.8.in e2image.8
124
125 dumpe2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/dumpe2fs.8.in 
126         $(SUBSTITUTE) $(srcdir)/dumpe2fs.8.in dumpe2fs.8
127
128 badblocks.8: $(DEP_SUBSTITUTE) $(srcdir)/badblocks.8.in
129         $(SUBSTITUTE) $(srcdir)/badblocks.8.in badblocks.8      
130
131 fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/fsck.8.in
132         $(SUBSTITUTE) $(srcdir)/fsck.8.in fsck.8 
133
134 chattr.1: $(DEP_SUBSTITUTE) $(srcdir)/chattr.1.in
135         $(SUBSTITUTE) $(srcdir)/chattr.1.in chattr.1 
136
137 lsattr.1: $(DEP_SUBSTITUTE) $(srcdir)/lsattr.1.in 
138         $(SUBSTITUTE) $(srcdir)/lsattr.1.in lsattr.1 
139
140 uuidgen.1: $(DEP_SUBSTITUTE) $(srcdir)/uuidgen.1.in 
141         $(SUBSTITUTE) $(srcdir)/uuidgen.1.in uuidgen.1 
142
143 installdirs:
144         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) \
145                 $(DESTDIR)$(root_sbindir) $(DESTDIR)$(bindir) \
146                 $(DESTDIR)$(man1dir) $(DESTDIR)$(man8dir)
147
148 install: all $(SMANPAGES) $(UMANPAGES) installdirs
149         for i in $(SPROGS); do \
150                 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
151                 $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
152         done
153         for i in $(USPROGS); do \
154                 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \
155                 $(STRIP) $(DESTDIR)$(sbindir)/$$i; \
156         done
157         $(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \
158                 $(DESTDIR)$(root_sbindir)/mkfs.ext2
159         $(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \
160                 $(DESTDIR)$(root_sbindir)/mkfs.ext3
161         $(LN) -f $(DESTDIR)$(root_sbindir)/tune2fs \
162                 $(DESTDIR)$(root_sbindir)/e2label
163         $(LN) -f $(DESTDIR)$(root_sbindir)/tune2fs \
164                 $(DESTDIR)$(root_sbindir)/findfs
165         for i in $(UPROGS); do \
166                 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir)/$$i; \
167                 $(STRIP) $(DESTDIR)$(bindir)/$$i; \
168         done
169         for i in $(SMANPAGES); do \
170                 for j in $(COMPRESS_EXT); do \
171                         $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
172                 done; \
173                 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
174         done
175         $(RM) -f $(DESTDIR)$(man8dir)/mkfs.ext2.8.gz \
176                 $(DESTDIR)$(man8dir)/mkfs.ext3.8.gz
177         $(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 $(DESTDIR)$(man8dir)/mkfs.ext2.8
178         $(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 $(DESTDIR)$(man8dir)/mkfs.ext3.8
179         for i in $(UMANPAGES); do \
180                 $(RM) -f $(DESTDIR)$(man1dir)/$$i.gz; \
181                 $(INSTALL_DATA) $$i $(DESTDIR)$(man1dir)/$$i; \
182         done
183
184 uninstall:
185         for i in $(SPROGS); do \
186                 $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
187         done
188         for i in $(USPROGS); do \
189                 $(RM) -f $(DESTDIR)$(sbindir)/$$i; \
190         done
191         $(RM) -f $(DESTDIR)$(root_sbindir)/mkfs.ext2 \
192                         $(DESTDIR)$(root_sbindir)/mkfs.ext3
193         for i in $(UPROGS); do \
194                 $(RM) -f $(DESTDIR)$(bindir)/$$i; \
195         done
196         for i in $(SMANPAGES); do \
197                 $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
198         done
199         $(RM) -f $(DESTDIR)$(man8dir)/mkfs.ext2.8 \
200                 $(DESTDIR)$(man8dir)/mkfs.ext3.8
201         for i in $(UMANPAGES); do \
202                 $(RM) -f $(DESTDIR)$(man1dir)/$$i; \
203         done
204
205 clean:
206         $(RM) -f $(SPROGS) $(USPROGS) $(UPROGS) $(UMANPAGES) $(SMANPAGES) \
207                 base_device base_device.out mke2fs.static \
208                 \#* *.s *.o *.a *~ core 
209
210 mostlyclean: clean
211 distclean: clean
212         $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
213
214 # +++ Dependency line eater +++
215
216 # Makefile dependencies follow.  This must be the last section in
217 # the Makefile.in file
218 #
219 tune2fs.o: $(srcdir)/tune2fs.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
220  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
221  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
222  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
223  $(top_srcdir)/lib/uuid/uuid.h $(top_srcdir)/lib/e2p/e2p.h \
224  $(srcdir)/jfs_user.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
225  $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h \
226  $(srcdir)/util.h $(srcdir)/get_device_by_label.h $(top_srcdir)/version.h \
227  $(srcdir)/nls-enable.h
228 mklost+found.o: $(srcdir)/mklost+found.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
229  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/version.h \
230  $(srcdir)/nls-enable.h
231 mke2fs.o: $(srcdir)/mke2fs.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
232  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \
233  $(top_srcdir)/lib/uuid/uuid.h $(top_srcdir)/lib/e2p/e2p.h \
234  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
235  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
236  $(srcdir)/util.h $(top_srcdir)/version.h $(srcdir)/nls-enable.h
237 chattr.o: $(srcdir)/chattr.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
238  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \
239  $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.h $(srcdir)/nls-enable.h
240 lsattr.o: $(srcdir)/lsattr.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
241  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \
242  $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.h $(srcdir)/nls-enable.h
243 dumpe2fs.o: $(srcdir)/dumpe2fs.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
244  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
245  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
246  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
247  $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/jfs_user.h \
248  $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
249  $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/uuid/uuid.h \
250  $(top_srcdir)/version.h $(srcdir)/nls-enable.h
251 badblocks.o: $(srcdir)/badblocks.c $(top_srcdir)/lib/et/com_err.h \
252  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
253  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
254  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
255  $(srcdir)/nls-enable.h
256 fsck.o: $(srcdir)/fsck.c $(top_srcdir)/version.h $(srcdir)/nls-enable.h \
257  $(srcdir)/fsck.h $(srcdir)/get_device_by_label.h
258 util.o: $(srcdir)/util.c $(top_srcdir)/lib/et/com_err.h \
259  $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
260  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
261  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
262  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/nls-enable.h \
263  $(srcdir)/get_device_by_label.h $(srcdir)/util.h
264 uuidgen.o: $(srcdir)/uuidgen.c $(top_srcdir)/lib/uuid/uuid.h \
265  $(srcdir)/nls-enable.h
266 fstype.o: $(srcdir)/fstype.c $(srcdir)/fsck.h