2 # Standard e2fsprogs prologue....
6 top_srcdir
= @top_srcdir@
11 LDFLAG_STATIC
= @LDFLAG_STATIC@
16 TEST_PROGS
= test_extent
19 RESIZE_OBJS
= extent.o resize2fs.o main.o sim_progress.o
21 TEST_EXTENT_OBJS
= extent.o test_extent.o
23 SRCS
= $(srcdir)/extent.c \
24 $(srcdir)/resize2fs.c \
26 $(srcdir)/sim_progress.c
28 LIBS
= $(LIBEXT2FS
) $(LIBCOM_ERR
) $(LIBINTL
)
29 DEPLIBS
= $(LIBEXT2FS
) $(LIBCOM_ERR
)
31 STATIC_LIBS
= $(STATIC_LIBEXT2FS
) $(STATIC_LIBCOM_ERR
) $(LIBINTL
)
32 STATIC_DEPLIBS
= $(STATIC_LIBEXT2FS
) $(STATIC_LIBCOM_ERR
)
35 $(CC
) -c
$(ALL_CFLAGS
) $< -o
$@
37 all:: $(PROGS
) $(TEST_PROGS
) $(MANPAGES
)
39 resize2fs
: $(RESIZE_OBJS
) $(DEPLIBS
)
40 $(CC
) $(ALL_LDFLAGS
) -o resize2fs
$(RESIZE_OBJS
) $(LIBS
)
42 resize2fs.static
: $(RESIZE_OBJS
) $(STATIC_DEPLIBS
)
43 $(LD
) $(ALL_LDFLAGS
) $(LDFLAG_STATIC
) -o resize2fs.static \
44 $(RESIZE_OBJS
) $(STATIC_LIBS
)
46 resize2fs
.8: $(DEP_SUBSTITUTE
) $(srcdir)/resize2fs
.8.in
47 $(SUBSTITUTE_UPTIME
) $(srcdir)/resize2fs
.8.in resize2fs
.8
49 test_extent
: $(TEST_EXTENT_OBJS
)
50 $(CC
) $(ALL_LDFLAGS
) -o test_extent
$(TEST_EXTENT_OBJS
) $(LIBS
)
53 $(top_srcdir
)/mkinstalldirs
$(DESTDIR
)$(root_sbindir
) \
56 install: $(PROGS
) $(MANPAGES
) installdirs
57 for i in
$(PROGS
); do \
58 $(INSTALL_PROGRAM
) $$i $(DESTDIR
)$(root_sbindir
)/$$i; \
59 $(STRIP
) $(DESTDIR
)$(root_sbindir
)/$$i; \
61 for i in
$(MANPAGES
); do \
62 for j in
$(COMPRESS_EXT
); do \
63 $(RM
) -f
$(DESTDIR
)$(man8dir)/$$i.
$$j; \
65 $(INSTALL_DATA
) $$i $(DESTDIR
)$(man8dir)/$$i; \
69 for i in
$(PROGS
); do \
70 $(RM
) -f
$(DESTDIR
)$(root_sbindir
)/$$i; \
72 for i in
$(MANPAGES
); do \
73 $(RM
) -f
$(DESTDIR
)$(man8dir)/$$i; \
76 test_extent.out
: test_extent
$(srcdir)/test_extent.in
77 LD_LIBRARY_PATH
=$(LIB
) DYLD_LIBRARY_PATH
=$(LIB
) .
/test_extent
< $(srcdir)/test_extent.in \
80 check:: test_extent.out
81 @if cmp
-s test_extent.out
$(srcdir)/test_extent.in
; then \
82 echo
"Test succeeded." ; \
84 echo
"Test failed!" ; \
85 diff test_extent.out
$(srcdir)/test_extent.in
; \
90 $(RM
) -f
$(PROGS
) $(TEST_PROGS
) $(MANPAGES
) \
#* *.s *.o *.a *~ core \
91 resize2fs.static test_extent.out
96 $(RM
) -f .depend Makefile
$(srcdir)/TAGS
$(srcdir)/Makefile.in.old
99 # Kludge to create a "special" e2fsprogs distribution file.
102 SRCROOT
= `echo e2fsprogs-@E2FSPROGS_VERSION@ | sed -e 's/-WIP//' \
103 -e 's/pre-//' -e 's/-PLUS//'`
106 $(top_srcdir
)/.exclude-file
:
108 (cd
$(top_srcdir
)/..
; find e2fsprogs \
( -name \
*~
-o
-name \
*.orig \
109 -o
-name CVS
-o
-name \
*.rej \
) -print) \
110 | sed
-e
"s/e2fsprogs/$$a/" > $(top_srcdir
)/.exclude-file
111 echo
"$(SRCROOT)/build" >> $(top_srcdir
)/.exclude-file
112 echo
"$(SRCROOT)/rpm.log" >> $(top_srcdir
)/.exclude-file
113 echo
"$(SRCROOT)/powerquest" >> $(top_srcdir
)/.exclude-file
114 echo
"$(SRCROOT)/.exclude-file" >> $(top_srcdir
)/.exclude-file
115 echo
$(SRCROOT
)/e2fsprogs-@E2FSPROGS_VERSION@.
tar.gz \
116 >> $(top_srcdir
)/.exclude-file
117 echo
$(SRCROOT
)/e2fsprogs-ALL-@E2FSPROGS_VERSION@.
tar.gz \
118 >> $(top_srcdir
)/.exclude-file
120 source_tar_file
: $(top_srcdir
)/.exclude-file
121 (cd
$(top_srcdir
)/..
; a
=$(SRCROOT
); rm -f
$$a ; ln
-sf e2fsprogs
$$a ; \
122 $(TAR
) -c
-h
-v
-f
- \
123 -X
$$a/.exclude-file
$$a | \
124 gzip
-9 > e2fsprogs-ALL-@E2FSPROGS_VERSION@.
tar.gz
)
125 rm -f
$(top_srcdir
)/.exclude-file
127 # +++ Dependency line eater +++
129 # Makefile dependencies follow. This must be the last section in
130 # the Makefile.in file
132 extent.o
: $(srcdir)/extent.c
$(srcdir)/resize2fs.h \
133 $(top_srcdir
)/lib
/ext2fs
/ext2_fs.h
$(top_builddir
)/lib
/ext2fs
/ext2_types.h \
134 $(top_srcdir
)/lib
/ext2fs
/ext2fs.h
$(top_srcdir
)/lib
/et
/com_err.h \
135 $(top_srcdir
)/lib
/ext2fs
/ext2_io.h
$(top_builddir
)/lib
/ext2fs
/ext2_err.h \
136 $(top_srcdir
)/lib
/ext2fs
/bitops.h
137 resize2fs.o
: $(srcdir)/resize2fs.c
$(srcdir)/resize2fs.h \
138 $(top_srcdir
)/lib
/ext2fs
/ext2_fs.h
$(top_builddir
)/lib
/ext2fs
/ext2_types.h \
139 $(top_srcdir
)/lib
/ext2fs
/ext2fs.h
$(top_srcdir
)/lib
/et
/com_err.h \
140 $(top_srcdir
)/lib
/ext2fs
/ext2_io.h
$(top_builddir
)/lib
/ext2fs
/ext2_err.h \
141 $(top_srcdir
)/lib
/ext2fs
/bitops.h
142 main.o
: $(srcdir)/main.c
$(srcdir)/resize2fs.h \
143 $(top_srcdir
)/lib
/ext2fs
/ext2_fs.h
$(top_builddir
)/lib
/ext2fs
/ext2_types.h \
144 $(top_srcdir
)/lib
/ext2fs
/ext2fs.h
$(top_srcdir
)/lib
/et
/com_err.h \
145 $(top_srcdir
)/lib
/ext2fs
/ext2_io.h
$(top_builddir
)/lib
/ext2fs
/ext2_err.h \
146 $(top_srcdir
)/lib
/ext2fs
/bitops.h
$(top_srcdir
)/version.h
147 sim_progress.o
: $(srcdir)/sim_progress.c
$(srcdir)/resize2fs.h \
148 $(top_srcdir
)/lib
/ext2fs
/ext2_fs.h
$(top_builddir
)/lib
/ext2fs
/ext2_types.h \
149 $(top_srcdir
)/lib
/ext2fs
/ext2fs.h
$(top_srcdir
)/lib
/et
/com_err.h \
150 $(top_srcdir
)/lib
/ext2fs
/ext2_io.h
$(top_builddir
)/lib
/ext2fs
/ext2_err.h \
151 $(top_srcdir
)/lib
/ext2fs
/bitops.h