1 ACLOCAL_AMFLAGS = -I m4
3 AM_CPPFLAGS = -I$(top_srcdir)/include $(WINDOWS_CPPFLAGS) \
4 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
6 AM_CFLAGS = -std=gnu99 -Wmissing-prototypes -Wstrict-prototypes \
7 -Werror-implicit-function-declaration \
8 -fno-common -Wundef -Wno-pointer-sign
10 if WINDOWS_NATIVE_BUILD
11 # This option is needed to make packed structures work as expected
12 # with gcc 4.7+ (mingw) on Windows.
13 AM_CFLAGS += -mno-ms-bitfields
16 lib_LTLIBRARIES = libwim.la
18 libwim_la_LDFLAGS = -version-info 15:0:0 $(WINDOWS_LDFLAGS)
23 src/capture_common.c \
25 src/compress_common.c \
26 src/compress_parallel.c \
27 src/compress_serial.c \
29 src/decompress_common.c \
45 src/lzms-decompress.c \
50 src/lzx-decompress.c \
51 src/metadata_resource.c \
72 src/xpress-compress.c \
73 src/xpress-decompress.c \
74 include/wimlib/apply.h \
75 include/wimlib/assert.h \
76 include/wimlib/avl_tree.h \
77 include/wimlib/callback.h \
78 include/wimlib/capture.h \
79 include/wimlib/case.h \
80 include/wimlib/compiler.h \
81 include/wimlib/compressor_ops.h \
82 include/wimlib/compress_common.h \
83 include/wimlib/chunk_compressor.h \
84 include/wimlib/decompressor_ops.h \
85 include/wimlib/decompress_common.h \
86 include/wimlib/dentry.h \
87 include/wimlib/encoding.h \
88 include/wimlib/endianness.h \
89 include/wimlib/error.h \
90 include/wimlib/file_io.h \
91 include/wimlib/glob.h \
92 include/wimlib/header.h \
93 include/wimlib/inode.h \
94 include/wimlib/inode_table.h \
95 include/wimlib/integrity.h \
96 include/wimlib/list.h \
97 include/wimlib/lookup_table.h \
99 include/wimlib/lz_bt.h \
100 include/wimlib/lz_hash.h \
101 include/wimlib/lzms.h \
102 include/wimlib/lzx.h \
103 include/wimlib/metadata.h \
104 include/wimlib/pathlist.h \
105 include/wimlib/paths.h \
106 include/wimlib/progress.h \
107 include/wimlib/reparse.h \
108 include/wimlib/resource.h \
109 include/wimlib/security.h \
110 include/wimlib/security_descriptor.h \
111 include/wimlib/sha1.h \
112 include/wimlib/textfile.h \
113 include/wimlib/timestamp.h \
114 include/wimlib/types.h \
115 include/wimlib/unix_data.h \
116 include/wimlib/util.h \
117 include/wimlib/version.h \
118 include/wimlib/wildcard.h \
119 include/wimlib/wim.h \
120 include/wimlib/write.h \
121 include/wimlib/xml.h \
122 include/wimlib/xpress.h
125 libwim_la_SOURCES += src/ntfs-3g_apply.c \
126 src/ntfs-3g_capture.c \
127 include/wimlib/ntfs_3g.h
130 if WINDOWS_NATIVE_BUILD
131 libwim_la_SOURCES += src/win32_common.c \
133 src/win32_capture.c \
134 src/win32_replacements.c \
136 include/wimlib/win32_common.h \
137 include/wimlib/win32.h \
138 include/wimlib/wimboot.h \
141 libwim_la_SOURCES += src/unix_apply.c \
147 EXTRA_libwim_la_SOURCES = src/sha1-ssse3.asm
148 libwim_la_DEPENDENCIES = $(SSSE3_SHA1_OBJ)
149 STRIP_FPIC = sh $(top_srcdir)/build-aux/strip_fPIC.sh
151 sha1-ssse3.lo:src/sha1-ssse3.asm
152 $(LIBTOOL) --mode=compile --tag=CC $(STRIP_FPIC) $(NASM) -f elf64 \
153 -DINTEL_SHA1_UPDATE_DEFAULT_DISPATCH=ssse3_not_found \
169 $(VISIBILITY_CFLAGS) \
172 $(LIBNTFS_3G_CFLAGS) \
176 bin_PROGRAMS = imagex
177 imagex_SOURCES = programs/imagex.c \
179 include/wimlib_tchar.h
180 imagex_LDADD = $(top_builddir)/libwim.la
181 imagex_CFLAGS = $(AM_CFLAGS) $(WINDOWS_CFLAGS) -Wno-deprecated-declarations
183 if WINDOWS_NATIVE_BUILD
184 imagex_SOURCES += programs/imagex-win32.c \
185 programs/imagex-win32.h \
190 imagex_cmds = append \
207 if [ "@IMAGEX_PROGNAME@" != imagex ]; then \
208 cd $(DESTDIR)$(bindir) && mv -f imagex "@IMAGEX_PROGNAME@"; \
210 for cmd in $(imagex_cmds); do \
211 cd $(DESTDIR)$(bindir) && \
212 ln -f "@IMAGEX_PROGNAME@" wim$${cmd}; \
216 for cmd in $(imagex_cmds); do \
217 cd $(DESTDIR)$(mandir)/man1 && \
218 ln -sf "@IMAGEX_PROGNAME@-$${cmd}.1" wim$${cmd}.1; \
222 if [ "@IMAGEX_PROGNAME@" != imagex ]; then \
223 rm -f $(DESTDIR)$(bindir)/"@IMAGEX_PROGNAME@"; \
224 rm -f $(DESTDIR)$(bindir)/imagex; \
226 for cmd in $(imagex_cmds); do \
227 rm -f $(DESTDIR)$(bindir)/wim$${cmd}; \
229 for cmd in $(imagex_cmds); do \
230 rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1; \
234 dist_bin_SCRIPTS = programs/mkwinpeimg
236 include_HEADERS = include/wimlib.h
239 build-aux/strip_fPIC.sh \
245 tests/common_tests.sh \
246 tests/tests-common.sh \
247 tests/security_descriptor_1.base64 \
248 tests/security_descriptor_1.bin \
249 tests/security_descriptor_2.base64 \
250 tests/security_descriptor_2.bin
252 pkgconfigdir = @pkgconfigdir@
253 pkgconfig_DATA = wimlib.pc
255 $(pkgconfig_DATA): config.status
258 doc/man1/@IMAGEX_PROGNAME@.1 \
259 doc/man1/@IMAGEX_PROGNAME@-append.1 \
260 doc/man1/@IMAGEX_PROGNAME@-apply.1 \
261 doc/man1/@IMAGEX_PROGNAME@-capture.1 \
262 doc/man1/@IMAGEX_PROGNAME@-delete.1 \
263 doc/man1/@IMAGEX_PROGNAME@-dir.1 \
264 doc/man1/@IMAGEX_PROGNAME@-export.1 \
265 doc/man1/@IMAGEX_PROGNAME@-extract.1 \
266 doc/man1/@IMAGEX_PROGNAME@-info.1 \
267 doc/man1/@IMAGEX_PROGNAME@-join.1 \
268 doc/man1/@IMAGEX_PROGNAME@-mount.1 \
269 doc/man1/@IMAGEX_PROGNAME@-mountrw.1 \
270 doc/man1/@IMAGEX_PROGNAME@-optimize.1 \
271 doc/man1/@IMAGEX_PROGNAME@-split.1 \
272 doc/man1/@IMAGEX_PROGNAME@-unmount.1 \
273 doc/man1/@IMAGEX_PROGNAME@-update.1 \
274 doc/man1/mkwinpeimg.1
276 man1_MANS = $(wimlib_manpages)
277 DISTCLEANFILES = $(wimlib_manpages)
279 $(man1_MANS): config.status
281 check_PROGRAMS = tests/tree-cmp
282 tests_tree_cmp_SOURCES = tests/tree-cmp.c
284 dist_check_SCRIPTS = tests/test-imagex \
285 tests/test-imagex-capture_and_apply \
286 tests/test-imagex-update_and_extract
289 dist_check_SCRIPTS += tests/test-imagex-mount
293 dist_check_SCRIPTS += tests/test-imagex-ntfs
296 if WINDOWS_NATIVE_BUILD
297 # Tests are run manually for Windows builds.
300 TESTS = $(dist_check_SCRIPTS)