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