Home | History | Annotate | Download | only in debugfs
      1 #
      2 # Standard e2fsprogs prologue....
      3 #
      4 
      5 srcdir = @srcdir@
      6 top_srcdir = @top_srcdir@
      7 VPATH = @srcdir@
      8 top_builddir = ..
      9 my_dir = debugfs
     10 INSTALL = @INSTALL@
     11 
     12 @MCONFIG@
     13 
     14 PROGS=		debugfs
     15 MANPAGES=	debugfs.8
     16 
     17 MK_CMDS=	_SS_DIR_OVERRIDE=../lib/ss ../lib/ss/mk_cmds
     18 
     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
     22 
     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 \
     25 	extent_inode.o
     26 
     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
     32 
     33 LIBS= $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(LIBBLKID) \
     34 	$(LIBUUID)
     35 DEPLIBS= $(LIBEXT2FS) $(LIBE2P) $(DEPLIBSS) $(DEPLIBCOM_ERR) \
     36 	$(DEPLIBBLKID) $(DEPLIBUUID)
     37 
     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) \
     42 		$(DEPSTATIC_LIBE2P)
     43 
     44 .c.o:
     45 	$(E) "	CC $<"
     46 	$(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
     47 	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
     48 
     49 all:: $(PROGS) $(MANPAGES)
     50 
     51 debugfs: $(DEBUG_OBJS) $(DEPLIBS)
     52 	$(E) "	LD $@"
     53 	$(Q) $(CC) $(ALL_LDFLAGS) -o debugfs $(DEBUG_OBJS) $(LIBS)
     54 
     55 debugfs.static: $(DEBUG_OBJS) $(STATIC_DEPLIBS)
     56 	$(E) "	LD $@"
     57 	$(Q) $(CC) $(LDFLAGS_STATIC) -o debugfs.static $(DEBUG_OBJS) \
     58 		$(STATIC_LIBS) $(READLINE_LIB)
     59 
     60 rdebugfs: $(RO_DEBUG_OBJS) $(DEPLIBS)
     61 	$(E) "	LD $@"
     62 	$(Q) $(CC) $(ALL_LDFLAGS) -o rdebugfs $(RO_DEBUG_OBJS) $(LIBS)
     63 
     64 debug_cmds.c debug_cmds.h: debug_cmds.ct
     65 	$(E) "	MK_CMDS $@"
     66 	$(Q) $(MK_CMDS) $(srcdir)/debug_cmds.ct
     67 
     68 extent_cmds.c extent_cmds.h: extent_cmds.ct
     69 	$(E) "	MK_CMDS $@"
     70 	$(Q) $(MK_CMDS) $(srcdir)/extent_cmds.ct
     71 
     72 ro_debug_cmds.c ro_debug_cmds.h: ro_debug_cmds.ct
     73 	$(E) "	MK_CMDS $@"
     74 	$(Q) $(MK_CMDS) $(srcdir)/ro_debug_cmds.ct
     75 
     76 ro_debugfs.o: debugfs.c
     77 	$(E) "	CC $@"
     78 	$(Q) $(CC) -c $(ALL_CFLAGS) $< -DREAD_ONLY -o $@
     79 
     80 e2freefrag.o: $(srcdir)/../misc/e2freefrag.c
     81 	$(E) "	CC $@"
     82 	$(Q) $(CC) -c $(ALL_CFLAGS) -I$(srcdir) $< -DDEBUGFS -o $@
     83 
     84 debugfs.8: $(DEP_SUBSTITUTE) $(srcdir)/debugfs.8.in
     85 	$(E) "	SUBST $@"
     86 	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/debugfs.8.in debugfs.8
     87 
     88 installdirs:
     89 	$(E) "	MKINSTALLDIRS $(root_sbindir) $(man8dir)"
     90 	$(Q) $(MKINSTALLDIRS) $(DESTDIR)$(root_sbindir) \
     91 		$(DESTDIR)$(man8dir)
     92 
     93 install: $(PROGS) $(MANPAGES) installdirs
     94 	$(Q) for i in $(PROGS); do \
     95 		echo "	INSTALL $(root_sbindir)/$$i"; \
     96 		$(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
     97 	done
     98 	$(Q) for i in $(MANPAGES); do \
     99 		for j in $(COMPRESS_EXT); do \
    100 			$(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
    101 		done; \
    102 		echo "	INSTALL_DATA $(man8dir)/$$i"; \
    103 		$(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
    104 	done
    105 
    106 install-strip: install
    107 	$(Q) for i in $(PROGS); do \
    108 		echo "	STRIP $(root_sbindir)/$$i"; \
    109 		$(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
    110 	done
    111 
    112 uninstall:
    113 	for i in $(PROGS); do \
    114 		$(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
    115 	done
    116 	for i in $(MANPAGES); do \
    117 		$(RM) -f $(DESTDIR)$(man8dir)/$$i; \
    118 	done
    119 
    120 clean:
    121 	$(RM) -f $(PROGS) debugfs.8 \#* *.s *.o *.a *~ debug_cmds.c \
    122 		extent_cmds.c ro_debug_cmds.c core rdebugfs debugfs.static
    123 
    124 mostlyclean: clean
    125 distclean: clean
    126 	$(RM) -f debug_cmds.c .depend Makefile $(srcdir)/TAGS \
    127 		$(srcdir)/Makefile.in.old
    128 
    129 # +++ Dependency line eater +++
    130 # 
    131 # Makefile dependencies follow.  This must be the last section in
    132 # the Makefile.in file
    133 #
    134 debug_cmds.o: debug_cmds.c $(top_srcdir)/lib/ss/ss.h \
    135  $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
    136 debugfs.o: $(srcdir)/debugfs.c $(top_srcdir)/lib/et/com_err.h \
    137  $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
    138  $(srcdir)/debugfs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
    139  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
    140  $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
    141  $(top_builddir)/lib/ext2fs/ext2_err.h \
    142  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
    143  $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.h $(srcdir)/jfs_user.h \
    144  $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
    145  $(top_srcdir)/lib/ext2fs/kernel-list.h
    146 util.o: $(srcdir)/util.c $(srcdir)/debugfs.h \
    147  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
    148  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
    149  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
    150  $(top_builddir)/lib/ext2fs/ext2_err.h \
    151  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
    152 ls.o: $(srcdir)/ls.c $(srcdir)/debugfs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
    153  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
    154  $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
    155  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
    156  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
    157 ncheck.o: $(srcdir)/ncheck.c $(srcdir)/debugfs.h \
    158  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
    159  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
    160  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
    161  $(top_builddir)/lib/ext2fs/ext2_err.h \
    162  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
    163 icheck.o: $(srcdir)/icheck.c $(srcdir)/debugfs.h \
    164  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
    165  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
    166  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
    167  $(top_builddir)/lib/ext2fs/ext2_err.h \
    168  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
    169 lsdel.o: $(srcdir)/lsdel.c $(srcdir)/debugfs.h \
    170  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
    171  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
    172  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
    173  $(top_builddir)/lib/ext2fs/ext2_err.h \
    174  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
    175 dump.o: $(srcdir)/dump.c $(srcdir)/debugfs.h \
    176  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
    177  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
    178  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
    179  $(top_builddir)/lib/ext2fs/ext2_err.h \
    180  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
    181 set_fields.o: $(srcdir)/set_fields.c $(srcdir)/debugfs.h \
    182  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
    183  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
    184  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
    185  $(top_builddir)/lib/ext2fs/ext2_err.h \
    186  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
    187  $(top_srcdir)/lib/e2p/e2p.h
    188 logdump.o: $(srcdir)/logdump.c $(srcdir)/debugfs.h \
    189  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
    190  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
    191  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
    192  $(top_builddir)/lib/ext2fs/ext2_err.h \
    193  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
    194  $(srcdir)/jfs_user.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \
    195  $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h
    196 htree.o: $(srcdir)/htree.c $(srcdir)/debugfs.h \
    197  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
    198  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
    199  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
    200  $(top_builddir)/lib/ext2fs/ext2_err.h \
    201  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
    202  $(top_srcdir)/lib/e2p/e2p.h
    203 unused.o: $(srcdir)/unused.c $(srcdir)/debugfs.h \
    204  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
    205  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
    206  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
    207  $(top_builddir)/lib/ext2fs/ext2_err.h \
    208  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h
    209