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
40 src/capture_common.c \
42 src/compress_common.c \
43 src/compress_parallel.c \
44 src/compress_serial.c \
46 src/decompress_common.c \
62 src/lcpit_matchfinder.c \
65 src/lzms_decompress.c \
68 src/lzx_decompress.c \
69 src/metadata_resource.c \
92 src/xpress_compress.c \
93 src/xpress_decompress.c \
94 include/wimlib/alloca.h \
95 include/wimlib/apply.h \
96 include/wimlib/assert.h \
97 include/wimlib/avl_tree.h \
98 include/wimlib/bitops.h \
99 include/wimlib/bt_matchfinder.h \
100 include/wimlib/callback.h \
101 include/wimlib/capture.h \
102 include/wimlib/case.h \
103 include/wimlib/compiler.h \
104 include/wimlib/compiler-gcc.h \
105 include/wimlib/compressor_ops.h \
106 include/wimlib/compress_common.h \
107 include/wimlib/chunk_compressor.h \
108 include/wimlib/decompressor_ops.h \
109 include/wimlib/decompress_common.h \
110 include/wimlib/dentry.h \
111 include/wimlib/divsufsort.h \
112 include/wimlib/encoding.h \
113 include/wimlib/endianness.h \
114 include/wimlib/error.h \
115 include/wimlib/file_io.h \
116 include/wimlib/glob.h \
117 include/wimlib/hc_matchfinder.h \
118 include/wimlib/header.h \
119 include/wimlib/inode.h \
120 include/wimlib/inode_table.h \
121 include/wimlib/integrity.h \
122 include/wimlib/lcpit_matchfinder.h \
123 include/wimlib/list.h \
124 include/wimlib/lookup_table.h \
125 include/wimlib/lz_extend.h \
126 include/wimlib/lz_hash.h \
127 include/wimlib/lzms_common.h \
128 include/wimlib/lzms_constants.h \
129 include/wimlib/lzx_common.h \
130 include/wimlib/lzx_constants.h \
131 include/wimlib/matchfinder_avx2.h \
132 include/wimlib/matchfinder_common.h \
133 include/wimlib/matchfinder_sse2.h \
134 include/wimlib/metadata.h \
135 include/wimlib/pathlist.h \
136 include/wimlib/paths.h \
137 include/wimlib/progress.h \
138 include/wimlib/reparse.h \
139 include/wimlib/resource.h \
140 include/wimlib/security.h \
141 include/wimlib/security_descriptor.h \
142 include/wimlib/sha1.h \
143 include/wimlib/solid.h \
144 include/wimlib/textfile.h \
145 include/wimlib/timestamp.h \
146 include/wimlib/types.h \
147 include/wimlib/unaligned.h \
148 include/wimlib/unix_data.h \
149 include/wimlib/util.h \
150 include/wimlib/wildcard.h \
151 include/wimlib/wim.h \
152 include/wimlib/write.h \
153 include/wimlib/xml.h \
154 include/wimlib/xpress_constants.h
157 libwim_la_SOURCES += src/ntfs-3g_apply.c \
158 src/ntfs-3g_capture.c \
159 include/wimlib/ntfs_3g.h
162 if WINDOWS_NATIVE_BUILD
163 libwim_la_SOURCES += src/win32_common.c \
165 src/win32_capture.c \
166 src/win32_replacements.c \
168 include/wimlib/win32_common.h \
169 include/wimlib/win32.h \
170 include/wimlib/wimboot.h \
173 libwim_la_SOURCES += src/unix_apply.c \
181 $(LIBNTFS_3G_CFLAGS) \
185 libwim_la_LDFLAGS = $(AM_LDFLAGS) -version-info 20:0:5
197 libwim_la_SOURCES += src/sha1-ssse3.asm
198 libwim_la_LIBADD += src/sha1-ssse3.lo
200 src/sha1-ssse3.lo:src/sha1-ssse3.asm
201 $(LIBTOOL) --mode=compile --tag NASM $(srcdir)/build-aux/nasm_lt.sh \
202 $(NASM) $(NAFLAGS) $(NASM_PLATFORM_FLAGS) \
203 -DINTEL_SHA1_UPDATE_FUNCNAME=$(NASM_SYMBOL_PREFIX)sha1_transform_blocks_ssse3 \
204 -DINTEL_SHA1_UPDATE_DEFAULT_DISPATCH=$(NASM_SYMBOL_PREFIX)sha1_transform_blocks_default \
207 EXTRA_DIST += build-aux/nasm_lt.sh
210 ##############################################################################
212 ##############################################################################
214 bin_PROGRAMS = wimlib-imagex
215 dist_bin_SCRIPTS = programs/mkwinpeimg
217 wimlib_imagex_SOURCES = \
220 include/wimlib_tchar.h
222 if WINDOWS_NATIVE_BUILD
223 wimlib_imagex_SOURCES += \
224 programs/imagex-win32.c \
225 programs/imagex-win32.h \
230 wimlib_imagex_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations
232 wimlib_imagex_LDADD = $(top_builddir)/libwim.la
234 wimlib_imagex_cmds = \
252 ##############################################################################
254 ##############################################################################
257 for cmd in $(wimlib_imagex_cmds); do \
258 cd $(DESTDIR)$(bindir) && \
259 ln -f wimlib-imagex wim$${cmd}; \
263 for cmd in $(wimlib_imagex_cmds); do \
264 cd $(DESTDIR)$(mandir)/man1 && \
265 ln -sf wimlib-imagex-$${cmd}.1 wim$${cmd}.1; \
269 for cmd in $(wimlib_imagex_cmds); do \
270 rm -f $(DESTDIR)$(bindir)/wim$${cmd}; \
271 rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1; \
274 ##############################################################################
276 ##############################################################################
279 doc/man1/wimlib-imagex.1 \
280 doc/man1/wimlib-imagex-append.1 \
281 doc/man1/wimlib-imagex-apply.1 \
282 doc/man1/wimlib-imagex-capture.1 \
283 doc/man1/wimlib-imagex-delete.1 \
284 doc/man1/wimlib-imagex-dir.1 \
285 doc/man1/wimlib-imagex-export.1 \
286 doc/man1/wimlib-imagex-extract.1 \
287 doc/man1/wimlib-imagex-info.1 \
288 doc/man1/wimlib-imagex-join.1 \
289 doc/man1/wimlib-imagex-mount.1 \
290 doc/man1/wimlib-imagex-mountrw.1 \
291 doc/man1/wimlib-imagex-optimize.1 \
292 doc/man1/wimlib-imagex-split.1 \
293 doc/man1/wimlib-imagex-unmount.1 \
294 doc/man1/wimlib-imagex-update.1 \
295 doc/man1/wimlib-imagex-verify.1 \
296 doc/man1/mkwinpeimg.1
298 EXTRA_DIST += $(man1_MANS)
300 ##############################################################################
302 ##############################################################################
304 check_PROGRAMS = tests/tree-cmp
305 tests_tree_cmp_SOURCES = tests/tree-cmp.c
307 dist_check_SCRIPTS = tests/test-imagex \
308 tests/test-imagex-capture_and_apply \
309 tests/test-imagex-update_and_extract
312 dist_check_SCRIPTS += tests/test-imagex-mount
316 dist_check_SCRIPTS += tests/test-imagex-ntfs
320 tests/common_tests.sh \
321 tests/tests-common.sh \
322 tests/security_descriptor_1.base64 \
323 tests/security_descriptor_1.bin \
324 tests/security_descriptor_2.base64 \
325 tests/security_descriptor_2.bin
327 if WINDOWS_NATIVE_BUILD
328 # Tests are run manually for Windows builds.
331 TESTS = $(dist_check_SCRIPTS)
334 ##############################################################################