]> wimlib.net Git - wimlib/blob - Makefile.am
imagex-extract.1.in: Add example for wildcard path
[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 13:0:4 $(WINDOWS_LDFLAGS)
19
20 libwim_la_SOURCES =             \
21         src/add_image.c         \
22         src/capture_common.c    \
23         src/compat.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_hash.c           \
47         src/lz_sarray.c         \
48         src/divsufsort/divsufsort.c             \
49         src/divsufsort/divsufsort.h             \
50         src/divsufsort/divsufsort_private.h     \
51         src/divsufsort/sssort.c \
52         src/divsufsort/trsort.c \
53         src/lzx-common.c        \
54         src/lzx-compress.c      \
55         src/lzx-decompress.c    \
56         src/metadata_resource.c \
57         src/mount_image.c       \
58         src/pathlist.c          \
59         src/paths.c             \
60         src/resource.c          \
61         src/rbtree.c            \
62         src/reference.c         \
63         src/security.c          \
64         src/sha1.c              \
65         src/split.c             \
66         src/reparse.c           \
67         src/template.c          \
68         src/timestamp.c         \
69         src/update_image.c      \
70         src/util.c              \
71         src/verify.c            \
72         src/wildcard.c          \
73         src/wim.c               \
74         src/write.c             \
75         src/xml.c               \
76         src/xpress-compress.c   \
77         src/xpress-decompress.c \
78         include/wimlib/apply.h          \
79         include/wimlib/assert.h         \
80         include/wimlib/callback.h       \
81         include/wimlib/capture.h        \
82         include/wimlib/case.h           \
83         include/wimlib/compiler.h       \
84         include/wimlib/compressor_ops.h \
85         include/wimlib/compress_common.h        \
86         include/wimlib/chunk_compressor.h       \
87         include/wimlib/decompressor_ops.h       \
88         include/wimlib/decompress_common.h      \
89         include/wimlib/dentry.h         \
90         include/wimlib/encoding.h       \
91         include/wimlib/endianness.h     \
92         include/wimlib/error.h          \
93         include/wimlib/file_io.h        \
94         include/wimlib/glob.h           \
95         include/wimlib/header.h         \
96         include/wimlib/inode.h          \
97         include/wimlib/inode_table.h    \
98         include/wimlib/integrity.h      \
99         include/wimlib/list.h           \
100         include/wimlib/lookup_table.h   \
101         include/wimlib/lz.h             \
102         include/wimlib/lz_hash.h        \
103         include/wimlib/lz_optimal.h     \
104         include/wimlib/lz_sarray.h      \
105         include/wimlib/lzms.h           \
106         include/wimlib/lzx.h            \
107         include/wimlib/metadata.h       \
108         include/wimlib/pathlist.h       \
109         include/wimlib/paths.h          \
110         include/wimlib/rbtree.h         \
111         include/wimlib/reparse.h        \
112         include/wimlib/resource.h       \
113         include/wimlib/security.h       \
114         include/wimlib/security_descriptor.h    \
115         include/wimlib/sha1.h           \
116         include/wimlib/timestamp.h      \
117         include/wimlib/types.h          \
118         include/wimlib/unix_data.h      \
119         include/wimlib/util.h           \
120         include/wimlib/version.h        \
121         include/wimlib/wildcard.h       \
122         include/wimlib/wim.h            \
123         include/wimlib/write.h          \
124         include/wimlib/xml.h            \
125         include/wimlib/xpress.h
126
127 if WITH_NTFS_3G
128 libwim_la_SOURCES += src/ntfs-3g_apply.c        \
129                      src/ntfs-3g_capture.c      \
130                      include/wimlib/ntfs_3g.h
131 endif
132
133 if WINDOWS_NATIVE_BUILD
134 libwim_la_SOURCES += src/win32_common.c                 \
135                      src/win32_apply.c                  \
136                      src/win32_capture.c                \
137                      src/win32_replacements.c           \
138                      include/wimlib/win32_common.h      \
139                      include/wimlib/win32.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/@IMAGEX_PROGNAME@.1                 \
259         doc/@IMAGEX_PROGNAME@-append.1          \
260         doc/@IMAGEX_PROGNAME@-apply.1           \
261         doc/@IMAGEX_PROGNAME@-capture.1         \
262         doc/@IMAGEX_PROGNAME@-delete.1          \
263         doc/@IMAGEX_PROGNAME@-dir.1             \
264         doc/@IMAGEX_PROGNAME@-export.1          \
265         doc/@IMAGEX_PROGNAME@-extract.1         \
266         doc/@IMAGEX_PROGNAME@-info.1            \
267         doc/@IMAGEX_PROGNAME@-join.1            \
268         doc/@IMAGEX_PROGNAME@-mount.1           \
269         doc/@IMAGEX_PROGNAME@-mountrw.1         \
270         doc/@IMAGEX_PROGNAME@-optimize.1        \
271         doc/@IMAGEX_PROGNAME@-split.1           \
272         doc/@IMAGEX_PROGNAME@-unmount.1         \
273         doc/@IMAGEX_PROGNAME@-update.1          \
274         doc/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