blob: 7cb8ceaabbd35147230add27b9c1c1ab2f0831cb [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@
11
12@MCONFIG@
13
14PROGS= debugfs
15MANPAGES= debugfs.8
16
17MK_CMDS= ../lib/ss/mk_cmds
18
Theodore Ts'o521e3681997-04-29 17:48:10 +000019DEBUG_OBJS= debug_cmds.o debugfs.o util.o ncheck.o icheck.o ls.o lsdel.o dump.o
Theodore Ts'o50e1e101997-04-26 13:58:21 +000020
Theodore Ts'o521e3681997-04-29 17:48:10 +000021SRCS= debug_cmds.c $(srcdir)/debugfs.c $(srcdir)/util.c $(srcdir)/ls.c \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000022 $(srcdir)/ncheck.c $(srcdir)/icheck.c $(srcdir)/lsdel.c \
23 $(srcdir)/dump.c
24
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +000025LIBS= $(LIBEXT2FS) $(LIBSS) $(LIBCOM_ERR) $(LIBUUID)
26DEPLIBS= $(LIBEXT2FS) $(LIBSS) $(LIBCOM_ERR) $(LIBUUID)
Theodore Ts'o50e1e101997-04-26 13:58:21 +000027
28.c.o:
Theodore Ts'o74becf31997-04-26 14:37:06 +000029 $(CC) -c $(ALL_CFLAGS) $< -o $@
Theodore Ts'o50e1e101997-04-26 13:58:21 +000030
Theodore Ts'o62c06f71997-04-29 14:34:47 +000031all:: $(PROGS) $(MANPAGES)
Theodore Ts'o50e1e101997-04-26 13:58:21 +000032
33debugfs: $(DEBUG_OBJS) $(DEPLIBS)
Theodore Ts'o74becf31997-04-26 14:37:06 +000034 $(CC) $(ALL_LDFLAGS) -o debugfs $(DEBUG_OBJS) $(LIBS)
Theodore Ts'o50e1e101997-04-26 13:58:21 +000035
36debug_cmds.c debug_cmds.h: debug_cmds.ct
37 $(MK_CMDS) $(srcdir)/debug_cmds.ct
38
Theodore Ts'o62c06f71997-04-29 14:34:47 +000039debugfs.8: $(SUBSTITUTE) $(srcdir)/debugfs.8.in
40 -$(CHMOD) +x $(SUBSTITUTE)
41 $(SUBSTITUTE) $(srcdir)/debugfs.8.in debugfs.8
42
Theodore Ts'o50e1e101997-04-26 13:58:21 +000043installdirs:
44 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(usbindir) \
45 $(DESTDIR)$(man8dir) $(DESTDIR)$(cat8dir)
46
47install: $(PROGS) $(MANPAGES) installdirs
48 for i in $(PROGS); do \
49 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(usbindir)/$$i; \
50 $(STRIP) $(DESTDIR)$(usbindir)/$$i; \
51 done
52 for i in $(MANPAGES); do \
Theodore Ts'o74becf31997-04-26 14:37:06 +000053 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
Theodore Ts'o50e1e101997-04-26 13:58:21 +000054 done
55
56uninstall:
57 for i in $(PROGS); do \
58 $(RM) -f $(usbindir)/$$i; \
59 done
60 for i in $(MANPAGES); do \
61 $(RM) -f $(man8dir)/$$i; \
62 done
63
64clean:
Theodore Ts'o62c06f71997-04-29 14:34:47 +000065 $(RM) -f debugfs debugfs.8 \#* *.s *.o *.a *~ debug_cmds.c core
66
Theodore Ts'o50e1e101997-04-26 13:58:21 +000067mostlyclean: clean
68distclean: clean
69 $(RM) -f debug_cmds.c .depend Makefile
70
71# +++ Dependency line eater +++
72#
73# Makefile dependencies follow. This must be the last section in
74# the Makefile.in file
75#
Theodore Ts'o21c84b71997-04-29 16:15:03 +000076debug_cmds.o: debug_cmds.c $(top_srcdir)/lib/ss/ss.h \
77 $(top_srcdir)/lib/ss/copyright.h $(top_builddir)/lib/ss/ss_err.h
Theodore Ts'o62c06f71997-04-29 14:34:47 +000078debugfs.o: $(srcdir)/debugfs.c $(top_srcdir)/lib/et/com_err.h \
79 $(top_srcdir)/lib/ss/ss.h $(top_srcdir)/lib/ss/copyright.h \
80 $(top_builddir)/lib/ss/ss_err.h $(srcdir)/debugfs.h \
Theodore Ts'ofc6d9d51997-04-29 14:51:31 +000081 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/io.h \
82 $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
83 $(top_srcdir)/lib/uuid/uuid.h
Theodore Ts'o62c06f71997-04-29 14:34:47 +000084util.o: $(srcdir)/util.c $(srcdir)/debugfs.h \
85 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
86 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
87 $(top_srcdir)/lib/ext2fs/bitops.h
Theodore Ts'o2ecc6fe1997-04-29 17:57:00 +000088ls.o: $(srcdir)/ls.c $(srcdir)/debugfs.h \
Theodore Ts'o62c06f71997-04-29 14:34:47 +000089 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
90 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
91 $(top_srcdir)/lib/ext2fs/bitops.h
Theodore Ts'o2ecc6fe1997-04-29 17:57:00 +000092ncheck.o: $(srcdir)/ncheck.c \
93 $(srcdir)/debugfs.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
94 $(top_srcdir)/lib/et/com_err.h \
95 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
96 $(top_srcdir)/lib/ext2fs/bitops.h
Theodore Ts'o62c06f71997-04-29 14:34:47 +000097icheck.o: $(srcdir)/icheck.c $(srcdir)/debugfs.h \
98 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
99 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
100 $(top_srcdir)/lib/ext2fs/bitops.h
101lsdel.o: $(srcdir)/lsdel.c $(srcdir)/debugfs.h \
102 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
103 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
104 $(top_srcdir)/lib/ext2fs/bitops.h
105dump.o: $(srcdir)/dump.c $(srcdir)/debugfs.h \
106 $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
107 $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
108 $(top_srcdir)/lib/ext2fs/bitops.h
Theodore Ts'o21c84b71997-04-29 16:15:03 +0000109