1 ACLOCAL_AMFLAGS = -I m4
3 AM_CPPFLAGS = -I$(top_srcdir)/include $(WINDOWS_CPPFLAGS) \
4 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
6 AM_CFLAGS = -std=gnu99 -Wmissing-prototypes -Wstrict-prototypes \
7 -Werror-implicit-function-declaration \
8 -fno-common -Wundef -Wno-pointer-sign
10 if WINDOWS_NATIVE_BUILD
11 # This option is needed to make packed structures work as expected
12 # with gcc 4.7+ (mingw) on Windows.
13 AM_CFLAGS += -mno-ms-bitfields
16 lib_LTLIBRARIES = libwim.la
18 libwim_la_LDFLAGS = -version-info 15:0:0 $(WINDOWS_LDFLAGS)
23 src/capture_common.c \
26 src/compress_common.c \
27 src/compress_parallel.c \
28 src/compress_serial.c \
30 src/decompress_common.c \
46 src/lzms-decompress.c \
49 src/divsufsort/divsufsort.c \
50 src/divsufsort/divsufsort.h \
51 src/divsufsort/divsufsort_private.h \
52 src/divsufsort/sssort.c \
53 src/divsufsort/trsort.c \
56 src/lzx-decompress.c \
57 src/metadata_resource.c \
77 src/xpress-compress.c \
78 src/xpress-decompress.c \
79 include/wimlib/apply.h \
80 include/wimlib/assert.h \
81 include/wimlib/avl_tree.h \
82 include/wimlib/callback.h \
83 include/wimlib/capture.h \
84 include/wimlib/case.h \
85 include/wimlib/compiler.h \
86 include/wimlib/compressor_ops.h \
87 include/wimlib/compress_common.h \
88 include/wimlib/chunk_compressor.h \
89 include/wimlib/decompressor_ops.h \
90 include/wimlib/decompress_common.h \
91 include/wimlib/dentry.h \
92 include/wimlib/encoding.h \
93 include/wimlib/endianness.h \
94 include/wimlib/error.h \
95 include/wimlib/file_io.h \
96 include/wimlib/glob.h \
97 include/wimlib/header.h \
98 include/wimlib/inode.h \
99 include/wimlib/inode_table.h \
100 include/wimlib/integrity.h \
101 include/wimlib/list.h \
102 include/wimlib/lookup_table.h \
103 include/wimlib/lz.h \
104 include/wimlib/lz_hash.h \
105 include/wimlib/lz_optimal.h \
106 include/wimlib/lz_sarray.h \
107 include/wimlib/lzms.h \
108 include/wimlib/lzx.h \
109 include/wimlib/metadata.h \
110 include/wimlib/pathlist.h \
111 include/wimlib/paths.h \
112 include/wimlib/reparse.h \
113 include/wimlib/resource.h \
114 include/wimlib/security.h \
115 include/wimlib/security_descriptor.h \
116 include/wimlib/sha1.h \
117 include/wimlib/textfile.h \
118 include/wimlib/timestamp.h \
119 include/wimlib/types.h \
120 include/wimlib/unix_data.h \
121 include/wimlib/util.h \
122 include/wimlib/version.h \
123 include/wimlib/wildcard.h \
124 include/wimlib/wim.h \
125 include/wimlib/write.h \
126 include/wimlib/xml.h \
127 include/wimlib/xpress.h
130 libwim_la_SOURCES += src/ntfs-3g_apply.c \
131 src/ntfs-3g_capture.c \
132 include/wimlib/ntfs_3g.h
135 if WINDOWS_NATIVE_BUILD
136 libwim_la_SOURCES += src/win32_common.c \
138 src/win32_capture.c \
139 src/win32_replacements.c \
141 include/wimlib/win32_common.h \
142 include/wimlib/win32.h \
143 include/wimlib/wimboot.h \
146 libwim_la_SOURCES += src/unix_apply.c \
152 EXTRA_libwim_la_SOURCES = src/sha1-ssse3.asm
153 libwim_la_DEPENDENCIES = $(SSSE3_SHA1_OBJ)
154 STRIP_FPIC = sh $(top_srcdir)/build-aux/strip_fPIC.sh
156 sha1-ssse3.lo:src/sha1-ssse3.asm
157 $(LIBTOOL) --mode=compile --tag=CC $(STRIP_FPIC) $(NASM) -f elf64 \
158 -DINTEL_SHA1_UPDATE_DEFAULT_DISPATCH=ssse3_not_found \
174 $(VISIBILITY_CFLAGS) \
177 $(LIBNTFS_3G_CFLAGS) \
181 bin_PROGRAMS = imagex
182 imagex_SOURCES = programs/imagex.c \
184 include/wimlib_tchar.h
185 imagex_LDADD = $(top_builddir)/libwim.la
186 imagex_CFLAGS = $(AM_CFLAGS) $(WINDOWS_CFLAGS) -Wno-deprecated-declarations
188 if WINDOWS_NATIVE_BUILD
189 imagex_SOURCES += programs/imagex-win32.c \
190 programs/imagex-win32.h \
195 imagex_cmds = append \
212 if [ "@IMAGEX_PROGNAME@" != imagex ]; then \
213 cd $(DESTDIR)$(bindir) && mv -f imagex "@IMAGEX_PROGNAME@"; \
215 for cmd in $(imagex_cmds); do \
216 cd $(DESTDIR)$(bindir) && \
217 ln -f "@IMAGEX_PROGNAME@" wim$${cmd}; \
221 for cmd in $(imagex_cmds); do \
222 cd $(DESTDIR)$(mandir)/man1 && \
223 ln -sf "@IMAGEX_PROGNAME@-$${cmd}.1" wim$${cmd}.1; \
227 if [ "@IMAGEX_PROGNAME@" != imagex ]; then \
228 rm -f $(DESTDIR)$(bindir)/"@IMAGEX_PROGNAME@"; \
229 rm -f $(DESTDIR)$(bindir)/imagex; \
231 for cmd in $(imagex_cmds); do \
232 rm -f $(DESTDIR)$(bindir)/wim$${cmd}; \
234 for cmd in $(imagex_cmds); do \
235 rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1; \
239 dist_bin_SCRIPTS = programs/mkwinpeimg
241 include_HEADERS = include/wimlib.h
244 build-aux/strip_fPIC.sh \
250 tests/common_tests.sh \
251 tests/tests-common.sh \
252 tests/security_descriptor_1.base64 \
253 tests/security_descriptor_1.bin \
254 tests/security_descriptor_2.base64 \
255 tests/security_descriptor_2.bin
257 pkgconfigdir = @pkgconfigdir@
258 pkgconfig_DATA = wimlib.pc
260 $(pkgconfig_DATA): config.status
263 doc/man1/@IMAGEX_PROGNAME@.1 \
264 doc/man1/@IMAGEX_PROGNAME@-append.1 \
265 doc/man1/@IMAGEX_PROGNAME@-apply.1 \
266 doc/man1/@IMAGEX_PROGNAME@-capture.1 \
267 doc/man1/@IMAGEX_PROGNAME@-delete.1 \
268 doc/man1/@IMAGEX_PROGNAME@-dir.1 \
269 doc/man1/@IMAGEX_PROGNAME@-export.1 \
270 doc/man1/@IMAGEX_PROGNAME@-extract.1 \
271 doc/man1/@IMAGEX_PROGNAME@-info.1 \
272 doc/man1/@IMAGEX_PROGNAME@-join.1 \
273 doc/man1/@IMAGEX_PROGNAME@-mount.1 \
274 doc/man1/@IMAGEX_PROGNAME@-mountrw.1 \
275 doc/man1/@IMAGEX_PROGNAME@-optimize.1 \
276 doc/man1/@IMAGEX_PROGNAME@-split.1 \
277 doc/man1/@IMAGEX_PROGNAME@-unmount.1 \
278 doc/man1/@IMAGEX_PROGNAME@-update.1 \
279 doc/man1/mkwinpeimg.1
281 man1_MANS = $(wimlib_manpages)
282 DISTCLEANFILES = $(wimlib_manpages)
284 $(man1_MANS): config.status
286 check_PROGRAMS = tests/tree-cmp
287 tests_tree_cmp_SOURCES = tests/tree-cmp.c
289 dist_check_SCRIPTS = tests/test-imagex \
290 tests/test-imagex-capture_and_apply \
291 tests/test-imagex-update_and_extract
294 dist_check_SCRIPTS += tests/test-imagex-mount
298 dist_check_SCRIPTS += tests/test-imagex-ntfs
301 if WINDOWS_NATIVE_BUILD
302 # Tests are run manually for Windows builds.
305 TESTS = $(dist_check_SCRIPTS)