Whamcloud - gitweb
Makefile.in:
[tools/e2fsprogs.git] / resize / 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 = resize
10 INSTALL = @INSTALL@
11 LDFLAG_STATIC = @LDFLAG_STATIC@
12
13 @MCONFIG@
14
15 PROGS=          resize2fs
16 TEST_PROGS=     test_extent
17 MANPAGES=       resize2fs.8
18
19 RESIZE_OBJS= extent.o resize2fs.o main.o sim_progress.o 
20
21 TEST_EXTENT_OBJS= extent.o test_extent.o
22
23 SRCS= $(srcdir)/extent.c \
24         $(srcdir)/resize2fs.c \
25         $(srcdir)/main.c \
26         $(srcdir)/sim_progress.c
27
28 LIBS= $(LIBEXT2FS) $(LIBCOM_ERR)  
29 DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
30
31 STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) 
32 STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) 
33
34 .c.o:
35         $(CC) -c $(ALL_CFLAGS) $< -o $@
36
37 all:: $(PROGS) $(TEST_PROGS) $(MANPAGES) resize2fs.static
38
39 resize2fs: $(RESIZE_OBJS) $(DEPLIBS)
40         $(CC) $(ALL_LDFLAGS) -o resize2fs $(RESIZE_OBJS) $(LIBS)
41
42 resize2fs.static: $(RESIZE_OBJS)  $(STATIC_DEPLIBS)
43         $(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o resize2fs.static \
44                 $(RESIZE_OBJS) $(STATIC_LIBS) 
45
46 resize2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/resize2fs.8.in
47         $(SUBSTITUTE) $(srcdir)/resize2fs.8.in resize2fs.8
48
49 test_extent: $(TEST_EXTENT_OBJS)
50         $(CC) $(ALL_LDFLAGS) -o test_extent $(TEST_EXTENT_OBJS) $(LIBS)
51         
52 installdirs:
53         $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) \
54                 $(DESTDIR)$(man8dir)
55
56 install: $(PROGS) $(MANPAGES) installdirs
57         for i in $(PROGS); do \
58                 $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \
59                 $(STRIP) $(DESTDIR)$(sbindir)/$$i; \
60         done
61         for i in $(MANPAGES); do \
62                 $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
63         done
64
65 uninstall:
66         for i in $(PROGS); do \
67                 $(RM) -f $(DESTDIR)$(sbindir)/$$i; \
68         done
69         for i in $(MANPAGES); do \
70                 $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
71         done
72
73 test_extent.out: test_extent $(srcdir)/test_extent.in
74         ./test_extent < $(srcdir)/test_extent.in > test_extent.out
75
76 check: test_extent.out
77         @if cmp -s test_extent.out $(srcdir)/test_extent.in ; then \
78                 echo "Test succeeded." ; \
79         else \
80                 echo "Test failed!" ; \
81                 diff test_extent.out $(srcdir)/test_extent.in ; \
82                 exit 1 ; \
83         fi
84         
85 clean:
86         $(RM) -f $(PROGS) $(TEST_PROGS) $(MANPAGES) \#* *.s *.o *.a *~ core \
87                 test_extent.out
88
89 mostlyclean: clean
90 distclean: clean
91         $(RM) -f .depend Makefile
92
93 #
94 # Kludge to create a "special" e2fsprogs distribution file.
95 #
96
97 SRCROOT = `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
98                         -e 's/pre-//' -e 's/-PLUS//'`
99 TAR=tar
100
101 $(top_srcdir)/.exclude-file:
102         a=$(SRCROOT); \
103         (cd $(top_srcdir)/.. ; find e2fsprogs \( -name \*~ -o -name \*.orig \
104                 -o -name CVS -o -name \*.rej \) -print) \
105                 | sed -e "s/e2fsprogs/$$a/" > $(top_srcdir)/.exclude-file
106         echo "$(SRCROOT)/build" >> $(top_srcdir)/.exclude-file
107         echo "$(SRCROOT)/rpm.log" >> $(top_srcdir)/.exclude-file
108         echo "$(SRCROOT)/powerquest" >> $(top_srcdir)/.exclude-file
109         echo "$(SRCROOT)/.exclude-file" >> $(top_srcdir)/.exclude-file
110         echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
111                 >> $(top_srcdir)/.exclude-file
112         echo $(SRCROOT)/e2fsprogs-ALL-@E2FSPROGS_VERSION@.tar.gz \
113                 >> $(top_srcdir)/.exclude-file
114         
115 source_tar_file: $(top_srcdir)/.exclude-file
116         (cd $(top_srcdir)/..; a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
117                 $(TAR) -c -h -v -f - \
118                         -X $$a/.exclude-file $$a | \
119                 gzip -9 > e2fsprogs-ALL-@E2FSPROGS_VERSION@.tar.gz)
120         rm -f $(top_srcdir)/.exclude-file
121
122 # +++ Dependency line eater +++
123
124 # Makefile dependencies follow.  This must be the last section in
125 # the Makefile.in file
126 #
127 extent.o: $(srcdir)/extent.c $(srcdir)/resize2fs.h \
128  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
129  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
130  $(top_srcdir)/lib/ext2fs/bitops.h
131 resize2fs.o: $(srcdir)/resize2fs.c $(srcdir)/resize2fs.h \
132  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
133  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
134  $(top_srcdir)/lib/ext2fs/bitops.h
135 main.o: $(srcdir)/main.c $(srcdir)/resize2fs.h \
136  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
137  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
138  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/version.h
139 sim_progress.o: $(srcdir)/sim_progress.c $(srcdir)/resize2fs.h \
140  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
141  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
142  $(top_srcdir)/lib/ext2fs/bitops.h