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.md README.WINDOWS.md NEWS.md \
21 COPYING COPYING.GPLv3 COPYING.LGPLv3 \
23 tools/get-version-number.sh tools/windows-build.sh
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 \
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 \
97 src/xpress_compress.c \
98 src/xpress_decompress.c \
99 include/wimlib/alloca.h \
100 include/wimlib/apply.h \
101 include/wimlib/assert.h \
102 include/wimlib/avl_tree.h \
103 include/wimlib/bitops.h \
104 include/wimlib/blob_table.h \
105 include/wimlib/bt_matchfinder.h \
106 include/wimlib/case.h \
107 include/wimlib/compiler.h \
108 include/wimlib/compressor_ops.h \
109 include/wimlib/compress_common.h \
110 include/wimlib/chunk_compressor.h \
111 include/wimlib/cpu_features.h \
112 include/wimlib/decompressor_ops.h \
113 include/wimlib/decompress_common.h \
114 include/wimlib/dentry.h \
115 include/wimlib/divsufsort.h \
116 include/wimlib/encoding.h \
117 include/wimlib/endianness.h \
118 include/wimlib/error.h \
119 include/wimlib/file_io.h \
120 include/wimlib/glob.h \
121 include/wimlib/guid.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/lcpit_matchfinder.h \
128 include/wimlib/list.h \
129 include/wimlib/lzms_common.h \
130 include/wimlib/lzms_constants.h \
131 include/wimlib/lzx_common.h \
132 include/wimlib/lzx_constants.h \
133 include/wimlib/matchfinder_common.h \
134 include/wimlib/metadata.h \
135 include/wimlib/object_id.h \
136 include/wimlib/pathlist.h \
137 include/wimlib/paths.h \
138 include/wimlib/pattern.h \
139 include/wimlib/progress.h \
140 include/wimlib/registry.h \
141 include/wimlib/reparse.h \
142 include/wimlib/resource.h \
143 include/wimlib/scan.h \
144 include/wimlib/security.h \
145 include/wimlib/security_descriptor.h \
146 include/wimlib/sha1.h \
147 include/wimlib/solid.h \
148 include/wimlib/tagged_items.h \
149 include/wimlib/textfile.h \
150 include/wimlib/threads.h \
151 include/wimlib/timestamp.h \
152 include/wimlib/types.h \
153 include/wimlib/unaligned.h \
154 include/wimlib/unix_data.h \
155 include/wimlib/util.h \
156 include/wimlib/wim.h \
157 include/wimlib/write.h \
158 include/wimlib/xattr.h \
159 include/wimlib/xml.h \
160 include/wimlib/xml_windows.h \
161 include/wimlib/xmlproc.h \
162 include/wimlib/xpress_constants.h
165 libwim_la_SOURCES += src/ntfs-3g_apply.c \
166 src/ntfs-3g_capture.c \
167 include/wimlib/ntfs_3g.h
170 if WINDOWS_NATIVE_BUILD
171 libwim_la_SOURCES += src/wimboot.c \
174 src/win32_capture.c \
175 src/win32_replacements.c \
177 include/wimlib/wimboot.h \
178 include/wimlib/win32.h \
179 include/wimlib/win32_common.h \
180 include/wimlib/win32_vss.h \
182 PLATFORM_LIBS = -lntdll
184 libwim_la_SOURCES += src/unix_apply.c \
189 if ENABLE_TEST_SUPPORT
190 libwim_la_SOURCES += src/test_support.c \
191 include/wimlib/test_support.h
192 if !WINDOWS_NATIVE_BUILD
201 $(LIBNTFS_3G_CFLAGS) \
204 libwim_la_LDFLAGS = $(AM_LDFLAGS) -version-info 38:0:23
213 ##############################################################################
215 ##############################################################################
217 bin_PROGRAMS = wimlib-imagex
218 dist_bin_SCRIPTS = programs/mkwinpeimg
220 wimlib_imagex_SOURCES = \
223 include/wimlib_tchar.h
225 if WINDOWS_NATIVE_BUILD
226 wimlib_imagex_SOURCES += \
227 programs/imagex-win32.c \
228 programs/imagex-win32.h \
233 wimlib_imagex_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations
235 wimlib_imagex_LDADD = $(top_builddir)/libwim.la
237 wimlib_imagex_cmds = \
255 ##############################################################################
257 ##############################################################################
260 for cmd in $(wimlib_imagex_cmds); do \
261 cd $(DESTDIR)$(bindir) && \
262 ln -f wimlib-imagex wim$${cmd}; \
266 for cmd in $(wimlib_imagex_cmds); do \
267 cd $(DESTDIR)$(mandir)/man1 && \
268 ln -sf wim$${cmd}.1 wimlib-imagex-$${cmd}.1; \
272 for cmd in $(wimlib_imagex_cmds); do \
273 rm -f $(DESTDIR)$(bindir)/wim$${cmd}; \
274 rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1; \
277 ##############################################################################
279 ##############################################################################
282 doc/man1/wimlib-imagex.1 \
283 doc/man1/wimappend.1 \
284 doc/man1/wimapply.1 \
285 doc/man1/wimcapture.1 \
286 doc/man1/wimdelete.1 \
288 doc/man1/wimexport.1 \
289 doc/man1/wimextract.1 \
292 doc/man1/wimmount.1 \
293 doc/man1/wimmountrw.1 \
294 doc/man1/wimoptimize.1 \
295 doc/man1/wimsplit.1 \
296 doc/man1/wimunmount.1 \
297 doc/man1/wimupdate.1 \
298 doc/man1/wimverify.1 \
299 doc/man1/mkwinpeimg.1
301 EXTRA_DIST += $(man1_MANS)
303 ##############################################################################
305 ##############################################################################
307 check_PROGRAMS = tests/tree-cmp
308 tests_tree_cmp_SOURCES = tests/tree-cmp.c
310 dist_check_SCRIPTS = tests/test-imagex \
311 tests/test-imagex-capture_and_apply \
312 tests/test-imagex-update_and_extract
315 dist_check_SCRIPTS += tests/test-imagex-mount
319 dist_check_SCRIPTS += tests/test-imagex-ntfs
323 tests/common_tests.sh \
324 tests/exclusionlists \
325 tests/test_utils.sh \
326 tests/security_descriptor_1.base64 \
327 tests/security_descriptor_1.bin \
328 tests/security_descriptor_2.base64 \
329 tests/security_descriptor_2.bin \
332 if WINDOWS_NATIVE_BUILD
333 # Tests are run manually for Windows builds.
336 TESTS = $(dist_check_SCRIPTS)
339 # Extra test programs (not run by 'make check')
340 EXTRA_PROGRAMS = tests/wlfuzz
341 tests_wlfuzz_SOURCES = tests/wlfuzz.c
342 tests_wlfuzz_LDADD = $(top_builddir)/libwim.la
344 ##############################################################################