1997-04-26 21:58:21 +08:00
|
|
|
#
|
|
|
|
# Standard e2fsprogs prologue....
|
|
|
|
#
|
|
|
|
|
|
|
|
srcdir = @srcdir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
top_builddir = ..
|
1997-04-29 22:51:31 +08:00
|
|
|
my_dir = debugfs
|
1997-04-26 21:58:21 +08:00
|
|
|
INSTALL = @INSTALL@
|
|
|
|
|
|
|
|
@MCONFIG@
|
|
|
|
|
2011-11-15 11:01:52 +08:00
|
|
|
PROGS= debugfs rdebugfs
|
1997-04-26 21:58:21 +08:00
|
|
|
MANPAGES= debugfs.8
|
|
|
|
|
2000-07-04 20:37:55 +08:00
|
|
|
MK_CMDS= _SS_DIR_OVERRIDE=../lib/ss ../lib/ss/mk_cmds
|
1997-04-26 21:58:21 +08:00
|
|
|
|
2000-08-15 04:37:09 +08:00
|
|
|
DEBUG_OBJS= debug_cmds.o debugfs.o util.o ncheck.o icheck.o ls.o \
|
2011-11-15 12:31:24 +08:00
|
|
|
lsdel.o dump.o set_fields.o logdump.o htree.o unused.o e2freefrag.o
|
1997-04-26 21:58:21 +08:00
|
|
|
|
2011-11-15 11:01:52 +08:00
|
|
|
RO_DEBUG_OBJS= ro_debug_cmds.o ro_debugfs.o util.o ncheck.o icheck.o ls.o \
|
2011-11-15 12:31:24 +08:00
|
|
|
lsdel.o logdump.o htree.o e2freefrag.o
|
2011-11-15 11:01:52 +08:00
|
|
|
|
1997-04-30 01:48:10 +08:00
|
|
|
SRCS= debug_cmds.c $(srcdir)/debugfs.c $(srcdir)/util.c $(srcdir)/ls.c \
|
1997-04-26 21:58:21 +08:00
|
|
|
$(srcdir)/ncheck.c $(srcdir)/icheck.c $(srcdir)/lsdel.c \
|
2004-12-22 09:37:36 +08:00
|
|
|
$(srcdir)/dump.c $(srcdir)/set_fields.c ${srcdir}/logdump.c \
|
2003-05-22 05:58:36 +08:00
|
|
|
$(srcdir)/htree.c $(srcdir)/unused.c
|
1997-04-26 21:58:21 +08:00
|
|
|
|
2003-03-16 19:26:25 +08:00
|
|
|
LIBS= $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(LIBBLKID) \
|
2008-04-18 04:54:24 +08:00
|
|
|
$(LIBUUID)
|
2009-07-02 10:06:51 +08:00
|
|
|
DEPLIBS= $(LIBEXT2FS) $(LIBE2P) $(DEPLIBSS) $(DEPLIBCOM_ERR) \
|
|
|
|
$(DEPLIBBLKID) $(DEPLIBUUID)
|
1997-04-26 21:58:21 +08:00
|
|
|
|
|
|
|
.c.o:
|
2009-07-02 12:11:17 +08:00
|
|
|
$(E) " CC $<"
|
|
|
|
$(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
|
1997-04-26 21:58:21 +08:00
|
|
|
|
1997-04-29 22:34:47 +08:00
|
|
|
all:: $(PROGS) $(MANPAGES)
|
1997-04-26 21:58:21 +08:00
|
|
|
|
|
|
|
debugfs: $(DEBUG_OBJS) $(DEPLIBS)
|
2009-07-02 12:11:17 +08:00
|
|
|
$(E) " LD $@"
|
|
|
|
$(Q) $(CC) $(ALL_LDFLAGS) -o debugfs $(DEBUG_OBJS) $(LIBS)
|
1997-04-26 21:58:21 +08:00
|
|
|
|
2011-11-15 11:01:52 +08:00
|
|
|
rdebugfs: $(RO_DEBUG_OBJS) $(DEPLIBS)
|
|
|
|
$(E) " LD $@"
|
|
|
|
$(Q) $(CC) $(ALL_LDFLAGS) -o rdebugfs $(RO_DEBUG_OBJS) $(LIBS)
|
|
|
|
|
1997-04-26 21:58:21 +08:00
|
|
|
debug_cmds.c debug_cmds.h: debug_cmds.ct
|
2009-07-02 12:11:17 +08:00
|
|
|
$(E) " MK_CMDS $@"
|
|
|
|
$(Q) $(MK_CMDS) $(srcdir)/debug_cmds.ct
|
1997-04-26 21:58:21 +08:00
|
|
|
|
2011-11-15 11:01:52 +08:00
|
|
|
ro_debug_cmds.c ro_debug_cmds.h: ro_debug_cmds.ct
|
|
|
|
$(E) " MK_CMDS $@"
|
|
|
|
$(Q) $(MK_CMDS) $(srcdir)/ro_debug_cmds.ct
|
|
|
|
|
|
|
|
ro_debugfs.o: debugfs.c
|
|
|
|
$(E) " CC $@"
|
|
|
|
$(Q) $(CC) -c $(ALL_CFLAGS) $< -DREAD_ONLY -o $@
|
|
|
|
|
2011-11-15 12:31:24 +08:00
|
|
|
e2freefrag.o: $(srcdir)/../misc/e2freefrag.c
|
|
|
|
$(E) " CC $@"
|
|
|
|
$(Q) $(CC) -c $(ALL_CFLAGS) -I$(srcdir) $< -DDEBUGFS -o $@
|
|
|
|
|
1997-10-15 10:47:20 +08:00
|
|
|
debugfs.8: $(DEP_SUBSTITUTE) $(srcdir)/debugfs.8.in
|
2009-07-02 12:11:17 +08:00
|
|
|
$(E) " SUBST $@"
|
|
|
|
$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/debugfs.8.in debugfs.8
|
1997-04-29 22:34:47 +08:00
|
|
|
|
1997-04-26 21:58:21 +08:00
|
|
|
installdirs:
|
2009-07-02 12:11:17 +08:00
|
|
|
$(E) " MKINSTALLDIRS $(root_sbindir) $(man8dir)"
|
|
|
|
$(Q) $(MKINSTALLDIRS) $(DESTDIR)$(root_sbindir) \
|
1998-04-01 11:16:29 +08:00
|
|
|
$(DESTDIR)$(man8dir)
|
1997-04-26 21:58:21 +08:00
|
|
|
|
|
|
|
install: $(PROGS) $(MANPAGES) installdirs
|
2009-07-02 12:11:17 +08:00
|
|
|
$(Q) for i in $(PROGS); do \
|
2004-12-16 00:28:55 +08:00
|
|
|
echo " INSTALL $(root_sbindir)/$$i"; \
|
1998-04-01 11:16:29 +08:00
|
|
|
$(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
|
1997-04-26 21:58:21 +08:00
|
|
|
done
|
2009-07-02 12:11:17 +08:00
|
|
|
$(Q) for i in $(MANPAGES); do \
|
2002-10-31 16:32:34 +08:00
|
|
|
for j in $(COMPRESS_EXT); do \
|
|
|
|
$(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
|
|
|
|
done; \
|
2004-12-16 00:28:55 +08:00
|
|
|
echo " INSTALL_DATA $(man8dir)/$$i"; \
|
1997-04-26 22:37:06 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
|
1997-04-26 21:58:21 +08:00
|
|
|
done
|
|
|
|
|
2004-12-16 00:28:55 +08:00
|
|
|
install-strip: install
|
2009-07-02 12:11:17 +08:00
|
|
|
$(Q) for i in $(PROGS); do \
|
2004-12-16 00:28:55 +08:00
|
|
|
echo " STRIP $(root_sbindir)/$$i"; \
|
|
|
|
$(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
|
|
|
|
done
|
|
|
|
|
1997-04-26 21:58:21 +08:00
|
|
|
uninstall:
|
|
|
|
for i in $(PROGS); do \
|
1998-04-01 11:16:29 +08:00
|
|
|
$(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
|
1997-04-26 21:58:21 +08:00
|
|
|
done
|
|
|
|
for i in $(MANPAGES); do \
|
1998-04-01 11:16:29 +08:00
|
|
|
$(RM) -f $(DESTDIR)$(man8dir)/$$i; \
|
1997-04-26 21:58:21 +08:00
|
|
|
done
|
|
|
|
|
|
|
|
clean:
|
2011-11-15 11:01:52 +08:00
|
|
|
$(RM) -f $(PROGS) debugfs.8 \#* *.s *.o *.a *~ debug_cmds.c \
|
|
|
|
ro_debug_cmds.c core
|
1997-04-29 22:34:47 +08:00
|
|
|
|
1997-04-26 21:58:21 +08:00
|
|
|
mostlyclean: clean
|
|
|
|
distclean: clean
|
1999-11-20 02:42:30 +08:00
|
|
|
$(RM) -f debug_cmds.c .depend Makefile $(srcdir)/TAGS \
|
|
|
|
$(srcdir)/Makefile.in.old
|
1997-04-26 21:58:21 +08:00
|
|
|
|
|
|
|
# +++ Dependency line eater +++
|
|
|
|
#
|
|
|
|
# Makefile dependencies follow. This must be the last section in
|
|
|
|
# the Makefile.in file
|
|
|
|
#
|
2001-12-25 04:33:49 +08:00
|
|
|
debug_cmds.o: debug_cmds.c $(top_srcdir)/lib/ss/ss.h \
|
2003-04-18 11:37:28 +08:00
|
|
|
$(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
|
1997-04-29 22:34:47 +08:00
|
|
|
debugfs.o: $(srcdir)/debugfs.c $(top_srcdir)/lib/et/com_err.h \
|
1999-09-15 04:55:37 +08:00
|
|
|
$(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(srcdir)/debugfs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
|
|
|
|
$(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
|
|
|
|
$(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
|
|
|
|
$(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.h $(srcdir)/jfs_user.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/kernel-list.h
|
1998-12-04 14:15:12 +08:00
|
|
|
util.o: $(srcdir)/util.c $(srcdir)/debugfs.h \
|
2001-06-02 07:49:46 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
|
2000-12-09 14:41:25 +08:00
|
|
|
$(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
|
2005-05-06 21:37:58 +08:00
|
|
|
ls.o: $(srcdir)/ls.c $(srcdir)/debugfs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
|
|
|
|
$(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
|
2001-06-02 07:49:46 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
|
2005-05-06 21:37:58 +08:00
|
|
|
ncheck.o: $(srcdir)/ncheck.c $(srcdir)/debugfs.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
|
2005-05-06 21:37:58 +08:00
|
|
|
$(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
|
1997-04-29 22:34:47 +08:00
|
|
|
icheck.o: $(srcdir)/icheck.c $(srcdir)/debugfs.h \
|
2001-06-02 07:49:46 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
|
2005-05-06 21:37:58 +08:00
|
|
|
$(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
|
1997-04-29 22:34:47 +08:00
|
|
|
lsdel.o: $(srcdir)/lsdel.c $(srcdir)/debugfs.h \
|
2001-06-02 07:49:46 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
|
2005-05-06 21:37:58 +08:00
|
|
|
$(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
|
1997-04-29 22:34:47 +08:00
|
|
|
dump.o: $(srcdir)/dump.c $(srcdir)/debugfs.h \
|
2001-06-02 07:49:46 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
|
2005-05-06 21:37:58 +08:00
|
|
|
$(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
|
2004-12-22 09:37:36 +08:00
|
|
|
set_fields.o: $(srcdir)/set_fields.c $(srcdir)/debugfs.h \
|
2001-06-02 07:49:46 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
|
2005-05-06 21:37:58 +08:00
|
|
|
$(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
|
|
|
|
$(top_srcdir)/lib/e2p/e2p.h
|
2001-12-25 04:33:49 +08:00
|
|
|
logdump.o: $(srcdir)/logdump.c $(srcdir)/debugfs.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
|
2005-05-06 21:37:58 +08:00
|
|
|
$(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
|
2005-05-06 21:37:58 +08:00
|
|
|
$(srcdir)/jfs_user.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h
|
2002-03-05 14:57:53 +08:00
|
|
|
htree.o: $(srcdir)/htree.c $(srcdir)/debugfs.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
|
2005-05-06 21:37:58 +08:00
|
|
|
$(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
|
|
|
|
$(top_srcdir)/lib/e2p/e2p.h
|
2005-05-06 21:37:58 +08:00
|
|
|
unused.o: $(srcdir)/unused.c $(srcdir)/debugfs.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
|
2005-05-06 21:37:58 +08:00
|
|
|
$(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
|
2009-10-05 02:45:08 +08:00
|
|
|
$(top_builddir)/lib/ext2fs/ext2_err.h \
|
|
|
|
$(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
|