]> wimlib.net Git - wimlib/blobdiff - Makefile.am
Add --compress-slow back to wimoptimize help
[wimlib] / Makefile.am
index ab3f5e3c254e38408301faad9c691542f61ea45d..684454c4274f408bce9bc44178a7829a485c4f82 100644 (file)
 ACLOCAL_AMFLAGS = -I m4
 
-AM_CPPFLAGS    = -I$(top_srcdir)/src $(WINDOWS_CPPFLAGS) \
+AM_CPPFLAGS    = -I$(top_srcdir)/include $(WINDOWS_CPPFLAGS) \
                  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-AM_CFLAGS      = -std=gnu99 -fno-strict-aliasing
+
+AM_CFLAGS      = -std=gnu99 -Wmissing-prototypes -Wstrict-prototypes   \
+                 -Werror-implicit-function-declaration                 \
+                 -fno-common -Wundef -Wno-pointer-sign
+
+if WINDOWS_NATIVE_BUILD
+# This option is needed to make packed structures work as expected
+# with gcc 4.7+ (mingw) on Windows.
+AM_CFLAGS += -mno-ms-bitfields
+endif
 
 lib_LTLIBRARIES = libwim.la
 
-libwim_la_LDFLAGS = -version-info 6:0:0 $(WINDOWS_LDFLAGS)
+libwim_la_LDFLAGS = -version-info 11:0:2 $(WINDOWS_LDFLAGS)
 
 libwim_la_SOURCES =            \
        src/add_image.c         \
-       src/buffer_io.h         \
        src/capture_common.c    \
        src/compress.c          \
-       src/compress.h          \
        src/decompress.c        \
-       src/decompress.h        \
        src/delete_image.c      \
        src/dentry.c            \
-       src/dentry.h            \
        src/encoding.c          \
-       src/endianness.h        \
        src/export_image.c      \
-       src/extract_image.c     \
+       src/extract.c           \
+       src/file_io.c           \
        src/hardlink.c          \
        src/header.c            \
        src/integrity.c         \
        src/join.c              \
-       src/list.h              \
        src/lookup_table.c      \
-       src/lookup_table.h      \
        src/lz77.c              \
+       src/divsufsort/divsufsort.c             \
+       src/divsufsort/divsufsort.h             \
+       src/divsufsort/divsufsort_private.h     \
+       src/divsufsort/sssort.c \
+       src/divsufsort/trsort.c \
        src/lzx-common.c        \
        src/lzx-compress.c      \
        src/lzx-decompress.c    \
-       src/lzx.h               \
        src/metadata_resource.c \
        src/mount_image.c       \
+       src/paths.c             \
        src/resource.c          \
        src/rbtree.c            \
-       src/rbtree.h            \
        src/security.c          \
-       src/security.h          \
        src/sha1.c              \
-       src/sha1.h              \
        src/split.c             \
        src/reparse.c           \
-       src/timestamp.h         \
+       src/timestamp.c         \
        src/update_image.c      \
        src/util.c              \
-       src/util.h              \
        src/verify.c            \
        src/wim.c               \
-       src/wimlib.h            \
-       wimlib_tchar.h          \
-       src/wimlib_internal.h   \
        src/write.c             \
        src/xml.c               \
-       src/xml.h               \
        src/xpress-compress.c   \
-       src/xpress-decompress.c \
-       src/xpress.h
+       src/xpress-decompress.c \
+       include/wimlib/apply.h          \
+       include/wimlib/assert.h         \
+       include/wimlib/callback.h       \
+       include/wimlib/capture.h        \
+       include/wimlib/compiler.h       \
+       include/wimlib/compress.h       \
+       include/wimlib/decompress.h     \
+       include/wimlib/dentry.h         \
+       include/wimlib/encoding.h       \
+       include/wimlib/endianness.h     \
+       include/wimlib/error.h          \
+       include/wimlib/file_io.h        \
+       include/wimlib/glob.h           \
+       include/wimlib/header.h         \
+       include/wimlib/integrity.h      \
+       include/wimlib/list.h           \
+       include/wimlib/lookup_table.h   \
+       include/wimlib/lzx.h            \
+       include/wimlib/metadata.h       \
+       include/wimlib/paths.h          \
+       include/wimlib/rbtree.h         \
+       include/wimlib/reparse.h        \
+       include/wimlib/resource.h       \
+       include/wimlib/security.h       \
+       include/wimlib/security_descriptor.h    \
+       include/wimlib/sha1.h           \
+       include/wimlib/timestamp.h      \
+       include/wimlib/types.h          \
+       include/wimlib/util.h           \
+       include/wimlib/version.h        \
+       include/wimlib/wim.h            \
+       include/wimlib/write.h          \
+       include/wimlib/xml.h            \
+       include/wimlib/xpress.h
 
 if WITH_NTFS_3G
-libwim_la_SOURCES += src/ntfs-apply.c  \
-                    src/ntfs-capture.c
+libwim_la_SOURCES += src/ntfs-3g_apply.c       \
+                    src/ntfs-3g_capture.c      \
+                    include/wimlib/ntfs_3g.h
+endif
+
+if WINDOWS_NATIVE_BUILD
+libwim_la_SOURCES += src/win32_common.c                        \
+                    src/win32_apply.c                  \
+                    src/win32_capture.c                \
+                    src/win32_replacements.c           \
+                    include/wimlib/win32_common.h      \
+                    include/wimlib/win32.h
+else
+libwim_la_SOURCES += src/unix_apply.c          \
+                    src/unix_capture.c
 endif
 
 
+
 EXTRA_libwim_la_SOURCES = src/sha1-ssse3.asm
 libwim_la_DEPENDENCIES = $(SSSE3_SHA1_OBJ)
 STRIP_FPIC = sh $(top_srcdir)/build-aux/strip_fPIC.sh
@@ -78,11 +125,12 @@ sha1-ssse3.lo:src/sha1-ssse3.asm
        $<
 
 libwim_la_LIBADD =             \
-       $(LIBXML2_LDADD)        \
-       $(LIBFUSE_LDADD)        \
-       $(LIBNTFS_3G_LDADD)     \
+       $(LIBXML2_LIBS)         \
+       $(LIBFUSE_LIBS)         \
+       $(LIBRT_LIBS)           \
+       $(LIBNTFS_3G_LIBS)      \
        $(LTLIBICONV)           \
-       $(LIBCRYPTO_LDADD)      \
+       $(LIBCRYPTO_LIBS)       \
        $(SSSE3_SHA1_OBJ)       \
        $(PTHREAD_LDADD)        \
        $(WINDOWS_LDADD)
@@ -97,45 +145,73 @@ libwim_la_CFLAGS =         \
 
 
 bin_PROGRAMS    = imagex
-imagex_SOURCES   = programs/imagex.c wimlib_tchar.h
+imagex_SOURCES   = programs/imagex.c   \
+                  include/wimlib.h     \
+                  include/wimlib_tchar.h
 imagex_LDADD    = $(top_builddir)/libwim.la
-imagex_CFLAGS    = $(AM_CFLAGS) $(WINDOWS_CFLAGS)
+imagex_CFLAGS    = $(AM_CFLAGS) $(WINDOWS_CFLAGS) -Wno-deprecated-declarations
 
 if WINDOWS_NATIVE_BUILD
 imagex_SOURCES += programs/imagex-win32.c      \
                  programs/imagex-win32.h       \
                  programs/wgetopt.c            \
                  programs/wgetopt.h
-
-libwim_la_SOURCES += src/win32_common.c                \
-                    src/win32_apply.c          \
-                    src/win32_capture.c        \
-                    src/win32.h                \
-                    src/win32_common.h
-else
-libwim_la_SOURCES += src/unix_apply.c          \
-                    src/unix_capture.c
 endif
 
+imagex_cmds =  append  \
+               apply   \
+               capture \
+               delete  \
+               dir     \
+               export  \
+               extract \
+               info    \
+               join    \
+               mount   \
+               mountrw \
+               optimize\
+               split   \
+               unmount \
+               update
+
 install-exec-hook:
-       if [ "@IMAGEX_PROGNAME@" != imagex ]; then \
+       if [ "@IMAGEX_PROGNAME@" != imagex ]; then                          \
                cd $(DESTDIR)$(bindir) && mv -f imagex "@IMAGEX_PROGNAME@"; \
        fi
+       for cmd in $(imagex_cmds); do                           \
+               cd $(DESTDIR)$(bindir) &&                       \
+                       ln -f "@IMAGEX_PROGNAME@" wim$${cmd};   \
+       done
+
+install-data-hook:
+       for cmd in $(imagex_cmds); do                                       \
+               cd $(DESTDIR)$(mandir)/man1 &&                              \
+                       ln -sf "@IMAGEX_PROGNAME@-$${cmd}.1" wim$${cmd}.1;  \
+       done
 
 uninstall-hook:
-       if [ "@IMAGEX_PROGNAME@" != imagex ]; then \
-               cd $(DESTDIR)$(bindir) && rm -f "@IMAGEX_PROGNAME@"; \
+       if [ "@IMAGEX_PROGNAME@" != imagex ]; then              \
+               rm -f $(DESTDIR)$(bindir)/"@IMAGEX_PROGNAME@";  \
+               rm -f $(DESTDIR)$(bindir)/imagex;               \
        fi
+       for cmd in $(imagex_cmds); do                           \
+               rm -f $(DESTDIR)$(bindir)/wim$${cmd};           \
+       done
+       for cmd in $(imagex_cmds); do                           \
+               rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1;    \
+       done
+
 
 dist_bin_SCRIPTS = programs/mkwinpeimg
 
-include_HEADERS = src/wimlib.h
+include_HEADERS = include/wimlib.h
 
 EXTRA_DIST =                                   \
        build-aux/strip_fPIC.sh                 \
        archlinux                               \
        debian                                  \
        rpm                                     \
+       examples                                \
        README.WINDOWS                          \
        programs/install.cmd                    \
        programs/wimapply.c                     \
@@ -179,7 +255,8 @@ check_PROGRAMS = tests/tree-cmp
 tests_tree_cmp_SOURCES = tests/tree-cmp.c
 
 dist_check_SCRIPTS = tests/test-imagex \
-                    tests/test-imagex-capture_and_apply
+                    tests/test-imagex-capture_and_apply \
+                    tests/test-imagex-update_and_extract
 
 if WITH_FUSE
 dist_check_SCRIPTS += tests/test-imagex-mount
@@ -190,7 +267,7 @@ dist_check_SCRIPTS += tests/test-imagex-ntfs
 endif
 
 if WINDOWS_NATIVE_BUILD
-# TODO: The tests need to be re-written for Windows builds.
+# Tests are run manually for Windows builds.
 TESTS =
 else
 TESTS = $(dist_check_SCRIPTS)