2 # Standard e2fsprogs prologue....
6 top_srcdir
= @top_srcdir@
15 TEST_PROGS
= test_extent
18 RESIZE_OBJS
= extent.o ext2_block_move.o ext2_inode_move.o resize2fs.o \
21 TEST_EXTENT_OBJS
= extent.o test_extent.o
23 SRCS
= $(srcdir)/extent.c \
24 $(srcdir)/ext2_block_move.c \
25 $(srcdir)/ext2_inode_move.c \
26 $(srcdir)/resize2fs.c \
28 $(srcdir)/sim_progress.c
30 LIBS
= $(LIBEXT2FS
) $(LIBCOM_ERR
) $(LIBUUID
)
31 DEPLIBS
= $(LIBEXT2FS
) $(LIBCOM_ERR
) $(LIBUUID
)
34 $(CC
) -c
$(ALL_CFLAGS
) $< -o
$@
36 all:: $(PROGS
) $(TEST_PROGS
) $(MANPAGES
)
38 resize2fs
: $(RESIZE_OBJS
) $(DEPLIBS
)
39 $(CC
) $(ALL_LDFLAGS
) -o resize2fs
$(RESIZE_OBJS
) $(LIBS
)
41 resize2fs
.8: $(SUBSTITUTE
) $(srcdir)/resize2fs
.8.in
42 -$(CHMOD
) +x
$(SUBSTITUTE
)
43 $(SUBSTITUTE
) $(srcdir)/resize2fs
.8.in resize2fs
.8
45 test_extent
: $(TEST_EXTENT_OBJS
)
46 $(CC
) $(ALL_LDFLAGS
) -o test_extent
$(TEST_EXTENT_OBJS
) $(LIBS
)
49 $(top_srcdir
)/mkinstalldirs
$(DESTDIR
)$(usbindir
) \
50 $(DESTDIR
)$(man8dir) $(DESTDIR
)$(cat8dir
)
52 install: $(PROGS
) $(MANPAGES
) installdirs
53 for i in
$(PROGS
); do \
54 $(INSTALL_PROGRAM
) $$i $(DESTDIR
)$(usbindir
)/$$i; \
55 $(STRIP
) $(DESTDIR
)$(usbindir
)/$$i; \
57 for i in
$(MANPAGES
); do \
58 $(INSTALL_DATA
) $$i $(DESTDIR
)$(man8dir)/$$i; \
62 for i in
$(PROGS
); do \
63 $(RM
) -f
$(usbindir
)/$$i; \
65 for i in
$(MANPAGES
); do \
66 $(RM
) -f
$(man8dir)/$$i; \
69 test_extent.out
: test_extent
$(srcdir)/test_extent.in
70 .
/test_extent
< $(srcdir)/test_extent.in
> test_extent.out
72 check: test_extent.out
73 @if cmp
-s test_extent.out
$(srcdir)/test_extent.in
; then \
74 echo
"Test succeeded." ; \
76 echo
"Test failed!" ; \
77 diff test_extent.out
$(srcdir)/test_extent.in
; \
82 $(RM
) -f
$(PROGS
) $(TEST_PROGS
) $(MANPAGES
) \
#* *.s *.o *.a *~ core \
87 $(RM
) -f .depend Makefile
90 # Kludge to create a "special" e2fsprogs distribution file.
93 SRCROOT
= `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
94 -e 's/pre-//' -e 's/-PLUS//'`
97 $(top_srcdir
)/.exclude-file
:
99 (cd
$(top_srcdir
)/..
; find e2fsprogs \
( -name \
*~
-o
-name \
*.orig \
100 -o
-name CVS
-o
-name \
*.rej \
) -print) \
101 | sed
-e
"s/e2fsprogs/$$a/" > $(top_srcdir
)/.exclude-file
102 echo
"$(SRCROOT)/build" >> $(top_srcdir
)/.exclude-file
103 echo
"$(SRCROOT)/rpm.log" >> $(top_srcdir
)/.exclude-file
104 echo
"$(SRCROOT)/.exclude-file" >> $(top_srcdir
)/.exclude-file
105 echo
$(SRCROOT
)/e2fsprogs-@E2FSPROGS_VERSION@.
tar.gz \
106 >> $(top_srcdir
)/.exclude-file
108 source_tar_file
: $(top_srcdir
)/.exclude-file
109 (cd
$(top_srcdir
)/..
; a
=$(SRCROOT
); rm -f
$$a ; ln
-sf e2fsprogs
$$a ; \
110 $(TAR
) -c
-h
-v
-f
- \
111 -X
$$a/.exclude-file
$$a | \
112 gzip
-9 > e2fsprogs-@E2FSPROGS_VERSION@.
tar.gz
)
113 rm -f
$(top_srcdir
)/.exclude-file
115 # +++ Dependency line eater +++
117 # Makefile dependencies follow. This must be the last section in
118 # the Makefile.in file
120 extent.o
: $(srcdir)/extent.c
$(srcdir)/resize2fs.h \
121 $(top_srcdir
)/lib
/ext2fs
/ext2fs.h
$(top_srcdir
)/lib
/et
/com_err.h \
122 $(top_srcdir
)/lib
/ext2fs
/io.h
$(top_builddir
)/lib
/ext2fs
/ext2_err.h \
123 $(top_srcdir
)/lib
/ext2fs
/bitops.h
124 ext2_block_move.o
: $(srcdir)/ext2_block_move.c
$(srcdir)/resize2fs.h \
125 $(top_srcdir
)/lib
/ext2fs
/ext2fs.h
$(top_srcdir
)/lib
/et
/com_err.h \
126 $(top_srcdir
)/lib
/ext2fs
/io.h
$(top_builddir
)/lib
/ext2fs
/ext2_err.h \
127 $(top_srcdir
)/lib
/ext2fs
/bitops.h
128 ext2_inode_move.o
: $(srcdir)/ext2_inode_move.c
$(srcdir)/resize2fs.h \
129 $(top_srcdir
)/lib
/ext2fs
/ext2fs.h
$(top_srcdir
)/lib
/et
/com_err.h \
130 $(top_srcdir
)/lib
/ext2fs
/io.h
$(top_builddir
)/lib
/ext2fs
/ext2_err.h \
131 $(top_srcdir
)/lib
/ext2fs
/bitops.h
132 resize2fs.o
: $(srcdir)/resize2fs.c
$(srcdir)/resize2fs.h \
133 $(top_srcdir
)/lib
/ext2fs
/ext2fs.h
$(top_srcdir
)/lib
/et
/com_err.h \
134 $(top_srcdir
)/lib
/ext2fs
/io.h
$(top_builddir
)/lib
/ext2fs
/ext2_err.h \
135 $(top_srcdir
)/lib
/ext2fs
/bitops.h
136 main.o
: $(srcdir)/main.c
$(srcdir)/resize2fs.h \
137 $(top_srcdir
)/lib
/ext2fs
/ext2fs.h
$(top_srcdir
)/lib
/et
/com_err.h \
138 $(top_srcdir
)/lib
/ext2fs
/io.h
$(top_builddir
)/lib
/ext2fs
/ext2_err.h \
139 $(top_srcdir
)/lib
/ext2fs
/bitops.h
140 sim_progress.o
: $(srcdir)/sim_progress.c
$(srcdir)/resize2fs.h \
141 $(top_srcdir
)/lib
/ext2fs
/ext2fs.h
$(top_srcdir
)/lib
/et
/com_err.h \
142 $(top_srcdir
)/lib
/ext2fs
/io.h
$(top_builddir
)/lib
/ext2fs
/ext2_err.h \
143 $(top_srcdir
)/lib
/ext2fs
/bitops.h