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_binary_trees.c \
63 src/lz_hash_chains.c \
64 src/lz_lcp_interval_tree.c \
65 src/lz_linked_suffix_array.c \
69 src/lz_suffix_array_utils.c \
72 src/lzms_decompress.c \
75 src/lzx_decompress.c \
76 src/metadata_resource.c \
98 src/xpress_compress.c \
99 src/xpress_decompress.c \
100 include/wimlib/apply.h \
101 include/wimlib/assert.h \
102 include/wimlib/avl_tree.h \
103 include/wimlib/bitops.h \
104 include/wimlib/bt_matchfinder.h \
105 include/wimlib/callback.h \
106 include/wimlib/capture.h \
107 include/wimlib/case.h \
108 include/wimlib/compiler.h \
109 include/wimlib/compiler-gcc.h \
110 include/wimlib/compressor_ops.h \
111 include/wimlib/compress_common.h \
112 include/wimlib/chunk_compressor.h \
113 include/wimlib/decompressor_ops.h \
114 include/wimlib/decompress_common.h \
115 include/wimlib/dentry.h \
116 include/wimlib/divsufsort.h \
117 include/wimlib/encoding.h \
118 include/wimlib/endianness.h \
119 include/wimlib/error.h \
120 include/wimlib/file_io.h \
121 include/wimlib/glob.h \
122 include/wimlib/hc_matchfinder.h \
123 include/wimlib/header.h \
124 include/wimlib/inode.h \
125 include/wimlib/inode_table.h \
126 include/wimlib/integrity.h \
127 include/wimlib/list.h \
128 include/wimlib/lookup_table.h \
129 include/wimlib/lz_extend.h \
130 include/wimlib/lz_hash3.h \
131 include/wimlib/lz_mf.h \
132 include/wimlib/lz_mf_ops.h \
133 include/wimlib/lz_repsearch.h \
134 include/wimlib/lz_suffix_array_utils.h \
135 include/wimlib/lzms_common.h \
136 include/wimlib/lzms_constants.h \
137 include/wimlib/lzx_common.h \
138 include/wimlib/lzx_constants.h \
139 include/wimlib/matchfinder_avx2.h \
140 include/wimlib/matchfinder_common.h \
141 include/wimlib/matchfinder_nonsliding.h \
142 include/wimlib/matchfinder_sliding.h \
143 include/wimlib/matchfinder_sse2.h \
144 include/wimlib/metadata.h \
145 include/wimlib/pathlist.h \
146 include/wimlib/paths.h \
147 include/wimlib/progress.h \
148 include/wimlib/reparse.h \
149 include/wimlib/resource.h \
150 include/wimlib/security.h \
151 include/wimlib/security_descriptor.h \
152 include/wimlib/sha1.h \
153 include/wimlib/textfile.h \
154 include/wimlib/timestamp.h \
155 include/wimlib/types.h \
156 include/wimlib/unaligned.h \
157 include/wimlib/unix_data.h \
158 include/wimlib/util.h \
159 include/wimlib/wildcard.h \
160 include/wimlib/wim.h \
161 include/wimlib/write.h \
162 include/wimlib/xml.h \
163 include/wimlib/xpress_constants.h
166 libwim_la_SOURCES += src/ntfs-3g_apply.c \
167 src/ntfs-3g_capture.c \
168 include/wimlib/ntfs_3g.h
171 if WINDOWS_NATIVE_BUILD
172 libwim_la_SOURCES += src/win32_common.c \
174 src/win32_capture.c \
175 src/win32_replacements.c \
177 include/wimlib/win32_common.h \
178 include/wimlib/win32.h \
179 include/wimlib/wimboot.h \
182 libwim_la_SOURCES += src/unix_apply.c \
190 $(LIBNTFS_3G_CFLAGS) \
194 libwim_la_LDFLAGS = $(AM_LDFLAGS) -version-info 18:0:3
206 libwim_la_SOURCES += src/sha1-ssse3.asm
207 libwim_la_LIBADD += src/sha1-ssse3.lo
209 src/sha1-ssse3.lo:src/sha1-ssse3.asm
210 $(LIBTOOL) --mode=compile --tag NASM $(srcdir)/build-aux/nasm_lt.sh \
211 $(NASM) $(NAFLAGS) $(NASM_PLATFORM_FLAGS) \
212 -DINTEL_SHA1_UPDATE_FUNCNAME=$(NASM_SYMBOL_PREFIX)sha1_transform_blocks_ssse3 \
213 -DINTEL_SHA1_UPDATE_DEFAULT_DISPATCH=$(NASM_SYMBOL_PREFIX)sha1_transform_blocks_default \
216 EXTRA_DIST += build-aux/nasm_lt.sh
219 ##############################################################################
221 ##############################################################################
223 bin_PROGRAMS = wimlib-imagex
224 dist_bin_SCRIPTS = programs/mkwinpeimg
226 wimlib_imagex_SOURCES = \
229 include/wimlib_tchar.h
231 if WINDOWS_NATIVE_BUILD
232 wimlib_imagex_SOURCES += \
233 programs/imagex-win32.c \
234 programs/imagex-win32.h \
239 wimlib_imagex_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations
241 wimlib_imagex_LDADD = $(top_builddir)/libwim.la
243 wimlib_imagex_cmds = \
261 ##############################################################################
263 ##############################################################################
266 for cmd in $(wimlib_imagex_cmds); do \
267 cd $(DESTDIR)$(bindir) && \
268 ln -f wimlib-imagex wim$${cmd}; \
272 for cmd in $(wimlib_imagex_cmds); do \
273 cd $(DESTDIR)$(mandir)/man1 && \
274 ln -sf wimlib-imagex-$${cmd}.1 wim$${cmd}.1; \
278 for cmd in $(wimlib_imagex_cmds); do \
279 rm -f $(DESTDIR)$(bindir)/wim$${cmd}; \
280 rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1; \
283 ##############################################################################
285 ##############################################################################
288 doc/man1/wimlib-imagex.1 \
289 doc/man1/wimlib-imagex-append.1 \
290 doc/man1/wimlib-imagex-apply.1 \
291 doc/man1/wimlib-imagex-capture.1 \
292 doc/man1/wimlib-imagex-delete.1 \
293 doc/man1/wimlib-imagex-dir.1 \
294 doc/man1/wimlib-imagex-export.1 \
295 doc/man1/wimlib-imagex-extract.1 \
296 doc/man1/wimlib-imagex-info.1 \
297 doc/man1/wimlib-imagex-join.1 \
298 doc/man1/wimlib-imagex-mount.1 \
299 doc/man1/wimlib-imagex-mountrw.1 \
300 doc/man1/wimlib-imagex-optimize.1 \
301 doc/man1/wimlib-imagex-split.1 \
302 doc/man1/wimlib-imagex-unmount.1 \
303 doc/man1/wimlib-imagex-update.1 \
304 doc/man1/wimlib-imagex-verify.1 \
305 doc/man1/mkwinpeimg.1
307 EXTRA_DIST += $(man1_MANS)
309 ##############################################################################
311 ##############################################################################
313 check_PROGRAMS = tests/tree-cmp
314 tests_tree_cmp_SOURCES = tests/tree-cmp.c
316 dist_check_SCRIPTS = tests/test-imagex \
317 tests/test-imagex-capture_and_apply \
318 tests/test-imagex-update_and_extract
321 dist_check_SCRIPTS += tests/test-imagex-mount
325 dist_check_SCRIPTS += tests/test-imagex-ntfs
329 tests/common_tests.sh \
330 tests/tests-common.sh \
331 tests/security_descriptor_1.base64 \
332 tests/security_descriptor_1.bin \
333 tests/security_descriptor_2.base64 \
334 tests/security_descriptor_2.bin
336 if WINDOWS_NATIVE_BUILD
337 # Tests are run manually for Windows builds.
340 TESTS = $(dist_check_SCRIPTS)
343 ##############################################################################