1 ##############################################################################
3 ##############################################################################
6 ACLOCAL_AMFLAGS = -I m4
8 AM_CPPFLAGS = -I$(top_srcdir)/include $(PLATFORM_CPPFLAGS) \
9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
11 # Note: -std=gnu99 instead of -std=c99 is needed for unnamed structs and unions,
12 # which are in C11 but not C99. But we can't yet actually use -std=c11 because
13 # we want to support older versions of gcc.
14 AM_CFLAGS = -std=gnu99 $(PLATFORM_CFLAGS) -fno-common \
15 -Wmissing-prototypes -Wstrict-prototypes \
16 -Wundef -Wno-pointer-sign
18 AM_LDFLAGS = $(PLATFORM_LDFLAGS)
20 EXTRA_DIST = README README.WINDOWS \
21 COPYING COPYING.GPLv3 COPYING.LGPLv3 \
25 ##############################################################################
27 ##############################################################################
29 lib_LTLIBRARIES = libwim.la
30 include_HEADERS = include/wimlib.h
32 pkgconfigdir = @pkgconfigdir@
33 pkgconfig_DATA = wimlib.pc
34 wimlib.pc: config.status
39 src/capture_common.c \
41 src/compress_common.c \
42 src/compress_parallel.c \
43 src/compress_serial.c \
45 src/decompress_common.c \
62 src/lz_lcp_interval_tree.c \
63 src/lz_linked_suffix_array.c \
66 src/lz_suffix_array_utils.c \
69 src/lzms_decompress.c \
72 src/lzx_decompress.c \
73 src/metadata_resource.c \
95 src/xpress_compress.c \
96 src/xpress_decompress.c \
97 include/wimlib/alloca.h \
98 include/wimlib/apply.h \
99 include/wimlib/assert.h \
100 include/wimlib/avl_tree.h \
101 include/wimlib/bitops.h \
102 include/wimlib/bt_matchfinder.h \
103 include/wimlib/callback.h \
104 include/wimlib/capture.h \
105 include/wimlib/case.h \
106 include/wimlib/compiler.h \
107 include/wimlib/compiler-gcc.h \
108 include/wimlib/compressor_ops.h \
109 include/wimlib/compress_common.h \
110 include/wimlib/chunk_compressor.h \
111 include/wimlib/decompressor_ops.h \
112 include/wimlib/decompress_common.h \
113 include/wimlib/dentry.h \
114 include/wimlib/divsufsort.h \
115 include/wimlib/encoding.h \
116 include/wimlib/endianness.h \
117 include/wimlib/error.h \
118 include/wimlib/file_io.h \
119 include/wimlib/glob.h \
120 include/wimlib/hc_matchfinder.h \
121 include/wimlib/header.h \
122 include/wimlib/inode.h \
123 include/wimlib/inode_table.h \
124 include/wimlib/integrity.h \
125 include/wimlib/list.h \
126 include/wimlib/lookup_table.h \
127 include/wimlib/lz_extend.h \
128 include/wimlib/lz_hash.h \
129 include/wimlib/lz_mf.h \
130 include/wimlib/lz_mf_ops.h \
131 include/wimlib/lz_repsearch.h \
132 include/wimlib/lz_suffix_array_utils.h \
133 include/wimlib/lzms_common.h \
134 include/wimlib/lzms_constants.h \
135 include/wimlib/lzx_common.h \
136 include/wimlib/lzx_constants.h \
137 include/wimlib/matchfinder_avx2.h \
138 include/wimlib/matchfinder_common.h \
139 include/wimlib/matchfinder_sse2.h \
140 include/wimlib/metadata.h \
141 include/wimlib/pathlist.h \
142 include/wimlib/paths.h \
143 include/wimlib/progress.h \
144 include/wimlib/reparse.h \
145 include/wimlib/resource.h \
146 include/wimlib/security.h \
147 include/wimlib/security_descriptor.h \
148 include/wimlib/sha1.h \
149 include/wimlib/textfile.h \
150 include/wimlib/timestamp.h \
151 include/wimlib/types.h \
152 include/wimlib/unaligned.h \
153 include/wimlib/unix_data.h \
154 include/wimlib/util.h \
155 include/wimlib/wildcard.h \
156 include/wimlib/wim.h \
157 include/wimlib/write.h \
158 include/wimlib/xml.h \
159 include/wimlib/xpress_constants.h
162 libwim_la_SOURCES += src/ntfs-3g_apply.c \
163 src/ntfs-3g_capture.c \
164 include/wimlib/ntfs_3g.h
167 if WINDOWS_NATIVE_BUILD
168 libwim_la_SOURCES += src/win32_common.c \
170 src/win32_capture.c \
171 src/win32_replacements.c \
173 include/wimlib/win32_common.h \
174 include/wimlib/win32.h \
175 include/wimlib/wimboot.h \
178 libwim_la_SOURCES += src/unix_apply.c \
186 $(LIBNTFS_3G_CFLAGS) \
190 libwim_la_LDFLAGS = $(AM_LDFLAGS) -version-info 19:0:4
202 libwim_la_SOURCES += src/sha1-ssse3.asm
203 libwim_la_LIBADD += src/sha1-ssse3.lo
205 src/sha1-ssse3.lo:src/sha1-ssse3.asm
206 $(LIBTOOL) --mode=compile --tag NASM $(srcdir)/build-aux/nasm_lt.sh \
207 $(NASM) $(NAFLAGS) $(NASM_PLATFORM_FLAGS) \
208 -DINTEL_SHA1_UPDATE_FUNCNAME=$(NASM_SYMBOL_PREFIX)sha1_transform_blocks_ssse3 \
209 -DINTEL_SHA1_UPDATE_DEFAULT_DISPATCH=$(NASM_SYMBOL_PREFIX)sha1_transform_blocks_default \
212 EXTRA_DIST += build-aux/nasm_lt.sh
215 ##############################################################################
217 ##############################################################################
219 bin_PROGRAMS = wimlib-imagex
220 dist_bin_SCRIPTS = programs/mkwinpeimg
222 wimlib_imagex_SOURCES = \
225 include/wimlib_tchar.h
227 if WINDOWS_NATIVE_BUILD
228 wimlib_imagex_SOURCES += \
229 programs/imagex-win32.c \
230 programs/imagex-win32.h \
235 wimlib_imagex_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations
237 wimlib_imagex_LDADD = $(top_builddir)/libwim.la
239 wimlib_imagex_cmds = \
257 ##############################################################################
259 ##############################################################################
262 for cmd in $(wimlib_imagex_cmds); do \
263 cd $(DESTDIR)$(bindir) && \
264 ln -f wimlib-imagex wim$${cmd}; \
268 for cmd in $(wimlib_imagex_cmds); do \
269 cd $(DESTDIR)$(mandir)/man1 && \
270 ln -sf wimlib-imagex-$${cmd}.1 wim$${cmd}.1; \
274 for cmd in $(wimlib_imagex_cmds); do \
275 rm -f $(DESTDIR)$(bindir)/wim$${cmd}; \
276 rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1; \
279 ##############################################################################
281 ##############################################################################
284 doc/man1/wimlib-imagex.1 \
285 doc/man1/wimlib-imagex-append.1 \
286 doc/man1/wimlib-imagex-apply.1 \
287 doc/man1/wimlib-imagex-capture.1 \
288 doc/man1/wimlib-imagex-delete.1 \
289 doc/man1/wimlib-imagex-dir.1 \
290 doc/man1/wimlib-imagex-export.1 \
291 doc/man1/wimlib-imagex-extract.1 \
292 doc/man1/wimlib-imagex-info.1 \
293 doc/man1/wimlib-imagex-join.1 \
294 doc/man1/wimlib-imagex-mount.1 \
295 doc/man1/wimlib-imagex-mountrw.1 \
296 doc/man1/wimlib-imagex-optimize.1 \
297 doc/man1/wimlib-imagex-split.1 \
298 doc/man1/wimlib-imagex-unmount.1 \
299 doc/man1/wimlib-imagex-update.1 \
300 doc/man1/wimlib-imagex-verify.1 \
301 doc/man1/mkwinpeimg.1
303 EXTRA_DIST += $(man1_MANS)
305 ##############################################################################
307 ##############################################################################
309 check_PROGRAMS = tests/tree-cmp
310 tests_tree_cmp_SOURCES = tests/tree-cmp.c
312 dist_check_SCRIPTS = tests/test-imagex \
313 tests/test-imagex-capture_and_apply \
314 tests/test-imagex-update_and_extract
317 dist_check_SCRIPTS += tests/test-imagex-mount
321 dist_check_SCRIPTS += tests/test-imagex-ntfs
325 tests/common_tests.sh \
326 tests/tests-common.sh \
327 tests/security_descriptor_1.base64 \
328 tests/security_descriptor_1.bin \
329 tests/security_descriptor_2.base64 \
330 tests/security_descriptor_2.bin
332 if WINDOWS_NATIVE_BUILD
333 # Tests are run manually for Windows builds.
336 TESTS = $(dist_check_SCRIPTS)
339 ##############################################################################