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