2 # Standard e2fsprogs prologue....
6 top_srcdir = @top_srcdir@
14 @IMAGER_CMT@E2IMAGE_PROG= e2image
15 @IMAGER_CMT@E2IMAGE_MAN= e2image.8
17 SPROGS= mke2fs badblocks tune2fs dumpe2fs $(E2IMAGE_PROG) @FSCK_PROG@
19 SMANPAGES= tune2fs.8 mklost+found.8 mke2fs.8 dumpe2fs.8 badblocks.8 \
20 e2label.8 findfs.8 $(E2IMAGE_MAN) @FSCK_MAN@
22 UPROGS= chattr lsattr uuidgen
23 UMANPAGES= chattr.1 lsattr.1 uuidgen.1
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
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
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
41 LIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
42 DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
44 STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
45 STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
47 LIBS_E2P= $(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR)
48 DEPLIBS_E2P= $(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR)
51 $(CC) -c $(ALL_CFLAGS) $< -o $@
53 all:: $(SPROGS) $(UPROGS) $(USPROGS) $(SMANPAGES) $(UMANPAGES)
55 findsuper: findsuper.o
56 $(CC) $(ALL_LDFLAGS) -o findsuper findsuper.o
58 tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS_E2P) $(DEPLIBUUID)
59 $(CC) $(ALL_LDFLAGS) -o tune2fs $(TUNE2FS_OBJS) $(LIBS_E2P) $(LIBUUID)
61 e2image: $(E2IMAGE_OBJS) $(DEPLIBS)
62 $(CC) $(ALL_LDFLAGS) -o e2image $(E2IMAGE_OBJS) $(LIBS)
64 base_device: base_device.c
65 $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(srcdir)/base_device.c \
66 -DDEBUG -o base_device
69 $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -DTEST_PROGRAM $(srcdir)/fstype.c \
70 get_device_by_label.o $(LIBUUID) $(LIBS) -o fstype
73 ./base_device < $(srcdir)/base_device.tst > base_device.out
74 cmp $(srcdir)/base_device.tst base_device.out
76 mklost+found: $(MKLPF_OBJS)
77 $(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS)
79 mke2fs: $(MKE2FS_OBJS) $(DEPLIBS) $(LIBE2P) $(DEPLIBUUID)
80 $(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS) $(LIBE2P) $(LIBUUID)
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)
86 resize2fs: resize2fs.o $(DEPLIBS)
87 $(CC) $(ALL_LDFLAGS) -o resize2fs resize2fs.o $(LIBS)
89 chattr: $(CHATTR_OBJS) $(DEPLIBS_E2P)
90 $(CC) $(ALL_LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS_E2P)
92 lsattr: $(LSATTR_OBJS) $(DEPLIBS_E2P)
93 $(CC) $(ALL_LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS_E2P)
95 uuidgen: $(UUIDGEN_OBJS) $(DEPLIBUUID)
96 $(CC) $(ALL_LDFLAGS) -o uuidgen $(UUIDGEN_OBJS) $(LIBUUID)
98 dumpe2fs: $(DUMPE2FS_OBJS) $(DEPLIBS_E2P) $(DEPLIBUUID)
99 $(CC) $(ALL_LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS_E2P) $(LIBUUID)
102 $(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBS)
104 badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS)
105 $(CC) $(ALL_LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS)
107 tune2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/tune2fs.8.in
108 $(SUBSTITUTE) $(srcdir)/tune2fs.8.in tune2fs.8
110 mklost+found.8: $(DEP_SUBSTITUTE) $(srcdir)/mklost+found.8.in
111 $(SUBSTITUTE) $(srcdir)/mklost+found.8.in mklost+found.8
113 mke2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/mke2fs.8.in
114 $(SUBSTITUTE) $(srcdir)/mke2fs.8.in mke2fs.8
116 e2label.8: $(DEP_SUBSTITUTE) $(srcdir)/e2label.8.in
117 $(SUBSTITUTE) $(srcdir)/e2label.8.in e2label.8
119 findfs.8: $(DEP_SUBSTITUTE) $(srcdir)/findfs.8.in
120 $(SUBSTITUTE) $(srcdir)/findfs.8.in findfs.8
122 e2image.8: $(DEP_SUBSTITUTE) $(srcdir)/e2image.8.in
123 $(SUBSTITUTE) $(srcdir)/e2image.8.in e2image.8
125 dumpe2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/dumpe2fs.8.in
126 $(SUBSTITUTE) $(srcdir)/dumpe2fs.8.in dumpe2fs.8
128 badblocks.8: $(DEP_SUBSTITUTE) $(srcdir)/badblocks.8.in
129 $(SUBSTITUTE) $(srcdir)/badblocks.8.in badblocks.8
131 fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/fsck.8.in
132 $(SUBSTITUTE) $(srcdir)/fsck.8.in fsck.8
134 chattr.1: $(DEP_SUBSTITUTE) $(srcdir)/chattr.1.in
135 $(SUBSTITUTE) $(srcdir)/chattr.1.in chattr.1
137 lsattr.1: $(DEP_SUBSTITUTE) $(srcdir)/lsattr.1.in
138 $(SUBSTITUTE) $(srcdir)/lsattr.1.in lsattr.1
140 uuidgen.1: $(DEP_SUBSTITUTE) $(srcdir)/uuidgen.1.in
141 $(SUBSTITUTE) $(srcdir)/uuidgen.1.in uuidgen.1
144 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) \
145 $(DESTDIR)$(root_sbindir) $(DESTDIR)$(bindir) \
146 $(DESTDIR)$(man1dir) $(DESTDIR)$(man8dir)
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; \
153 for i in $(USPROGS); do \
154 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \
155 $(STRIP) $(DESTDIR)$(sbindir)/$$i; \
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; \
169 for i in $(SMANPAGES); do \
170 for j in $(COMPRESS_EXT); do \
171 $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
173 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
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; \
185 for i in $(SPROGS); do \
186 $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
188 for i in $(USPROGS); do \
189 $(RM) -f $(DESTDIR)$(sbindir)/$$i; \
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; \
196 for i in $(SMANPAGES); do \
197 $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
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; \
206 $(RM) -f $(SPROGS) $(USPROGS) $(UPROGS) $(UMANPAGES) $(SMANPAGES) \
207 base_device base_device.out mke2fs.static \
208 \#* *.s *.o *.a *~ core
212 $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
214 # +++ Dependency line eater +++
216 # Makefile dependencies follow. This must be the last section in
217 # the Makefile.in file
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