Whamcloud - gitweb
Add e2fsck -D option which optimizes/compresses directories.
[tools/e2fsprogs.git] / resize / Makefile.in
index 7a74866..20c747c 100644 (file)
@@ -8,6 +8,7 @@ VPATH = @srcdir@
 top_builddir = ..
 my_dir = resize
 INSTALL = @INSTALL@
+LDFLAG_STATIC = @LDFLAG_STATIC@
 
 @MCONFIG@
 
@@ -24,17 +25,24 @@ SRCS= $(srcdir)/extent.c \
        $(srcdir)/main.c \
        $(srcdir)/sim_progress.c
 
-LIBS= $(LIBEXT2FS) $(LIBCOM_ERR)  $(LIBUUID)
-DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR)  $(LIBUUID)
+LIBS= $(LIBEXT2FS) $(LIBCOM_ERR)  
+DEPLIBS= $(LIBEXT2FS) $(LIBCOM_ERR)
+
+STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) 
+STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) 
 
 .c.o:
        $(CC) -c $(ALL_CFLAGS) $< -o $@
 
-all:: $(PROGS) $(TEST_PROGS) $(MANPAGES)
+all:: $(PROGS) $(TEST_PROGS) $(MANPAGES) 
 
 resize2fs: $(RESIZE_OBJS) $(DEPLIBS)
        $(CC) $(ALL_LDFLAGS) -o resize2fs $(RESIZE_OBJS) $(LIBS)
 
+resize2fs.static: $(RESIZE_OBJS)  $(STATIC_DEPLIBS)
+       $(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o resize2fs.static \
+               $(RESIZE_OBJS) $(STATIC_LIBS) 
+
 resize2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/resize2fs.8.in
        $(SUBSTITUTE) $(srcdir)/resize2fs.8.in resize2fs.8
 
@@ -42,30 +50,32 @@ test_extent: $(TEST_EXTENT_OBJS)
        $(CC) $(ALL_LDFLAGS) -o test_extent $(TEST_EXTENT_OBJS) $(LIBS)
        
 installdirs:
-       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(usbindir) \
-               $(DESTDIR)$(man8dir) $(DESTDIR)$(cat8dir)
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(root_sbindir) \
+               $(DESTDIR)$(man8dir)
 
 install: $(PROGS) $(MANPAGES) installdirs
        for i in $(PROGS); do \
-               $(INSTALL_PROGRAM) $$i $(DESTDIR)$(usbindir)/$$i; \
-               $(STRIP) $(DESTDIR)$(usbindir)/$$i; \
+               $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \
+               $(STRIP) $(DESTDIR)$(root_sbindir)/$$i; \
        done
        for i in $(MANPAGES); do \
+               $(RM) -f $(DESTDIR)$(man8dir)/$$i.gz; \
                $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
        done
 
 uninstall:
        for i in $(PROGS); do \
-               $(RM) -f $(usbindir)/$$i; \
+               $(RM) -f $(DESTDIR)$(root_sbindir)/$$i; \
        done
        for i in $(MANPAGES); do \
-               $(RM) -f $(man8dir)/$$i; \
+               $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
        done
 
 test_extent.out: test_extent $(srcdir)/test_extent.in
-       ./test_extent < $(srcdir)/test_extent.in > test_extent.out
+       LD_LIBRARY_PATH=$(LIB) ./test_extent < $(srcdir)/test_extent.in \
+               > test_extent.out
 
-check: test_extent.out
+check:: test_extent.out
        @if cmp -s test_extent.out $(srcdir)/test_extent.in ; then \
                echo "Test succeeded." ; \
        else \
@@ -76,11 +86,12 @@ check: test_extent.out
        
 clean:
        $(RM) -f $(PROGS) $(TEST_PROGS) $(MANPAGES) \#* *.s *.o *.a *~ core \
-               test_extent.out
+               resize2fs.static test_extent.out
 
 mostlyclean: clean
+
 distclean: clean
-       $(RM) -f .depend Makefile
+       $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
 
 #
 # Kludge to create a "special" e2fsprogs distribution file.
@@ -97,15 +108,18 @@ $(top_srcdir)/.exclude-file:
                | sed -e "s/e2fsprogs/$$a/" > $(top_srcdir)/.exclude-file
        echo "$(SRCROOT)/build" >> $(top_srcdir)/.exclude-file
        echo "$(SRCROOT)/rpm.log" >> $(top_srcdir)/.exclude-file
+       echo "$(SRCROOT)/powerquest" >> $(top_srcdir)/.exclude-file
        echo "$(SRCROOT)/.exclude-file" >> $(top_srcdir)/.exclude-file
        echo $(SRCROOT)/e2fsprogs-@E2FSPROGS_VERSION@.tar.gz \
                >> $(top_srcdir)/.exclude-file
+       echo $(SRCROOT)/e2fsprogs-ALL-@E2FSPROGS_VERSION@.tar.gz \
+               >> $(top_srcdir)/.exclude-file
        
 source_tar_file: $(top_srcdir)/.exclude-file
        (cd $(top_srcdir)/..; a=$(SRCROOT); rm -f $$a ; ln -sf e2fsprogs $$a ; \
                $(TAR) -c -h -v -f - \
                        -X $$a/.exclude-file $$a | \
-               gzip -9 > e2fsprogs-@E2FSPROGS_VERSION@.tar.gz)
+               gzip -9 > e2fsprogs-ALL-@E2FSPROGS_VERSION@.tar.gz)
        rm -f $(top_srcdir)/.exclude-file
 
 # +++ Dependency line eater +++
@@ -114,26 +128,22 @@ source_tar_file: $(top_srcdir)/.exclude-file
 # the Makefile.in file
 #
 extent.o: $(srcdir)/extent.c $(srcdir)/resize2fs.h \
- $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
- $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
- $(top_srcdir)/lib/ext2fs/bitops.h
-ext2_block_move.o: $(srcdir)/ext2_block_move.c $(srcdir)/resize2fs.h \
- $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
- $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
- $(top_srcdir)/lib/ext2fs/bitops.h
-ext2_inode_move.o: $(srcdir)/ext2_inode_move.c $(srcdir)/resize2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
  $(top_srcdir)/lib/ext2fs/bitops.h
 resize2fs.o: $(srcdir)/resize2fs.c $(srcdir)/resize2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
  $(top_srcdir)/lib/ext2fs/bitops.h
 main.o: $(srcdir)/main.c $(srcdir)/resize2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
- $(top_srcdir)/lib/ext2fs/bitops.h
+ $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/version.h
 sim_progress.o: $(srcdir)/sim_progress.c $(srcdir)/resize2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/et/com_err.h \
  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
  $(top_srcdir)/lib/ext2fs/bitops.h