Whamcloud - gitweb
Many files:
[tools/e2fsprogs.git] / misc / 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 = misc
10 INSTALL = @INSTALL@
11
12 @MCONFIG@
13
14 SPROGS=         mke2fs badblocks tune2fs dumpe2fs e2label @FSCK_PROG@
15 USPROGS=        mklost+found
16 SMANPAGES=      tune2fs.8 mklost+found.8 mke2fs.8 dumpe2fs.8 badblocks.8 \
17                         @FSCK_MAN@
18
19 UPROGS=         chattr lsattr
20 UMANPAGES=      chattr.1 lsattr.1
21
22 TUNE2FS_OBJS=   tune2fs.o
23 MKLPF_OBJS=     mklost+found.o
24 MKE2FS_OBJS=    mke2fs.o
25 CHATTR_OBJS=    chattr.o
26 LSATTR_OBJS=    lsattr.o
27 DUMPE2FS_OBJS=  dumpe2fs.o
28 BADBLOCKS_OBJS= badblocks.o
29 E2LABEL_OBJS=   e2label.o
30 FSCK_OBJS=      fsck.o
31
32 SRCS=   $(srcdir)/tune2fs.c $(srcdir)/mklost+found.c $(srcdir)/mke2fs.c \
33                 $(srcdir)/chattr.c $(srcdir)/lsattr.c $(srcdir)/dumpe2fs.c \
34                 $(srcdir)/badblocks.c $(srcdir)/fsck.c
35
36 LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) 
37 DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR) 
38
39 STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) 
40 STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) 
41
42 LIBS_E2P= $(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR) 
43 DEPLIBS_E2P= $(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR) 
44
45 .c.o:
46         $(CC) -c $(ALL_CFLAGS) $< -o $@
47
48 all:: $(SPROGS) $(UPROGS) $(USPROGS) $(SMANPAGES) $(UMANPAGES)
49
50 tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS_E2P) $(LIBUUID)
51         $(CC) $(ALL_LDFLAGS) -o tune2fs $(TUNE2FS_OBJS) $(LIBS_E2P) $(LIBUUID)
52
53 e2label: $(E2LABEL_OBJS) 
54         $(CC) $(ALL_LDFLAGS) -o e2label $(E2LABEL_OBJS) 
55
56 mklost+found: $(MKLPF_OBJS)
57         $(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS)
58
59 mke2fs: $(MKE2FS_OBJS) $(DEPLIBS) $(LIBUUID)
60         $(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS) $(LIBUUID)
61
62 mke2fs.static: $(MKE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBUUID)
63         $(CC) $(ALL_LDFLAGS) -static -o mke2fs.static $(MKE2FS_OBJS) \
64                 $(STATIC_LIBS) $(STATIC_LIBUUID)
65
66 resize2fs: resize2fs.o $(DEPLIBS)
67         $(CC) $(ALL_LDFLAGS) -o resize2fs resize2fs.o $(LIBS)
68
69 chattr: $(CHATTR_OBJS) $(DEPLIBS_E2P)
70         $(CC) $(ALL_LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS_E2P)
71
72 lsattr: $(LSATTR_OBJS) $(DEPLIBS_E2P)
73         $(CC) $(ALL_LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS_E2P)
74
75 dumpe2fs: $(DUMPE2FS_OBJS) $(DEPLIBS_E2P)
76         $(CC) $(ALL_LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS_E2P)
77
78 fsck: $(FSCK_OBJS)
79         $(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS)
80
81 badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS)
82         $(CC) $(ALL_LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS)
83
84 tune2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/tune2fs.8.in
85         $(SUBSTITUTE) $(srcdir)/tune2fs.8.in tune2fs.8
86
87 mklost+found.8: $(DEP_SUBSTITUTE) $(srcdir)/mklost+found.8.in
88         $(SUBSTITUTE) $(srcdir)/mklost+found.8.in mklost+found.8
89
90 mke2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/mke2fs.8.in
91         $(SUBSTITUTE) $(srcdir)/mke2fs.8.in mke2fs.8
92
93 dumpe2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/dumpe2fs.8.in 
94         $(SUBSTITUTE) $(srcdir)/dumpe2fs.8.in dumpe2fs.8
95
96 badblocks.8: $(DEP_SUBSTITUTE) $(srcdir)/badblocks.8.in
97         $(SUBSTITUTE) $(srcdir)/badblocks.8.in badblocks.8      
98
99 fsck.8: $(DEP_SUBSTITUTE) $(srcdir)/fsck.8.in
100         $(SUBSTITUTE) $(srcdir)/fsck.8.in fsck.8 
101
102 chattr.1: $(DEP_SUBSTITUTE) $(srcdir)/chattr.1.in
103         $(SUBSTITUTE) $(srcdir)/chattr.1.in chattr.1 
104
105 lsattr.1: $(DEP_SUBSTITUTE) $(srcdir)/lsattr.1.in 
106         $(SUBSTITUTE) $(srcdir)/lsattr.1.in lsattr.1 
107
108 installdirs:
109         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) \
110                 $(DESTDIR)$(ubindir) $(DESTDIR)$(man1dir) \
111                 $(DESTDIR)$(cat1dir) $(DESTDIR)$(man8dir) $(DESTDIR)$(cat8dir)
112
113 install: all $(SMANPAGES) $(UMANPAGES) installdirs
114         for i in $(SPROGS); do \
115                 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \
116                 $(STRIP) $(DESTDIR)$(sbindir)/$$i; \
117         done
118         for i in $(USPROGS); do \
119                 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(usbindir)/$$i; \
120                 $(STRIP) $(DESTDIR)$(usbindir)/$$i; \
121         done
122         $(LN) -f $(DESTDIR)$(sbindir)/mke2fs $(DESTDIR)$(sbindir)/mkfs.ext2
123         for i in $(UPROGS); do \
124                 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(ubindir)/$$i; \
125                 $(STRIP) $(DESTDIR)$(ubindir)/$$i; \
126         done
127         for i in $(SMANPAGES); do \
128                 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
129         done
130         for i in $(UMANPAGES); do \
131                 $(INSTALL_DATA) $$i $(DESTDIR)$(man1dir)/$$i; \
132         done
133
134 uninstall:
135         for i in $(SPROGS); do \
136                 $(RM) -f $(sbindir)/$$i; \
137         done
138         for i in $(USPROGS); do \
139                 $(RM) -f $(usbindir)/$$i; \
140         done
141         $(RM) -f $(sbindir)/mkfs.ext2
142         for i in $(UPROGS); do \
143                 $(RM) -f $(ubindir)/$$i; \
144         done
145         for i in $(SMANPAGES); do \
146                 $(RM) -f $(man8dir)/$$i; \
147         done
148         for i in $(UMANPAGES); do \
149                 $(RM) -f $(man1dir)/$$i; \
150         done
151
152 clean:
153         $(RM) -f $(SPROGS) $(USPROGS) $(UPROGS) $(UMANPAGES) $(SMANPAGES) \
154                 mke2fs.static \#* *.s *.o *.a *~ core
155
156 mostlyclean: clean
157 distclean: clean
158         $(RM) -f .depend Makefile
159
160 # +++ Dependency line eater +++
161
162 # Makefile dependencies follow.  This must be the last section in
163 # the Makefile.in file
164 #
165 tune2fs.o: $(srcdir)/tune2fs.c $(top_srcdir)/lib/ext2fs/ext2fs.h \
166  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/io.h \
167  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
168  $(top_srcdir)/lib/uuid/uuid.h $(top_srcdir)/lib/e2p/e2p.h \
169  $(srcdir)/../version.h
170 mklost+found.o: $(srcdir)/mklost+found.c $(srcdir)/../version.h
171 mke2fs.o: $(srcdir)/mke2fs.c $(top_srcdir)/lib/et/com_err.h \
172  $(top_srcdir)/lib/uuid/uuid.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
173  $(top_srcdir)/lib/ext2fs/io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
174  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/../version.h
175 chattr.o: $(srcdir)/chattr.c $(top_srcdir)/lib/et/com_err.h \
176  $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/../version.h
177 lsattr.o: $(srcdir)/lsattr.c $(top_srcdir)/lib/et/com_err.h \
178  $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/../version.h
179 dumpe2fs.o: $(srcdir)/dumpe2fs.c $(top_srcdir)/lib/ext2fs/ext2fs.h \
180  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/io.h \
181  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
182  $(top_srcdir)/lib/e2p/e2p.h $(srcdir)/../version.h
183 badblocks.o: $(srcdir)/badblocks.c $(top_srcdir)/lib/et/com_err.h \
184  $(top_srcdir)/lib/ext2fs/io.h
185 fsck.o: $(srcdir)/fsck.c $(srcdir)/../version.h $(srcdir)/fsck.h