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 \
22 examples tools/get-version-number
24 ##############################################################################
26 ##############################################################################
28 lib_LTLIBRARIES = libwim.la
29 include_HEADERS = include/wimlib.h
31 pkgconfigdir = @pkgconfigdir@
32 pkgconfig_DATA = wimlib.pc
33 wimlib.pc: config.status
40 src/compress_common.c \
41 src/compress_parallel.c \
42 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 \
96 src/xpress_compress.c \
97 src/xpress_decompress.c \
98 include/wimlib/alloca.h \
99 include/wimlib/apply.h \
100 include/wimlib/assert.h \
101 include/wimlib/avl_tree.h \
102 include/wimlib/bitops.h \
103 include/wimlib/blob_table.h \
104 include/wimlib/bt_matchfinder.h \
105 include/wimlib/case.h \
106 include/wimlib/compiler.h \
107 include/wimlib/compressor_ops.h \
108 include/wimlib/compress_common.h \
109 include/wimlib/chunk_compressor.h \
110 include/wimlib/cpu_features.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/guid.h \
121 include/wimlib/hc_matchfinder.h \
122 include/wimlib/header.h \
123 include/wimlib/inode.h \
124 include/wimlib/inode_table.h \
125 include/wimlib/integrity.h \
126 include/wimlib/lcpit_matchfinder.h \
127 include/wimlib/list.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/matchfinder_common.h \
133 include/wimlib/metadata.h \
134 include/wimlib/object_id.h \
135 include/wimlib/pathlist.h \
136 include/wimlib/paths.h \
137 include/wimlib/pattern.h \
138 include/wimlib/progress.h \
139 include/wimlib/registry.h \
140 include/wimlib/reparse.h \
141 include/wimlib/resource.h \
142 include/wimlib/scan.h \
143 include/wimlib/security.h \
144 include/wimlib/security_descriptor.h \
145 include/wimlib/sha1.h \
146 include/wimlib/solid.h \
147 include/wimlib/tagged_items.h \
148 include/wimlib/textfile.h \
149 include/wimlib/threads.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/wim.h \
156 include/wimlib/write.h \
157 include/wimlib/xattr.h \
158 include/wimlib/xml.h \
159 include/wimlib/xml_windows.h \
160 include/wimlib/xmlproc.h \
161 include/wimlib/xpress_constants.h
164 libwim_la_SOURCES += src/ntfs-3g_apply.c \
165 src/ntfs-3g_capture.c \
166 include/wimlib/ntfs_3g.h
169 if WINDOWS_NATIVE_BUILD
170 libwim_la_SOURCES += src/wimboot.c \
173 src/win32_capture.c \
174 src/win32_replacements.c \
176 include/wimlib/wimboot.h \
177 include/wimlib/win32.h \
178 include/wimlib/win32_common.h \
179 include/wimlib/win32_vss.h \
181 PLATFORM_LIBS = -lntdll
183 libwim_la_SOURCES += src/unix_apply.c \
188 if ENABLE_TEST_SUPPORT
189 libwim_la_SOURCES += src/test_support.c \
190 include/wimlib/test_support.h
196 $(LIBNTFS_3G_CFLAGS) \
199 libwim_la_LDFLAGS = $(AM_LDFLAGS) -version-info 36:0:21
208 ##############################################################################
210 ##############################################################################
212 bin_PROGRAMS = wimlib-imagex
213 dist_bin_SCRIPTS = programs/mkwinpeimg
215 wimlib_imagex_SOURCES = \
218 include/wimlib_tchar.h
220 if WINDOWS_NATIVE_BUILD
221 wimlib_imagex_SOURCES += \
222 programs/imagex-win32.c \
223 programs/imagex-win32.h \
228 wimlib_imagex_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations
230 wimlib_imagex_LDADD = $(top_builddir)/libwim.la
232 wimlib_imagex_cmds = \
250 ##############################################################################
252 ##############################################################################
255 for cmd in $(wimlib_imagex_cmds); do \
256 cd $(DESTDIR)$(bindir) && \
257 ln -f wimlib-imagex wim$${cmd}; \
261 for cmd in $(wimlib_imagex_cmds); do \
262 cd $(DESTDIR)$(mandir)/man1 && \
263 ln -sf wim$${cmd}.1 wimlib-imagex-$${cmd}.1; \
267 for cmd in $(wimlib_imagex_cmds); do \
268 rm -f $(DESTDIR)$(bindir)/wim$${cmd}; \
269 rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1; \
272 ##############################################################################
274 ##############################################################################
277 doc/man1/wimlib-imagex.1 \
278 doc/man1/wimappend.1 \
279 doc/man1/wimapply.1 \
280 doc/man1/wimcapture.1 \
281 doc/man1/wimdelete.1 \
283 doc/man1/wimexport.1 \
284 doc/man1/wimextract.1 \
287 doc/man1/wimmount.1 \
288 doc/man1/wimmountrw.1 \
289 doc/man1/wimoptimize.1 \
290 doc/man1/wimsplit.1 \
291 doc/man1/wimunmount.1 \
292 doc/man1/wimupdate.1 \
293 doc/man1/wimverify.1 \
294 doc/man1/mkwinpeimg.1
296 EXTRA_DIST += $(man1_MANS)
298 ##############################################################################
300 ##############################################################################
302 check_PROGRAMS = tests/tree-cmp
303 tests_tree_cmp_SOURCES = tests/tree-cmp.c
305 dist_check_SCRIPTS = tests/test-imagex \
306 tests/test-imagex-capture_and_apply \
307 tests/test-imagex-update_and_extract
310 dist_check_SCRIPTS += tests/test-imagex-mount
314 dist_check_SCRIPTS += tests/test-imagex-ntfs
318 tests/common_tests.sh \
319 tests/exclusionlists \
320 tests/test_utils.sh \
321 tests/security_descriptor_1.base64 \
322 tests/security_descriptor_1.bin \
323 tests/security_descriptor_2.base64 \
324 tests/security_descriptor_2.bin \
327 if WINDOWS_NATIVE_BUILD
328 # Tests are run manually for Windows builds.
331 TESTS = $(dist_check_SCRIPTS)
334 # Extra test programs (not run by 'make check')
335 EXTRA_PROGRAMS = tests/wlfuzz
336 tests_wlfuzz_SOURCES = tests/wlfuzz.c
337 tests_wlfuzz_LDADD = $(top_builddir)/libwim.la
339 ##############################################################################