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