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