-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.am
334 lines (294 loc) · 8.61 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
##############################################################################
# General #
##############################################################################
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -I$(top_srcdir)/include $(PLATFORM_CPPFLAGS) \
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
# Note: -std=gnu99 instead of -std=c99 is needed for unnamed structs and unions,
# which are in C11 but not C99. But we can't yet actually use -std=c11 because
# we want to support older versions of gcc.
AM_CFLAGS = -std=gnu99 $(PLATFORM_CFLAGS) -fno-common \
-Wmissing-prototypes -Wstrict-prototypes \
-Wundef -Wno-pointer-sign
AM_LDFLAGS = $(PLATFORM_LDFLAGS)
EXTRA_DIST = README README.WINDOWS \
COPYING COPYING.GPLv3 COPYING.LGPLv3 \
examples \
archlinux debian rpm
##############################################################################
# Library #
##############################################################################
lib_LTLIBRARIES = libwim.la
include_HEADERS = include/wimlib.h
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = wimlib.pc
wimlib.pc: config.status
libwim_la_SOURCES = \
src/add_image.c \
src/avl_tree.c \
src/capture_common.c \
src/compress.c \
src/compress_common.c \
src/compress_parallel.c \
src/compress_serial.c \
src/decompress.c \
src/decompress_common.c \
src/delete_image.c \
src/dentry.c \
src/divsufsort.c \
src/encoding.c \
src/error.c \
src/export_image.c \
src/extract.c \
src/file_io.c \
src/header.c \
src/inode.c \
src/inode_fixup.c \
src/inode_table.c \
src/integrity.c \
src/iterate_dir.c \
src/join.c \
src/lcpit_matchfinder.c \
src/lookup_table.c \
src/lzms_common.c \
src/lzms_compress.c \
src/lzms_decompress.c \
src/lzx_common.c \
src/lzx_compress.c \
src/lzx_decompress.c \
src/metadata_resource.c \
src/mount_image.c \
src/pathlist.c \
src/paths.c \
src/progress.c \
src/resource.c \
src/reference.c \
src/security.c \
src/sha1.c \
src/solid.c \
src/split.c \
src/reparse.c \
src/tagged_items.c \
src/template.c \
src/textfile.c \
src/timestamp.c \
src/update_image.c \
src/util.c \
src/verify.c \
src/wildcard.c \
src/wim.c \
src/write.c \
src/xml.c \
src/xpress_compress.c \
src/xpress_decompress.c \
include/wimlib/alloca.h \
include/wimlib/apply.h \
include/wimlib/assert.h \
include/wimlib/avl_tree.h \
include/wimlib/bitops.h \
include/wimlib/bt_matchfinder.h \
include/wimlib/callback.h \
include/wimlib/capture.h \
include/wimlib/case.h \
include/wimlib/compiler.h \
include/wimlib/compiler-gcc.h \
include/wimlib/compressor_ops.h \
include/wimlib/compress_common.h \
include/wimlib/chunk_compressor.h \
include/wimlib/decompressor_ops.h \
include/wimlib/decompress_common.h \
include/wimlib/dentry.h \
include/wimlib/divsufsort.h \
include/wimlib/encoding.h \
include/wimlib/endianness.h \
include/wimlib/error.h \
include/wimlib/file_io.h \
include/wimlib/glob.h \
include/wimlib/hc_matchfinder.h \
include/wimlib/header.h \
include/wimlib/inode.h \
include/wimlib/inode_table.h \
include/wimlib/integrity.h \
include/wimlib/lcpit_matchfinder.h \
include/wimlib/list.h \
include/wimlib/lookup_table.h \
include/wimlib/lz_extend.h \
include/wimlib/lz_hash.h \
include/wimlib/lzms_common.h \
include/wimlib/lzms_constants.h \
include/wimlib/lzx_common.h \
include/wimlib/lzx_constants.h \
include/wimlib/matchfinder_avx2.h \
include/wimlib/matchfinder_common.h \
include/wimlib/matchfinder_sse2.h \
include/wimlib/metadata.h \
include/wimlib/pathlist.h \
include/wimlib/paths.h \
include/wimlib/progress.h \
include/wimlib/reparse.h \
include/wimlib/resource.h \
include/wimlib/security.h \
include/wimlib/security_descriptor.h \
include/wimlib/sha1.h \
include/wimlib/solid.h \
include/wimlib/textfile.h \
include/wimlib/timestamp.h \
include/wimlib/types.h \
include/wimlib/unaligned.h \
include/wimlib/unix_data.h \
include/wimlib/util.h \
include/wimlib/wildcard.h \
include/wimlib/wim.h \
include/wimlib/write.h \
include/wimlib/xml.h \
include/wimlib/xpress_constants.h
if WITH_NTFS_3G
libwim_la_SOURCES += src/ntfs-3g_apply.c \
src/ntfs-3g_capture.c \
include/wimlib/ntfs_3g.h
endif
if WINDOWS_NATIVE_BUILD
libwim_la_SOURCES += src/win32_common.c \
src/win32_apply.c \
src/win32_capture.c \
src/win32_replacements.c \
src/wimboot.c \
include/wimlib/win32_common.h \
include/wimlib/win32.h \
include/wimlib/wimboot.h \
include/wimlib/wof.h
else
libwim_la_SOURCES += src/unix_apply.c \
src/unix_capture.c
endif
libwim_la_CFLAGS = \
$(AM_CFLAGS) \
$(PTHREAD_CFLAGS) \
$(LIBXML2_CFLAGS) \
$(LIBNTFS_3G_CFLAGS) \
$(LIBFUSE_CFLAGS) \
$(LIBCRYPTO_CFLAGS)
libwim_la_LDFLAGS = $(AM_LDFLAGS) -version-info 20:0:5
libwim_la_LIBADD = \
$(PTHREAD_LIBS) \
$(LIBXML2_LIBS) \
$(LTLIBICONV) \
$(LIBNTFS_3G_LIBS) \
$(LIBFUSE_LIBS) \
$(LIBRT_LIBS) \
$(LIBCRYPTO_LIBS)
if ENABLE_SSSE3_SHA1
libwim_la_SOURCES += src/sha1-ssse3.asm
libwim_la_LIBADD += src/sha1-ssse3.lo
src/sha1-ssse3.lo:src/sha1-ssse3.asm
$(LIBTOOL) --mode=compile --tag NASM $(srcdir)/build-aux/nasm_lt.sh \
$(NASM) $(NAFLAGS) $(NASM_PLATFORM_FLAGS) \
-DINTEL_SHA1_UPDATE_FUNCNAME=$(NASM_SYMBOL_PREFIX)sha1_transform_blocks_ssse3 \
-DINTEL_SHA1_UPDATE_DEFAULT_DISPATCH=$(NASM_SYMBOL_PREFIX)sha1_transform_blocks_default \
$< -o $@
EXTRA_DIST += build-aux/nasm_lt.sh
endif
##############################################################################
# Programs #
##############################################################################
bin_PROGRAMS = wimlib-imagex
dist_bin_SCRIPTS = programs/mkwinpeimg
wimlib_imagex_SOURCES = \
programs/imagex.c \
include/wimlib.h \
include/wimlib_tchar.h
if WINDOWS_NATIVE_BUILD
wimlib_imagex_SOURCES += \
programs/imagex-win32.c \
programs/imagex-win32.h \
programs/wgetopt.c \
programs/wgetopt.h
endif
wimlib_imagex_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations
wimlib_imagex_LDADD = $(top_builddir)/libwim.la
wimlib_imagex_cmds = \
append \
apply \
capture \
delete \
dir \
export \
extract \
info \
join \
mount \
mountrw \
optimize \
split \
unmount \
update \
verify
##############################################################################
# Hooks #
##############################################################################
install-exec-hook:
for cmd in $(wimlib_imagex_cmds); do \
cd $(DESTDIR)$(bindir) && \
ln -f wimlib-imagex wim$${cmd}; \
done
install-data-hook:
for cmd in $(wimlib_imagex_cmds); do \
cd $(DESTDIR)$(mandir)/man1 && \
ln -sf wimlib-imagex-$${cmd}.1 wim$${cmd}.1; \
done
uninstall-hook:
for cmd in $(wimlib_imagex_cmds); do \
rm -f $(DESTDIR)$(bindir)/wim$${cmd}; \
rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1; \
done
##############################################################################
# Documentation #
##############################################################################
man1_MANS = \
doc/man1/wimlib-imagex.1 \
doc/man1/wimlib-imagex-append.1 \
doc/man1/wimlib-imagex-apply.1 \
doc/man1/wimlib-imagex-capture.1 \
doc/man1/wimlib-imagex-delete.1 \
doc/man1/wimlib-imagex-dir.1 \
doc/man1/wimlib-imagex-export.1 \
doc/man1/wimlib-imagex-extract.1 \
doc/man1/wimlib-imagex-info.1 \
doc/man1/wimlib-imagex-join.1 \
doc/man1/wimlib-imagex-mount.1 \
doc/man1/wimlib-imagex-mountrw.1 \
doc/man1/wimlib-imagex-optimize.1 \
doc/man1/wimlib-imagex-split.1 \
doc/man1/wimlib-imagex-unmount.1 \
doc/man1/wimlib-imagex-update.1 \
doc/man1/wimlib-imagex-verify.1 \
doc/man1/mkwinpeimg.1
EXTRA_DIST += $(man1_MANS)
##############################################################################
# Tests #
##############################################################################
check_PROGRAMS = tests/tree-cmp
tests_tree_cmp_SOURCES = tests/tree-cmp.c
dist_check_SCRIPTS = tests/test-imagex \
tests/test-imagex-capture_and_apply \
tests/test-imagex-update_and_extract
if WITH_FUSE
dist_check_SCRIPTS += tests/test-imagex-mount
endif
if WITH_NTFS_3G
dist_check_SCRIPTS += tests/test-imagex-ntfs
endif
EXTRA_DIST += \
tests/common_tests.sh \
tests/tests-common.sh \
tests/security_descriptor_1.base64 \
tests/security_descriptor_1.bin \
tests/security_descriptor_2.base64 \
tests/security_descriptor_2.bin
if WINDOWS_NATIVE_BUILD
# Tests are run manually for Windows builds.
TESTS =
else
TESTS = $(dist_check_SCRIPTS)
endif
##############################################################################