2 # Standard e2fsprogs prologue....
6 top_srcdir = @top_srcdir@
14 SPROGS= mke2fs badblocks tune2fs dumpe2fs e2label @FSCK_PROG@
16 SMANPAGES= tune2fs.8 mklost+found.8 mke2fs.8 dumpe2fs.8 badblocks.8 \
20 UMANPAGES= chattr.1 lsattr.1
22 TUNE2FS_OBJS= tune2fs.o
23 MKLPF_OBJS= mklost+found.o
27 DUMPE2FS_OBJS= dumpe2fs.o
28 BADBLOCKS_OBJS= badblocks.o
29 E2LABEL_OBJS= e2label.o
32 SRCS= $(srcdir)/tune2fs.c $(srcdir)/mklost+found.c $(srcdir)/mke2fs.c \
33 $(srcdir)/chattr.c $(srcdir)/lsattr.c $(srcdir)/dumpe2fs.c \
34 $(srcdir)/badblocks.c $(srcdir)/fsck.c
36 LIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
37 DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
39 STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
40 STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
42 LIBS_E2P= $(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR)
43 DEPLIBS_E2P= $(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR)
46 $(CC) -c $(ALL_CFLAGS) $< -o $@
48 all:: $(SPROGS) $(UPROGS) $(USPROGS) $(SMANPAGES) $(UMANPAGES)
50 tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS_E2P) $(LIBUUID)
51 $(CC) $(ALL_LDFLAGS) -o tune2fs $(TUNE2FS_OBJS) $(LIBS_E2P) $(LIBUUID)
53 e2label: $(E2LABEL_OBJS)
54 $(CC) $(ALL_LDFLAGS) -o e2label $(E2LABEL_OBJS)
56 mklost+found: $(MKLPF_OBJS)
57 $(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS)
59 mke2fs: $(MKE2FS_OBJS) $(DEPLIBS) $(LIBUUID)
60 $(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS) $(LIBUUID)
62 mke2fs.static: $(MKE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBUUID)
63 $(CC) $(ALL_LDFLAGS) -static -o mke2fs.static $(MKE2FS_OBJS) \
64 $(STATIC_LIBS) $(STATIC_LIBUUID)
66 resize2fs: resize2fs.o $(DEPLIBS)
67 $(CC) $(ALL_LDFLAGS) -o resize2fs resize2fs.o $(LIBS)
69 chattr: $(CHATTR_OBJS) $(DEPLIBS_E2P)
70 $(CC) $(ALL_LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS_E2P)
72 lsattr: $(LSATTR_OBJS) $(DEPLIBS_E2P)
73 $(CC) $(ALL_LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS_E2P)
75 dumpe2fs: $(DUMPE2FS_OBJS) $(DEPLIBS_E2P)
76 $(CC) $(ALL_LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS_E2P)
79 $(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS)
81 badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS)
82 $(CC) $(ALL_LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS)
84 tune2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/tune2fs.8.in
85 $(SUBSTITUTE) $(srcdir)/tune2fs.8.in tune2fs.8
87 mklost+found.8: $(DEP_SUBSTITUTE) $(srcdir)/mklost+found.8.in
88 $(SUBSTITUTE) $(srcdir)/mklost+found.8.in mklost+found.8
90 mke2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/mke2fs.8.in
91 $(SUBSTITUTE) $(srcdir)/mke2fs.8.in mke2fs.8
93 dumpe2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/dumpe2fs.8.in
94 $(SUBSTITUTE) $(srcdir)/dumpe2fs.8.in dumpe2fs.8
96 badblocks.8: $(DEP_SUBSTITUTE) $(srcdir)/badblocks.8.in
97 $(SUBSTITUTE) $(srcdir)/badblocks.8.in badblocks.8
99 fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/fsck.8.in
100 $(SUBSTITUTE) $(srcdir)/fsck.8.in fsck.8
102 chattr.1: $(DEP_SUBSTITUTE) $(srcdir)/chattr.1.in
103 $(SUBSTITUTE) $(srcdir)/chattr.1.in chattr.1
105 lsattr.1: $(DEP_SUBSTITUTE) $(srcdir)/lsattr.1.in
106 $(SUBSTITUTE) $(srcdir)/lsattr.1.in lsattr.1
109 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) \
110 $(DESTDIR)$(ubindir) $(DESTDIR)$(man1dir) \
111 $(DESTDIR)$(cat1dir) $(DESTDIR)$(man8dir) $(DESTDIR)$(cat8dir)
113 install: all $(SMANPAGES) $(UMANPAGES) installdirs
114 for i in $(SPROGS); do \
115 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \
116 $(STRIP) $(DESTDIR)$(sbindir)/$$i; \
118 for i in $(USPROGS); do \
119 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(usbindir)/$$i; \
120 $(STRIP) $(DESTDIR)$(usbindir)/$$i; \
122 $(LN) -f $(DESTDIR)$(sbindir)/mke2fs $(DESTDIR)$(sbindir)/mkfs.ext2
123 for i in $(UPROGS); do \
124 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(ubindir)/$$i; \
125 $(STRIP) $(DESTDIR)$(ubindir)/$$i; \
127 for i in $(SMANPAGES); do \
128 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
130 for i in $(UMANPAGES); do \
131 $(INSTALL_DATA) $$i $(DESTDIR)$(man1dir)/$$i; \
135 for i in $(SPROGS); do \
136 $(RM) -f $(sbindir)/$$i; \
138 for i in $(USPROGS); do \
139 $(RM) -f $(usbindir)/$$i; \
141 $(RM) -f $(sbindir)/mkfs.ext2
142 for i in $(UPROGS); do \
143 $(RM) -f $(ubindir)/$$i; \
145 for i in $(SMANPAGES); do \
146 $(RM) -f $(man8dir)/$$i; \
148 for i in $(UMANPAGES); do \
149 $(RM) -f $(man1dir)/$$i; \
153 $(RM) -f $(SPROGS) $(USPROGS) $(UPROGS) $(UMANPAGES) $(SMANPAGES) \
154 mke2fs.static \#* *.s *.o *.a *~ core
158 $(RM) -f .depend Makefile
160 # +++ Dependency line eater +++
162 # Makefile dependencies follow. This must be the last section in
163 # the Makefile.in file
165 tune2fs.o: $(srcdir)/tune2fs.c $(top_srcdir)/lib/ext2fs/ext2fs.h \
166 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/io.h \
167 $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
168 $(top_srcdir)/lib/uuid/uuid.h $(top_srcdir)/lib/e2p/e2p.h \
169 $(srcdir)/../version.h
170 mklost+found.o: $(srcdir)/mklost+found.c $(srcdir)/../version.h
171 mke2fs.o: $(srcdir)/mke2fs.c $(top_srcdir)/lib/et/com_err.h \
172 $(top_srcdir)/lib/uuid/uuid.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
173 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
174 $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../version.h
175 chattr.o: $(srcdir)/chattr.c $(top_srcdir)/lib/et/com_err.h \
176 $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/../version.h
177 lsattr.o: $(srcdir)/lsattr.c $(top_srcdir)/lib/et/com_err.h \
178 $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/../version.h
179 dumpe2fs.o: $(srcdir)/dumpe2fs.c $(top_srcdir)/lib/ext2fs/ext2fs.h \
180 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/io.h \
181 $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
182 $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/../version.h
183 badblocks.o: $(srcdir)/badblocks.c $(top_srcdir)/lib/et/com_err.h \
184 $(top_srcdir)/lib/ext2fs/io.h
185 fsck.o: $(srcdir)/fsck.c $(srcdir)/../version.h $(srcdir)/fsck.h