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