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 COPYING.CC0 \
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
41 src/compress_common.c \
42 src/compress_parallel.c \
43 src/compress_serial.c \
45 src/decompress_common.c \
61 src/lcpit_matchfinder.c \
64 src/lzms_decompress.c \
67 src/lzx_decompress.c \
68 src/metadata_resource.c \
92 src/x86_cpu_features.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/blob_table.h \
103 include/wimlib/bt_matchfinder.h \
104 include/wimlib/case.h \
105 include/wimlib/compiler.h \
106 include/wimlib/compressor_ops.h \
107 include/wimlib/compress_common.h \
108 include/wimlib/chunk_compressor.h \
109 include/wimlib/decompressor_ops.h \
110 include/wimlib/decompress_common.h \
111 include/wimlib/dentry.h \
112 include/wimlib/divsufsort.h \
113 include/wimlib/encoding.h \
114 include/wimlib/endianness.h \
115 include/wimlib/error.h \
116 include/wimlib/file_io.h \
117 include/wimlib/glob.h \
118 include/wimlib/guid.h \
119 include/wimlib/hc_matchfinder.h \
120 include/wimlib/header.h \
121 include/wimlib/inode.h \
122 include/wimlib/inode_table.h \
123 include/wimlib/integrity.h \
124 include/wimlib/lcpit_matchfinder.h \
125 include/wimlib/list.h \
126 include/wimlib/lz_extend.h \
127 include/wimlib/lz_hash.h \
128 include/wimlib/lzms_common.h \
129 include/wimlib/lzms_constants.h \
130 include/wimlib/lzx_common.h \
131 include/wimlib/lzx_constants.h \
132 include/wimlib/metadata.h \
133 include/wimlib/object_id.h \
134 include/wimlib/pathlist.h \
135 include/wimlib/paths.h \
136 include/wimlib/pattern.h \
137 include/wimlib/progress.h \
138 include/wimlib/registry.h \
139 include/wimlib/reparse.h \
140 include/wimlib/resource.h \
141 include/wimlib/scan.h \
142 include/wimlib/security.h \
143 include/wimlib/security_descriptor.h \
144 include/wimlib/sha1.h \
145 include/wimlib/solid.h \
146 include/wimlib/tagged_items.h \
147 include/wimlib/textfile.h \
148 include/wimlib/timestamp.h \
149 include/wimlib/types.h \
150 include/wimlib/unaligned.h \
151 include/wimlib/unix_data.h \
152 include/wimlib/util.h \
153 include/wimlib/wim.h \
154 include/wimlib/write.h \
155 include/wimlib/x86_cpu_features.h \
156 include/wimlib/xattr.h \
157 include/wimlib/xml.h \
158 include/wimlib/xml_windows.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/wimboot.c \
171 src/win32_capture.c \
172 src/win32_replacements.c \
174 include/wimlib/wimboot.h \
175 include/wimlib/win32.h \
176 include/wimlib/win32_common.h \
177 include/wimlib/win32_vss.h \
179 PLATFORM_LIBS = -lmsvcrt -lntdll
181 libwim_la_SOURCES += src/unix_apply.c \
186 if ENABLE_TEST_SUPPORT
187 libwim_la_SOURCES += src/test_support.c \
188 include/wimlib/test_support.h
189 if WINDOWS_NATIVE_BUILD
190 # Workaround for "multiple definition" error when math symbols are present in
191 # both libmsvcrt.a and ntdll.a
192 AM_LDFLAGS += -Wl,--allow-multiple-definition
200 $(LIBNTFS_3G_CFLAGS) \
204 libwim_la_LDFLAGS = $(AM_LDFLAGS) -version-info 27:0:12
216 libwim_la_SOURCES += src/sha1-ssse3.asm
217 libwim_la_LIBADD += src/sha1-ssse3.lo
219 src/sha1-ssse3.lo:src/sha1-ssse3.asm
220 $(LIBTOOL) --mode=compile $(srcdir)/build-aux/nasm_lt.sh \
221 $(NASM) $(NAFLAGS) $(NASM_PLATFORM_FLAGS) \
222 -DINTEL_SHA1_UPDATE_FUNCNAME=$(NASM_SYMBOL_PREFIX)sha1_transform_blocks_ssse3 \
223 -DINTEL_SHA1_UPDATE_DEFAULT_DISPATCH=$(NASM_SYMBOL_PREFIX)sha1_transform_blocks_default \
226 EXTRA_DIST += build-aux/nasm_lt.sh
228 ##############################################################################
230 ##############################################################################
232 bin_PROGRAMS = wimlib-imagex
233 dist_bin_SCRIPTS = programs/mkwinpeimg
235 wimlib_imagex_SOURCES = \
238 include/wimlib_tchar.h
240 if WINDOWS_NATIVE_BUILD
241 wimlib_imagex_SOURCES += \
242 programs/imagex-win32.c \
243 programs/imagex-win32.h \
248 wimlib_imagex_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations
250 wimlib_imagex_LDADD = $(top_builddir)/libwim.la
252 wimlib_imagex_cmds = \
270 ##############################################################################
272 ##############################################################################
275 for cmd in $(wimlib_imagex_cmds); do \
276 cd $(DESTDIR)$(bindir) && \
277 ln -f wimlib-imagex wim$${cmd}; \
281 for cmd in $(wimlib_imagex_cmds); do \
282 cd $(DESTDIR)$(mandir)/man1 && \
283 ln -sf wim$${cmd}.1 wimlib-imagex-$${cmd}.1; \
287 for cmd in $(wimlib_imagex_cmds); do \
288 rm -f $(DESTDIR)$(bindir)/wim$${cmd}; \
289 rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1; \
292 ##############################################################################
294 ##############################################################################
297 doc/man1/wimlib-imagex.1 \
298 doc/man1/wimappend.1 \
299 doc/man1/wimapply.1 \
300 doc/man1/wimcapture.1 \
301 doc/man1/wimdelete.1 \
303 doc/man1/wimexport.1 \
304 doc/man1/wimextract.1 \
307 doc/man1/wimmount.1 \
308 doc/man1/wimmountrw.1 \
309 doc/man1/wimoptimize.1 \
310 doc/man1/wimsplit.1 \
311 doc/man1/wimunmount.1 \
312 doc/man1/wimupdate.1 \
313 doc/man1/wimverify.1 \
314 doc/man1/mkwinpeimg.1
316 EXTRA_DIST += $(man1_MANS)
318 ##############################################################################
320 ##############################################################################
322 check_PROGRAMS = tests/tree-cmp
323 tests_tree_cmp_SOURCES = tests/tree-cmp.c
325 dist_check_SCRIPTS = tests/test-imagex \
326 tests/test-imagex-capture_and_apply \
327 tests/test-imagex-update_and_extract
330 dist_check_SCRIPTS += tests/test-imagex-mount
334 dist_check_SCRIPTS += tests/test-imagex-ntfs
338 tests/common_tests.sh \
339 tests/test_utils.sh \
340 tests/security_descriptor_1.base64 \
341 tests/security_descriptor_1.bin \
342 tests/security_descriptor_2.base64 \
343 tests/security_descriptor_2.bin
345 if WINDOWS_NATIVE_BUILD
346 # Tests are run manually for Windows builds.
349 TESTS = $(dist_check_SCRIPTS)
352 # Extra test programs (not run by 'make check')
353 EXTRA_PROGRAMS = tests/wlfuzz
354 tests_wlfuzz_SOURCES = tests/wlfuzz.c
355 tests_wlfuzz_LDADD = $(top_builddir)/libwim.la
357 ##############################################################################