]>
Commit | Line | Data |
---|---|---|
50e1e10f TT |
1 | # |
2 | # Standard e2fsprogs prologue.... | |
3 | # | |
4 | ||
5 | srcdir = @srcdir@ | |
6 | top_srcdir = @top_srcdir@ | |
7 | VPATH = @srcdir@ | |
8 | top_builddir = .. | |
fc6d9d51 | 9 | my_dir = debugfs |
50e1e10f TT |
10 | INSTALL = @INSTALL@ |
11 | ||
12 | @MCONFIG@ | |
13 | ||
e88c5a33 | 14 | PROGS= debugfs rdebugfs |
50e1e10f TT |
15 | MANPAGES= debugfs.8 |
16 | ||
619dd191 | 17 | MK_CMDS= _SS_DIR_OVERRIDE=../lib/ss ../lib/ss/mk_cmds |
50e1e10f | 18 | |
c6bd0c97 | 19 | DEBUG_OBJS= debug_cmds.o debugfs.o util.o ncheck.o icheck.o ls.o \ |
c4ab66c5 TT |
20 | lsdel.o dump.o set_fields.o logdump.o htree.o unused.o e2freefrag.o \ |
21 | filefrag.o | |
50e1e10f | 22 | |
e88c5a33 | 23 | RO_DEBUG_OBJS= ro_debug_cmds.o ro_debugfs.o util.o ncheck.o icheck.o ls.o \ |
c4ab66c5 | 24 | lsdel.o logdump.o htree.o e2freefrag.o filefrag.o |
e88c5a33 | 25 | |
521e3685 | 26 | SRCS= debug_cmds.c $(srcdir)/debugfs.c $(srcdir)/util.c $(srcdir)/ls.c \ |
50e1e10f | 27 | $(srcdir)/ncheck.c $(srcdir)/icheck.c $(srcdir)/lsdel.c \ |
7dec050a | 28 | $(srcdir)/dump.c $(srcdir)/set_fields.c ${srcdir}/logdump.c \ |
c4ab66c5 TT |
29 | $(srcdir)/htree.c $(srcdir)/unused.c ${srcdir}/../misc/e2freefrag.c \ |
30 | $(srcdir)/filefrag.c | |
50e1e10f | 31 | |
3ae497ea | 32 | LIBS= $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(LIBBLKID) \ |
daf7a6e5 | 33 | $(LIBUUID) |
a6a1c081 TT |
34 | DEPLIBS= $(LIBEXT2FS) $(LIBE2P) $(DEPLIBSS) $(DEPLIBCOM_ERR) \ |
35 | $(DEPLIBBLKID) $(DEPLIBUUID) | |
50e1e10f TT |
36 | |
37 | .c.o: | |
c13351f6 TT |
38 | $(E) " CC $<" |
39 | $(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@ | |
50e1e10f | 40 | |
62c06f79 | 41 | all:: $(PROGS) $(MANPAGES) |
50e1e10f TT |
42 | |
43 | debugfs: $(DEBUG_OBJS) $(DEPLIBS) | |
c13351f6 TT |
44 | $(E) " LD $@" |
45 | $(Q) $(CC) $(ALL_LDFLAGS) -o debugfs $(DEBUG_OBJS) $(LIBS) | |
50e1e10f | 46 | |
e88c5a33 TT |
47 | rdebugfs: $(RO_DEBUG_OBJS) $(DEPLIBS) |
48 | $(E) " LD $@" | |
49 | $(Q) $(CC) $(ALL_LDFLAGS) -o rdebugfs $(RO_DEBUG_OBJS) $(LIBS) | |
50 | ||
50e1e10f | 51 | debug_cmds.c debug_cmds.h: debug_cmds.ct |
c13351f6 TT |
52 | $(E) " MK_CMDS $@" |
53 | $(Q) $(MK_CMDS) $(srcdir)/debug_cmds.ct | |
50e1e10f | 54 | |
e88c5a33 TT |
55 | ro_debug_cmds.c ro_debug_cmds.h: ro_debug_cmds.ct |
56 | $(E) " MK_CMDS $@" | |
57 | $(Q) $(MK_CMDS) $(srcdir)/ro_debug_cmds.ct | |
58 | ||
59 | ro_debugfs.o: debugfs.c | |
60 | $(E) " CC $@" | |
61 | $(Q) $(CC) -c $(ALL_CFLAGS) $< -DREAD_ONLY -o $@ | |
62 | ||
5e96c572 TT |
63 | e2freefrag.o: $(srcdir)/../misc/e2freefrag.c |
64 | $(E) " CC $@" | |
65 | $(Q) $(CC) -c $(ALL_CFLAGS) -I$(srcdir) $< -DDEBUGFS -o $@ | |
66 | ||
44339bdf | 67 | debugfs.8: $(DEP_SUBSTITUTE) $(srcdir)/debugfs.8.in |
c13351f6 TT |
68 | $(E) " SUBST $@" |
69 | $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/debugfs.8.in debugfs.8 | |
62c06f79 | 70 | |
50e1e10f | 71 | installdirs: |
c13351f6 TT |
72 | $(E) " MKINSTALLDIRS $(root_sbindir) $(man8dir)" |
73 | $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(root_sbindir) \ | |
7e44f242 | 74 | $(DESTDIR)$(man8dir) |
50e1e10f TT |
75 | |
76 | install: $(PROGS) $(MANPAGES) installdirs | |
c13351f6 | 77 | $(Q) for i in $(PROGS); do \ |
522798d3 | 78 | echo " INSTALL $(root_sbindir)/$$i"; \ |
7e44f242 | 79 | $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \ |
50e1e10f | 80 | done |
c13351f6 | 81 | $(Q) for i in $(MANPAGES); do \ |
482afc44 TT |
82 | for j in $(COMPRESS_EXT); do \ |
83 | $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \ | |
84 | done; \ | |
522798d3 | 85 | echo " INSTALL_DATA $(man8dir)/$$i"; \ |
74becf3c | 86 | $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \ |
50e1e10f TT |
87 | done |
88 | ||
522798d3 | 89 | install-strip: install |
c13351f6 | 90 | $(Q) for i in $(PROGS); do \ |
522798d3 TT |
91 | echo " STRIP $(root_sbindir)/$$i"; \ |
92 | $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \ | |
93 | done | |
94 | ||
50e1e10f TT |
95 | uninstall: |
96 | for i in $(PROGS); do \ | |
7e44f242 | 97 | $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \ |
50e1e10f TT |
98 | done |
99 | for i in $(MANPAGES); do \ | |
7e44f242 | 100 | $(RM) -f $(DESTDIR)$(man8dir)/$$i; \ |
50e1e10f TT |
101 | done |
102 | ||
103 | clean: | |
e88c5a33 TT |
104 | $(RM) -f $(PROGS) debugfs.8 \#* *.s *.o *.a *~ debug_cmds.c \ |
105 | ro_debug_cmds.c core | |
62c06f79 | 106 | |
50e1e10f TT |
107 | mostlyclean: clean |
108 | distclean: clean | |
5c36a2f8 TT |
109 | $(RM) -f debug_cmds.c .depend Makefile $(srcdir)/TAGS \ |
110 | $(srcdir)/Makefile.in.old | |
50e1e10f TT |
111 | |
112 | # +++ Dependency line eater +++ | |
113 | # | |
114 | # Makefile dependencies follow. This must be the last section in | |
115 | # the Makefile.in file | |
116 | # | |
96b5cacc | 117 | debug_cmds.o: debug_cmds.c $(top_srcdir)/lib/ss/ss.h \ |
a2146af2 | 118 | $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h |
62c06f79 | 119 | debugfs.o: $(srcdir)/debugfs.c $(top_srcdir)/lib/et/com_err.h \ |
d3aea7dc | 120 | $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \ |
e1f08507 TT |
121 | $(srcdir)/debugfs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \ |
122 | $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \ | |
123 | $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ | |
124 | $(top_builddir)/lib/ext2fs/ext2_err.h \ | |
125 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \ | |
126 | $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.h $(srcdir)/jfs_user.h \ | |
127 | $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \ | |
128 | $(top_srcdir)/lib/ext2fs/kernel-list.h | |
dba838b0 | 129 | util.o: $(srcdir)/util.c $(srcdir)/debugfs.h \ |
797f5ef1 | 130 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ |
e1f08507 | 131 | $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ |
0e8a9560 | 132 | $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ |
e1f08507 TT |
133 | $(top_builddir)/lib/ext2fs/ext2_err.h \ |
134 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h | |
75e93ab0 TT |
135 | ls.o: $(srcdir)/ls.c $(srcdir)/debugfs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \ |
136 | $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \ | |
e1f08507 | 137 | $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \ |
797f5ef1 | 138 | $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ |
e1f08507 | 139 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h |
75e93ab0 TT |
140 | ncheck.o: $(srcdir)/ncheck.c $(srcdir)/debugfs.h \ |
141 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ | |
e1f08507 | 142 | $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ |
75e93ab0 | 143 | $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ |
e1f08507 TT |
144 | $(top_builddir)/lib/ext2fs/ext2_err.h \ |
145 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h | |
62c06f79 | 146 | icheck.o: $(srcdir)/icheck.c $(srcdir)/debugfs.h \ |
797f5ef1 | 147 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ |
e1f08507 | 148 | $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ |
75e93ab0 | 149 | $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ |
e1f08507 TT |
150 | $(top_builddir)/lib/ext2fs/ext2_err.h \ |
151 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h | |
62c06f79 | 152 | lsdel.o: $(srcdir)/lsdel.c $(srcdir)/debugfs.h \ |
797f5ef1 | 153 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ |
e1f08507 | 154 | $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ |
75e93ab0 | 155 | $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ |
e1f08507 TT |
156 | $(top_builddir)/lib/ext2fs/ext2_err.h \ |
157 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h | |
62c06f79 | 158 | dump.o: $(srcdir)/dump.c $(srcdir)/debugfs.h \ |
797f5ef1 | 159 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ |
e1f08507 | 160 | $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ |
75e93ab0 | 161 | $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ |
e1f08507 TT |
162 | $(top_builddir)/lib/ext2fs/ext2_err.h \ |
163 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h | |
7dec050a | 164 | set_fields.o: $(srcdir)/set_fields.c $(srcdir)/debugfs.h \ |
797f5ef1 | 165 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ |
e1f08507 | 166 | $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ |
75e93ab0 | 167 | $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ |
e1f08507 TT |
168 | $(top_builddir)/lib/ext2fs/ext2_err.h \ |
169 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \ | |
170 | $(top_srcdir)/lib/e2p/e2p.h | |
96b5cacc TT |
171 | logdump.o: $(srcdir)/logdump.c $(srcdir)/debugfs.h \ |
172 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ | |
e1f08507 | 173 | $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ |
75e93ab0 | 174 | $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ |
e1f08507 TT |
175 | $(top_builddir)/lib/ext2fs/ext2_err.h \ |
176 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \ | |
75e93ab0 | 177 | $(srcdir)/jfs_user.h $(top_srcdir)/lib/ext2fs/kernel-jbd.h \ |
e1f08507 | 178 | $(top_srcdir)/lib/ext2fs/jfs_compat.h $(top_srcdir)/lib/ext2fs/kernel-list.h |
7380ac90 TT |
179 | htree.o: $(srcdir)/htree.c $(srcdir)/debugfs.h \ |
180 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ | |
e1f08507 | 181 | $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ |
75e93ab0 | 182 | $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ |
e1f08507 TT |
183 | $(top_builddir)/lib/ext2fs/ext2_err.h \ |
184 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \ | |
185 | $(top_srcdir)/lib/e2p/e2p.h | |
75e93ab0 TT |
186 | unused.o: $(srcdir)/unused.c $(srcdir)/debugfs.h \ |
187 | $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ | |
e1f08507 | 188 | $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ |
75e93ab0 | 189 | $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ |
e1f08507 TT |
190 | $(top_builddir)/lib/ext2fs/ext2_err.h \ |
191 | $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h |