wimextract: Rename --no-wildcards to --no-globs; update man page
[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=gnu99 -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 15:0:0 $(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/encoding.c          \
33         src/export_image.c      \
34         src/extract.c           \
35         src/file_io.c           \
36         src/header.c            \
37         src/inode.c             \
38         src/inode_fixup.c       \
39         src/integrity.c         \
40         src/iterate_dir.c       \
41         src/join.c              \
42         src/lookup_table.c      \
43         src/lzms-common.c       \
44         src/lzms-compress.c     \
45         src/lzms-decompress.c   \
46         src/lz_bt.c             \
47         src/lz_hash.c           \
48         src/lzx-common.c        \
49         src/lzx-compress.c      \
50         src/lzx-decompress.c    \
51         src/metadata_resource.c \
52         src/mount_image.c       \
53         src/pathlist.c          \
54         src/paths.c             \
55         src/resource.c          \
56         src/reference.c         \
57         src/security.c          \
58         src/sha1.c              \
59         src/split.c             \
60         src/reparse.c           \
61         src/tagged_items.c      \
62         src/template.c          \
63         src/textfile.c          \
64         src/timestamp.c         \
65         src/update_image.c      \
66         src/util.c              \
67         src/verify.c            \
68         src/wildcard.c          \
69         src/wim.c               \
70         src/write.c             \
71         src/xml.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   \
98         include/wimlib/lz.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
123
124 if WITH_NTFS_3G
125 libwim_la_SOURCES += src/ntfs-3g_apply.c        \
126                      src/ntfs-3g_capture.c      \
127                      include/wimlib/ntfs_3g.h
128 endif
129
130 if WINDOWS_NATIVE_BUILD
131 libwim_la_SOURCES += src/win32_common.c                 \
132                      src/win32_apply.c                  \
133                      src/win32_capture.c                \
134                      src/win32_replacements.c           \
135                      src/wimboot.c                      \
136                      include/wimlib/win32_common.h      \
137                      include/wimlib/win32.h             \
138                      include/wimlib/wimboot.h           \
139                      include/wimlib/wof.h
140 else
141 libwim_la_SOURCES += src/unix_apply.c           \
142                      src/unix_capture.c
143 endif
144
145
146
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
150
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 \
154         $<
155
156 libwim_la_LIBADD =              \
157         $(LIBXML2_LIBS)         \
158         $(LIBFUSE_LIBS)         \
159         $(LIBRT_LIBS)           \
160         $(LIBNTFS_3G_LIBS)      \
161         $(LTLIBICONV)           \
162         $(LIBCRYPTO_LIBS)       \
163         $(SSSE3_SHA1_OBJ)       \
164         $(PTHREAD_LDADD)        \
165         $(WINDOWS_LDADD)
166
167 libwim_la_CFLAGS =              \
168         $(AM_CFLAGS)            \
169         $(VISIBILITY_CFLAGS)    \
170         $(LIBXML2_CFLAGS)       \
171         $(LIBFUSE_CFLAGS)       \
172         $(LIBNTFS_3G_CFLAGS)    \
173         $(LIBCRYPTO_CFLAGS)
174
175
176 bin_PROGRAMS     = imagex
177 imagex_SOURCES   = programs/imagex.c    \
178                    include/wimlib.h     \
179                    include/wimlib_tchar.h
180 imagex_LDADD     = $(top_builddir)/libwim.la
181 imagex_CFLAGS    = $(AM_CFLAGS) $(WINDOWS_CFLAGS) -Wno-deprecated-declarations
182
183 if WINDOWS_NATIVE_BUILD
184 imagex_SOURCES += programs/imagex-win32.c       \
185                   programs/imagex-win32.h       \
186                   programs/wgetopt.c            \
187                   programs/wgetopt.h
188 endif
189
190 imagex_cmds =   append  \
191                 apply   \
192                 capture \
193                 delete  \
194                 dir     \
195                 export  \
196                 extract \
197                 info    \
198                 join    \
199                 mount   \
200                 mountrw \
201                 optimize\
202                 split   \
203                 unmount \
204                 update
205
206 install-exec-hook:
207         if [ "@IMAGEX_PROGNAME@" != imagex ]; then                          \
208                 cd $(DESTDIR)$(bindir) && mv -f imagex "@IMAGEX_PROGNAME@"; \
209         fi
210         for cmd in $(imagex_cmds); do                           \
211                 cd $(DESTDIR)$(bindir) &&                       \
212                         ln -f "@IMAGEX_PROGNAME@" wim$${cmd};   \
213         done
214
215 install-data-hook:
216         for cmd in $(imagex_cmds); do                                       \
217                 cd $(DESTDIR)$(mandir)/man1 &&                              \
218                         ln -sf "@IMAGEX_PROGNAME@-$${cmd}.1" wim$${cmd}.1;  \
219         done
220
221 uninstall-hook:
222         if [ "@IMAGEX_PROGNAME@" != imagex ]; then              \
223                 rm -f $(DESTDIR)$(bindir)/"@IMAGEX_PROGNAME@";  \
224                 rm -f $(DESTDIR)$(bindir)/imagex;               \
225         fi
226         for cmd in $(imagex_cmds); do                           \
227                 rm -f $(DESTDIR)$(bindir)/wim$${cmd};           \
228         done
229         for cmd in $(imagex_cmds); do                           \
230                 rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1;    \
231         done
232
233
234 dist_bin_SCRIPTS = programs/mkwinpeimg
235
236 include_HEADERS = include/wimlib.h
237
238 EXTRA_DIST =                                    \
239         build-aux/strip_fPIC.sh                 \
240         archlinux                               \
241         debian                                  \
242         rpm                                     \
243         examples                                \
244         README.WINDOWS                          \
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
251
252 pkgconfigdir    = @pkgconfigdir@
253 pkgconfig_DATA  = wimlib.pc
254
255 $(pkgconfig_DATA): config.status
256
257 wimlib_manpages =                               \
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
275
276 man1_MANS = $(wimlib_manpages)
277 DISTCLEANFILES = $(wimlib_manpages)
278
279 $(man1_MANS): config.status
280
281 check_PROGRAMS = tests/tree-cmp
282 tests_tree_cmp_SOURCES = tests/tree-cmp.c
283
284 dist_check_SCRIPTS = tests/test-imagex \
285                      tests/test-imagex-capture_and_apply \
286                      tests/test-imagex-update_and_extract
287
288 if WITH_FUSE
289 dist_check_SCRIPTS += tests/test-imagex-mount
290 endif
291
292 if WITH_NTFS_3G
293 dist_check_SCRIPTS += tests/test-imagex-ntfs
294 endif
295
296 if WINDOWS_NATIVE_BUILD
297 # Tests are run manually for Windows builds.
298 TESTS =
299 else
300 TESTS = $(dist_check_SCRIPTS)
301 endif
302