blob: cb5b90d87a82a04ba6c250fbd9aeb1414f2b1d46 [file] [log] [blame]
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001#
2# Standard e2fsprogs prologue....
3#
4
5srcdir = @srcdir@
6top_srcdir = @top_srcdir@
7VPATH = @srcdir@
8top_builddir = ..
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +00009my_dir = debugfs
Theodore Ts'o50e1e101997-04-26 13:58:21 +000010INSTALL = @INSTALL@
Theodore Ts'o3ae497e2003-03-16 06:26:25 -050011DLOPEN_LIB = @DLOPEN_LIB@
Theodore Ts'o50e1e101997-04-26 13:58:21 +000012
13@MCONFIG@
14
15PROGS= debugfs
16MANPAGES= debugfs.8
17
Theodore Ts'o619dd192000-07-04 12:37:55 +000018MK_CMDS= _SS_DIR_OVERRIDE=../lib/ss ../lib/ss/mk_cmds
Theodore Ts'o50e1e101997-04-26 13:58:21 +000019
Theodore Ts'oc6bd0c92000-08-14 20:37:09 +000020DEBUG_OBJS= debug_cmds.o debugfs.o util.o ncheck.o icheck.o ls.o \
Theodore Ts'oa5fdcd52003-05-21 17:58:36 -040021 lsdel.o dump.o setsuper.o logdump.o htree.o unused.o
Theodore Ts'o50e1e101997-04-26 13:58:21 +000022
Theodore Ts'o521e3681997-04-29 17:48:10 +000023SRCS= debug_cmds.c $(srcdir)/debugfs.c $(srcdir)/util.c $(srcdir)/ls.c \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000024 $(srcdir)/ncheck.c $(srcdir)/icheck.c $(srcdir)/lsdel.c \
Theodore Ts'odf614db2002-02-25 04:28:45 -050025 $(srcdir)/dump.c $(srcdir)/setsuper.c ${srcdir}/logdump.c \
Theodore Ts'oa5fdcd52003-05-21 17:58:36 -040026 $(srcdir)/htree.c $(srcdir)/unused.c
Theodore Ts'o50e1e101997-04-26 13:58:21 +000027
Theodore Ts'o3ae497e2003-03-16 06:26:25 -050028LIBS= $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(LIBBLKID) \
29 $(LIBUUID) $(DLOPEN_LIB)
Theodore Ts'of3640932003-03-01 19:47:44 -050030DEPLIBS= $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(LIBBLKID) $(DEPLIBUUID)
Theodore Ts'o50e1e101997-04-26 13:58:21 +000031
32.c.o:
Theodore Ts'o74becf31997-04-26 14:37:06 +000033 $(CC) -c $(ALL_CFLAGS) $< -o $@
Theodore Ts'o50e1e101997-04-26 13:58:21 +000034
Theodore Ts'o62c06f71997-04-29 14:34:47 +000035all:: $(PROGS) $(MANPAGES)
Theodore Ts'o50e1e101997-04-26 13:58:21 +000036
37debugfs: $(DEBUG_OBJS) $(DEPLIBS)
Theodore Ts'o74becf31997-04-26 14:37:06 +000038 $(CC) $(ALL_LDFLAGS) -o debugfs $(DEBUG_OBJS) $(LIBS)
Theodore Ts'o50e1e101997-04-26 13:58:21 +000039
40debug_cmds.c debug_cmds.h: debug_cmds.ct
41 $(MK_CMDS) $(srcdir)/debug_cmds.ct
42
Theodore Ts'o44339bd1997-10-15 02:47:20 +000043debugfs.8: $(DEP_SUBSTITUTE) $(srcdir)/debugfs.8.in
Theodore Ts'odd607052004-04-03 13:53:46 -050044 $(SUBSTITUTE_UPTIME) $(srcdir)/debugfs.8.in debugfs.8
Theodore Ts'o62c06f71997-04-29 14:34:47 +000045
Theodore Ts'o50e1e101997-04-26 13:58:21 +000046installdirs:
Theodore Ts'o7e44f241998-04-01 03:16:29 +000047 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(root_sbindir) \
48 $(DESTDIR)$(man8dir)
Theodore Ts'o50e1e101997-04-26 13:58:21 +000049
50install: $(PROGS) $(MANPAGES) installdirs
51 for i in $(PROGS); do \
Theodore Ts'o7e44f241998-04-01 03:16:29 +000052 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
53 $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000054 done
55 for i in $(MANPAGES); do \
Theodore Ts'o482afc42002-10-31 03:32:34 -050056 for j in $(COMPRESS_EXT); do \
57 $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
58 done; \
Theodore Ts'o74becf31997-04-26 14:37:06 +000059 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000060 done
61
62uninstall:
63 for i in $(PROGS); do \
Theodore Ts'o7e44f241998-04-01 03:16:29 +000064 $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000065 done
66 for i in $(MANPAGES); do \
Theodore Ts'o7e44f241998-04-01 03:16:29 +000067 $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000068 done
69
70clean:
Theodore Ts'o62c06f71997-04-29 14:34:47 +000071 $(RM) -f debugfs debugfs.8 \#* *.s *.o *.a *~ debug_cmds.c core
72
Theodore Ts'o50e1e101997-04-26 13:58:21 +000073mostlyclean: clean
74distclean: clean
Theodore Ts'o5c36a2f1999-11-19 18:42:30 +000075 $(RM) -f debug_cmds.c .depend Makefile $(srcdir)/TAGS \
76 $(srcdir)/Makefile.in.old
Theodore Ts'o50e1e101997-04-26 13:58:21 +000077
78# +++ Dependency line eater +++
79#
80# Makefile dependencies follow. This must be the last section in
81# the Makefile.in file
82#
Theodore Ts'o96b5cac2001-12-24 15:33:49 -050083debug_cmds.o: debug_cmds.c $(top_srcdir)/lib/ss/ss.h \
Theodore Ts'oa2146af2003-04-17 23:37:28 -040084 $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h
Theodore Ts'o62c06f71997-04-29 14:34:47 +000085debugfs.o: $(srcdir)/debugfs.c $(top_srcdir)/lib/et/com_err.h \
Theodore Ts'od3aea7d1999-09-14 20:55:37 +000086 $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
Theodore Ts'o54c637d2001-05-14 11:45:38 +000087 $(srcdir)/debugfs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
Theodore Ts'o797f5ef2001-06-01 23:49:46 +000088 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
89 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
90 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/uuid/uuid.h \
91 $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.h
Theodore Ts'odba838b1998-12-04 06:15:12 +000092util.o: $(srcdir)/util.c $(srcdir)/debugfs.h \
Theodore Ts'o797f5ef2001-06-01 23:49:46 +000093 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
Theodore Ts'o54c637d2001-05-14 11:45:38 +000094 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
95 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
96 $(top_srcdir)/lib/ext2fs/bitops.h
Theodore Ts'o797f5ef2001-06-01 23:49:46 +000097ls.o: $(srcdir)/ls.c $(srcdir)/debugfs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
98 $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
99 $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
100 $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h
Theodore Ts'odba838b1998-12-04 06:15:12 +0000101ncheck.o: $(srcdir)/ncheck.c $(srcdir)/debugfs.h \
Theodore Ts'o797f5ef2001-06-01 23:49:46 +0000102 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
103 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
104 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
105 $(top_srcdir)/lib/ext2fs/bitops.h
Theodore Ts'o62c06f71997-04-29 14:34:47 +0000106icheck.o: $(srcdir)/icheck.c $(srcdir)/debugfs.h \
Theodore Ts'o797f5ef2001-06-01 23:49:46 +0000107 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
108 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
109 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
110 $(top_srcdir)/lib/ext2fs/bitops.h
Theodore Ts'o62c06f71997-04-29 14:34:47 +0000111lsdel.o: $(srcdir)/lsdel.c $(srcdir)/debugfs.h \
Theodore Ts'o797f5ef2001-06-01 23:49:46 +0000112 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
113 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
114 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
115 $(top_srcdir)/lib/ext2fs/bitops.h
Theodore Ts'o62c06f71997-04-29 14:34:47 +0000116dump.o: $(srcdir)/dump.c $(srcdir)/debugfs.h \
Theodore Ts'o797f5ef2001-06-01 23:49:46 +0000117 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
118 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
119 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
120 $(top_srcdir)/lib/ext2fs/bitops.h
Theodore Ts'o0e8a9562000-12-09 06:41:25 +0000121setsuper.o: $(srcdir)/setsuper.c $(srcdir)/debugfs.h \
Theodore Ts'o797f5ef2001-06-01 23:49:46 +0000122 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
123 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
124 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
Theodore Ts'of606dd32002-11-08 14:31:03 -0500125 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/uuid/uuid.h \
126 $(top_srcdir)/lib/e2p/e2p.h
Theodore Ts'o96b5cac2001-12-24 15:33:49 -0500127logdump.o: $(srcdir)/logdump.c $(srcdir)/debugfs.h \
128 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
129 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
130 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
Theodore Ts'o6cca7ba2003-03-16 20:21:16 -0500131 $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/blkid/blkid.h \
132 $(top_builddir)/lib/blkid/blkid_types.h $(srcdir)/jfs_user.h \
Theodore Ts'o96b5cac2001-12-24 15:33:49 -0500133 $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
134 $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/lib/uuid/uuid.h
Theodore Ts'o7380ac92002-03-05 01:57:53 -0500135htree.o: $(srcdir)/htree.c $(srcdir)/debugfs.h \
136 $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
137 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
138 $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
139 $(top_srcdir)/lib/ext2fs/bitops.h