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