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