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 9:1:0 $(WINDOWS_LDFLAGS)
22 src/capture_common.c \
39 src/lzx-decompress.c \
40 src/metadata_resource.c \
56 src/xpress-compress.c \
57 src/xpress-decompress.c \
58 include/wimlib/apply.h \
59 include/wimlib/assert.h \
60 include/wimlib/callback.h \
61 include/wimlib/capture.h \
62 include/wimlib/compiler.h \
63 include/wimlib/compress.h \
64 include/wimlib/decompress.h \
65 include/wimlib/dentry.h \
66 include/wimlib/encoding.h \
67 include/wimlib/endianness.h \
68 include/wimlib/error.h \
69 include/wimlib/file_io.h \
70 include/wimlib/glob.h \
71 include/wimlib/header.h \
72 include/wimlib/integrity.h \
73 include/wimlib/list.h \
74 include/wimlib/lookup_table.h \
75 include/wimlib/lzx.h \
76 include/wimlib/metadata.h \
77 include/wimlib/paths.h \
78 include/wimlib/rbtree.h \
79 include/wimlib/reparse.h \
80 include/wimlib/resource.h \
81 include/wimlib/security.h \
82 include/wimlib/security_descriptor.h \
83 include/wimlib/sha1.h \
84 include/wimlib/timestamp.h \
85 include/wimlib/types.h \
86 include/wimlib/util.h \
87 include/wimlib/version.h \
88 include/wimlib/wim.h \
89 include/wimlib/write.h \
90 include/wimlib/xml.h \
91 include/wimlib/xpress.h
94 libwim_la_SOURCES += src/ntfs-3g_apply.c \
95 src/ntfs-3g_capture.c \
96 include/wimlib/ntfs_3g.h
99 if WINDOWS_NATIVE_BUILD
100 libwim_la_SOURCES += src/win32_common.c \
102 src/win32_capture.c \
103 src/win32_replacements.c \
104 include/wimlib/win32_common.h \
105 include/wimlib/win32.h
107 libwim_la_SOURCES += src/unix_apply.c \
113 EXTRA_libwim_la_SOURCES = src/sha1-ssse3.asm
114 libwim_la_DEPENDENCIES = $(SSSE3_SHA1_OBJ)
115 STRIP_FPIC = sh $(top_srcdir)/build-aux/strip_fPIC.sh
117 sha1-ssse3.lo:src/sha1-ssse3.asm
118 $(LIBTOOL) --mode=compile --tag=CC $(STRIP_FPIC) $(NASM) -f elf64 \
119 -DINTEL_SHA1_UPDATE_DEFAULT_DISPATCH=ssse3_not_found \
135 $(VISIBILITY_CFLAGS) \
138 $(LIBNTFS_3G_CFLAGS) \
142 bin_PROGRAMS = imagex
143 imagex_SOURCES = programs/imagex.c \
145 include/wimlib_tchar.h
146 imagex_LDADD = $(top_builddir)/libwim.la
147 imagex_CFLAGS = $(AM_CFLAGS) $(WINDOWS_CFLAGS) -Wno-deprecated-declarations
149 if WINDOWS_NATIVE_BUILD
150 imagex_SOURCES += programs/imagex-win32.c \
151 programs/imagex-win32.h \
156 imagex_cmds = append \
173 if [ "@IMAGEX_PROGNAME@" != imagex ]; then \
174 cd $(DESTDIR)$(bindir) && mv -f imagex "@IMAGEX_PROGNAME@"; \
176 for cmd in $(imagex_cmds); do \
177 cd $(DESTDIR)$(bindir) && \
178 ln -f "@IMAGEX_PROGNAME@" wim$${cmd}; \
182 for cmd in $(imagex_cmds); do \
183 cd $(DESTDIR)$(mandir)/man1 && \
184 ln -sf "@IMAGEX_PROGNAME@-$${cmd}.1" wim$${cmd}.1; \
188 if [ "@IMAGEX_PROGNAME@" != imagex ]; then \
189 rm -f $(DESTDIR)$(bindir)/"@IMAGEX_PROGNAME@"; \
190 rm -f $(DESTDIR)$(bindir)/imagex; \
192 for cmd in $(imagex_cmds); do \
193 rm -f $(DESTDIR)$(bindir)/wim$${cmd}; \
195 for cmd in $(imagex_cmds); do \
196 rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1; \
200 dist_bin_SCRIPTS = programs/mkwinpeimg
202 include_HEADERS = include/wimlib.h
205 build-aux/strip_fPIC.sh \
211 programs/install.cmd \
212 programs/wimapply.c \
213 tests/common_tests.sh \
214 tests/tests-common.sh \
215 tests/security_descriptor_1.base64 \
216 tests/security_descriptor_1.bin \
217 tests/security_descriptor_2.base64 \
218 tests/security_descriptor_2.bin
220 pkgconfigdir = @pkgconfigdir@
221 pkgconfig_DATA = wimlib.pc
223 $(pkgconfig_DATA): config.status
226 doc/@IMAGEX_PROGNAME@.1 \
227 doc/@IMAGEX_PROGNAME@-append.1 \
228 doc/@IMAGEX_PROGNAME@-apply.1 \
229 doc/@IMAGEX_PROGNAME@-capture.1 \
230 doc/@IMAGEX_PROGNAME@-delete.1 \
231 doc/@IMAGEX_PROGNAME@-dir.1 \
232 doc/@IMAGEX_PROGNAME@-export.1 \
233 doc/@IMAGEX_PROGNAME@-extract.1 \
234 doc/@IMAGEX_PROGNAME@-info.1 \
235 doc/@IMAGEX_PROGNAME@-join.1 \
236 doc/@IMAGEX_PROGNAME@-mount.1 \
237 doc/@IMAGEX_PROGNAME@-mountrw.1 \
238 doc/@IMAGEX_PROGNAME@-optimize.1 \
239 doc/@IMAGEX_PROGNAME@-split.1 \
240 doc/@IMAGEX_PROGNAME@-unmount.1 \
241 doc/@IMAGEX_PROGNAME@-update.1 \
244 man1_MANS = $(wimlib_manpages)
245 DISTCLEANFILES = $(wimlib_manpages)
247 $(man1_MANS): config.status
249 check_PROGRAMS = tests/tree-cmp
250 tests_tree_cmp_SOURCES = tests/tree-cmp.c
252 dist_check_SCRIPTS = tests/test-imagex \
253 tests/test-imagex-capture_and_apply \
254 tests/test-imagex-update_and_extract
257 dist_check_SCRIPTS += tests/test-imagex-mount
261 dist_check_SCRIPTS += tests/test-imagex-ntfs
264 if WINDOWS_NATIVE_BUILD
265 # Tests are run manually for Windows builds.
268 TESTS = $(dist_check_SCRIPTS)