2 # Standard e2fsprogs prologue....
6 top_srcdir = @top_srcdir@
17 MK_CMDS= _SS_DIR_OVERRIDE=../lib/ss ../lib/ss/mk_cmds
19 DEBUG_OBJS= debug_cmds.o debugfs.o util.o ncheck.o icheck.o ls.o \
20 lsdel.o dump.o set_fields.o logdump.o htree.o unused.o e2freefrag.o \
21 filefrag.o extent_cmds.o extent_inode.o zap.o
23 RO_DEBUG_OBJS= ro_debug_cmds.o ro_debugfs.o util.o ncheck.o icheck.o ls.o \
24 lsdel.o logdump.o htree.o e2freefrag.o filefrag.o extent_cmds.o \
27 SRCS= debug_cmds.c $(srcdir)/debugfs.c $(srcdir)/util.c $(srcdir)/ls.c \
28 $(srcdir)/ncheck.c $(srcdir)/icheck.c $(srcdir)/lsdel.c \
29 $(srcdir)/dump.c $(srcdir)/set_fields.c ${srcdir}/logdump.c \
30 $(srcdir)/htree.c $(srcdir)/unused.c ${srcdir}/../misc/e2freefrag.c \
31 $(srcdir)/filefrag.c $(srcdir)/extent_inode.c $(srcdir)/zap.c
33 LIBS= $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(LIBBLKID) \
35 DEPLIBS= $(LIBEXT2FS) $(LIBE2P) $(DEPLIBSS) $(DEPLIBCOM_ERR) \
36 $(DEPLIBBLKID) $(DEPLIBUUID)
38 STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBSS) $(STATIC_LIBCOM_ERR) \
39 $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(STATIC_LIBE2P)
40 STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBSS) \
41 $(DEPSTATIC_LIBCOM_ERR) $(DEPSTATIC_LIBUUID) \
46 $(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
48 all:: $(PROGS) $(MANPAGES)
50 debugfs: $(DEBUG_OBJS) $(DEPLIBS)
52 $(Q) $(CC) $(ALL_LDFLAGS) -o debugfs $(DEBUG_OBJS) $(LIBS)
54 debugfs.static: $(DEBUG_OBJS) $(STATIC_DEPLIBS)
56 $(Q) $(CC) $(LDFLAGS_STATIC) -o debugfs.static $(DEBUG_OBJS) \
57 $(STATIC_LIBS) $(READLINE_LIB)
59 rdebugfs: $(RO_DEBUG_OBJS) $(DEPLIBS)
61 $(Q) $(CC) $(ALL_LDFLAGS) -o rdebugfs $(RO_DEBUG_OBJS) $(LIBS)
63 debug_cmds.c debug_cmds.h: debug_cmds.ct
65 $(Q) $(MK_CMDS) $(srcdir)/debug_cmds.ct
67 extent_cmds.c extent_cmds.h: extent_cmds.ct
69 $(Q) $(MK_CMDS) $(srcdir)/extent_cmds.ct
71 ro_debug_cmds.c ro_debug_cmds.h: ro_debug_cmds.ct
73 $(Q) $(MK_CMDS) $(srcdir)/ro_debug_cmds.ct
75 ro_debugfs.o: debugfs.c
77 $(Q) $(CC) -c $(ALL_CFLAGS) $< -DREAD_ONLY -o $@
79 e2freefrag.o: $(srcdir)/../misc/e2freefrag.c
81 $(Q) $(CC) -c $(ALL_CFLAGS) -I$(srcdir) $< -DDEBUGFS -o $@
83 debugfs.8: $(DEP_SUBSTITUTE) $(srcdir)/debugfs.8.in
85 $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/debugfs.8.in debugfs.8
88 $(E) " MKINSTALLDIRS $(root_sbindir) $(man8dir)"
89 $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(root_sbindir) \
92 install: $(PROGS) $(MANPAGES) installdirs
93 $(Q) for i in $(PROGS); do \
94 echo " INSTALL $(root_sbindir)/$$i"; \
95 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
97 $(Q) for i in $(MANPAGES); do \
98 for j in $(COMPRESS_EXT); do \
99 $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
101 echo " INSTALL_DATA $(man8dir)/$$i"; \
102 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
105 install-strip: install
106 $(Q) for i in $(PROGS); do \
107 echo " STRIP $(root_sbindir)/$$i"; \
108 $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
112 for i in $(PROGS); do \
113 $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
115 for i in $(MANPAGES); do \
116 $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
120 $(RM) -f $(PROGS) debugfs.8 \#* *.s *.o *.a *~ debug_cmds.c \
121 extent_cmds.c ro_debug_cmds.c core rdebugfs debugfs.static
125 $(RM) -f debug_cmds.c .depend Makefile $(srcdir)/TAGS \
126 $(srcdir)/Makefile.in.old
128 # +++ Dependency line eater +++
130 # Makefile dependencies follow. This must be the last section in
131 # the Makefile.in file
133 debug_cmds.o: debug_cmds.c $(top_srcdir)/lib/ss/ss.h \
134 $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
135 debugfs.o: $(srcdir)/debugfs.c $(top_srcdir)/lib/et/com_err.h \
136 $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
137 $(srcdir)/debugfs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
138 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
139 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
140 $(top_builddir)/lib/ext2fs/ext2_err.h \
141 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
142 $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.h $(srcdir)/jfs_user.h \
143 $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
144 $(top_srcdir)/lib/ext2fs/kernel-list.h
145 util.o: $(srcdir)/util.c $(srcdir)/debugfs.h \
146 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
147 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
148 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
149 $(top_builddir)/lib/ext2fs/ext2_err.h \
150 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
151 ls.o: $(srcdir)/ls.c $(srcdir)/debugfs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
152 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
153 $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
154 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
155 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
156 ncheck.o: $(srcdir)/ncheck.c $(srcdir)/debugfs.h \
157 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
158 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
159 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
160 $(top_builddir)/lib/ext2fs/ext2_err.h \
161 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
162 icheck.o: $(srcdir)/icheck.c $(srcdir)/debugfs.h \
163 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
164 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
165 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
166 $(top_builddir)/lib/ext2fs/ext2_err.h \
167 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
168 lsdel.o: $(srcdir)/lsdel.c $(srcdir)/debugfs.h \
169 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
170 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
171 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
172 $(top_builddir)/lib/ext2fs/ext2_err.h \
173 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
174 dump.o: $(srcdir)/dump.c $(srcdir)/debugfs.h \
175 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
176 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
177 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
178 $(top_builddir)/lib/ext2fs/ext2_err.h \
179 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
180 set_fields.o: $(srcdir)/set_fields.c $(srcdir)/debugfs.h \
181 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
182 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
183 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
184 $(top_builddir)/lib/ext2fs/ext2_err.h \
185 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
186 $(top_srcdir)/lib/e2p/e2p.h
187 logdump.o: $(srcdir)/logdump.c $(srcdir)/debugfs.h \
188 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
189 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
190 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
191 $(top_builddir)/lib/ext2fs/ext2_err.h \
192 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
193 $(srcdir)/jfs_user.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
194 $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h
195 htree.o: $(srcdir)/htree.c $(srcdir)/debugfs.h \
196 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
197 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
198 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
199 $(top_builddir)/lib/ext2fs/ext2_err.h \
200 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
201 $(top_srcdir)/lib/e2p/e2p.h
202 unused.o: $(srcdir)/unused.c $(srcdir)/debugfs.h \
203 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
204 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
205 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
206 $(top_builddir)/lib/ext2fs/ext2_err.h \
207 $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h