]> wimlib.net Git - wimlib/blob - Makefile.am
Update input_bitstream
[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 16:0:1 $(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/export_image.c      \
35         src/extract.c           \
36         src/file_io.c           \
37         src/header.c            \
38         src/inode.c             \
39         src/inode_fixup.c       \
40         src/integrity.c         \
41         src/iterate_dir.c       \
42         src/join.c              \
43         src/lookup_table.c      \
44         src/lz_binary_trees.c   \
45         src/lz_hash_chains.c    \
46         src/lz_lcp_interval_tree.c      \
47         src/lz_linked_suffix_array.c    \
48         src/lz_mf.c             \
49         src/lz_null.c           \
50         src/lz_repsearch.c      \
51         src/lz_suffix_array_utils.c     \
52         src/lzms-common.c       \
53         src/lzms-compress.c     \
54         src/lzms-decompress.c   \
55         src/lzx-common.c        \
56         src/lzx-compress.c      \
57         src/lzx-decompress.c    \
58         src/metadata_resource.c \
59         src/mount_image.c       \
60         src/pathlist.c          \
61         src/paths.c             \
62         src/resource.c          \
63         src/reference.c         \
64         src/security.c          \
65         src/sha1.c              \
66         src/split.c             \
67         src/reparse.c           \
68         src/tagged_items.c      \
69         src/template.c          \
70         src/textfile.c          \
71         src/timestamp.c         \
72         src/update_image.c      \
73         src/util.c              \
74         src/verify.c            \
75         src/wildcard.c          \
76         src/wim.c               \
77         src/write.c             \
78         src/xml.c               \
79         src/xpress-compress.c   \
80         src/xpress-decompress.c \
81         include/wimlib/apply.h          \
82         include/wimlib/assert.h         \
83         include/wimlib/avl_tree.h       \
84         include/wimlib/callback.h       \
85         include/wimlib/capture.h        \
86         include/wimlib/case.h           \
87         include/wimlib/compiler.h       \
88         include/wimlib/compressor_ops.h \
89         include/wimlib/compress_common.h        \
90         include/wimlib/chunk_compressor.h       \
91         include/wimlib/decompressor_ops.h       \
92         include/wimlib/decompress_common.h      \
93         include/wimlib/dentry.h         \
94         include/wimlib/divsufsort.h     \
95         include/wimlib/encoding.h       \
96         include/wimlib/endianness.h     \
97         include/wimlib/error.h          \
98         include/wimlib/file_io.h        \
99         include/wimlib/glob.h           \
100         include/wimlib/header.h         \
101         include/wimlib/inode.h          \
102         include/wimlib/inode_table.h    \
103         include/wimlib/integrity.h      \
104         include/wimlib/list.h           \
105         include/wimlib/lookup_table.h   \
106         include/wimlib/lz_extend.h      \
107         include/wimlib/lz_hash3.h       \
108         include/wimlib/lz_mf.h          \
109         include/wimlib/lz_mf_ops.h      \
110         include/wimlib/lz_repsearch.h   \
111         include/wimlib/lz_suffix_array_utils.h  \
112         include/wimlib/lzms.h           \
113         include/wimlib/lzx.h            \
114         include/wimlib/lzx_constants.h  \
115         include/wimlib/metadata.h       \
116         include/wimlib/pathlist.h       \
117         include/wimlib/paths.h          \
118         include/wimlib/progress.h       \
119         include/wimlib/reparse.h        \
120         include/wimlib/resource.h       \
121         include/wimlib/security.h       \
122         include/wimlib/security_descriptor.h    \
123         include/wimlib/sha1.h           \
124         include/wimlib/textfile.h       \
125         include/wimlib/timestamp.h      \
126         include/wimlib/types.h          \
127         include/wimlib/unix_data.h      \
128         include/wimlib/util.h           \
129         include/wimlib/version.h        \
130         include/wimlib/wildcard.h       \
131         include/wimlib/wim.h            \
132         include/wimlib/write.h          \
133         include/wimlib/xml.h            \
134         include/wimlib/xpress.h
135
136 if WITH_NTFS_3G
137 libwim_la_SOURCES += src/ntfs-3g_apply.c        \
138                      src/ntfs-3g_capture.c      \
139                      include/wimlib/ntfs_3g.h
140 endif
141
142 if WINDOWS_NATIVE_BUILD
143 libwim_la_SOURCES += src/win32_common.c                 \
144                      src/win32_apply.c                  \
145                      src/win32_capture.c                \
146                      src/win32_replacements.c           \
147                      src/wimboot.c                      \
148                      include/wimlib/win32_common.h      \
149                      include/wimlib/win32.h             \
150                      include/wimlib/wimboot.h           \
151                      include/wimlib/wof.h
152 else
153 libwim_la_SOURCES += src/unix_apply.c           \
154                      src/unix_capture.c
155 endif
156
157
158
159 EXTRA_libwim_la_SOURCES = src/sha1-ssse3.asm
160 libwim_la_DEPENDENCIES = $(SSSE3_SHA1_OBJ)
161
162 src/sha1-ssse3.lo:src/sha1-ssse3.asm
163         $(LIBTOOL) --mode=compile --tag NASM $(srcdir)/build-aux/nasm_lt.sh \
164         $(NASM) $(NAFLAGS) $(NASM_WINDOWS_FLAGS)                            \
165         -DINTEL_SHA1_UPDATE_FUNCNAME=$(NASM_SYMBOL_PREFIX)sha1_transform_blocks_ssse3       \
166         -DINTEL_SHA1_UPDATE_DEFAULT_DISPATCH=$(NASM_SYMBOL_PREFIX)sha1_transform_blocks_default  \
167         $< -o $@
168
169 libwim_la_LIBADD =              \
170         $(LIBXML2_LIBS)         \
171         $(LIBFUSE_LIBS)         \
172         $(LIBRT_LIBS)           \
173         $(LIBNTFS_3G_LIBS)      \
174         $(LTLIBICONV)           \
175         $(LIBCRYPTO_LIBS)       \
176         $(SSSE3_SHA1_OBJ)       \
177         $(PTHREAD_LDADD)
178
179 libwim_la_CFLAGS =              \
180         $(AM_CFLAGS)            \
181         $(VISIBILITY_CFLAGS)    \
182         $(LIBXML2_CFLAGS)       \
183         $(LIBFUSE_CFLAGS)       \
184         $(LIBNTFS_3G_CFLAGS)    \
185         $(LIBCRYPTO_CFLAGS)
186
187
188 bin_PROGRAMS     = imagex
189 imagex_SOURCES   = programs/imagex.c    \
190                    include/wimlib.h     \
191                    include/wimlib_tchar.h
192 imagex_LDADD     = $(top_builddir)/libwim.la
193 imagex_CFLAGS    = $(AM_CFLAGS) $(WINDOWS_CFLAGS) -Wno-deprecated-declarations
194
195 if WINDOWS_NATIVE_BUILD
196 imagex_SOURCES += programs/imagex-win32.c       \
197                   programs/imagex-win32.h       \
198                   programs/wgetopt.c            \
199                   programs/wgetopt.h
200 endif
201
202 imagex_cmds =   append  \
203                 apply   \
204                 capture \
205                 delete  \
206                 dir     \
207                 export  \
208                 extract \
209                 info    \
210                 join    \
211                 mount   \
212                 mountrw \
213                 optimize\
214                 split   \
215                 unmount \
216                 update  \
217                 verify
218
219 install-exec-hook:
220         if [ "@IMAGEX_PROGNAME@" != imagex ]; then                          \
221                 cd $(DESTDIR)$(bindir) && mv -f imagex "@IMAGEX_PROGNAME@"; \
222         fi
223         for cmd in $(imagex_cmds); do                           \
224                 cd $(DESTDIR)$(bindir) &&                       \
225                         ln -f "@IMAGEX_PROGNAME@" wim$${cmd};   \
226         done
227
228 install-data-hook:
229         for cmd in $(imagex_cmds); do                                       \
230                 cd $(DESTDIR)$(mandir)/man1 &&                              \
231                         ln -sf "@IMAGEX_PROGNAME@-$${cmd}.1" wim$${cmd}.1;  \
232         done
233
234 uninstall-hook:
235         if [ "@IMAGEX_PROGNAME@" != imagex ]; then              \
236                 rm -f $(DESTDIR)$(bindir)/"@IMAGEX_PROGNAME@";  \
237                 rm -f $(DESTDIR)$(bindir)/imagex;               \
238         fi
239         for cmd in $(imagex_cmds); do                           \
240                 rm -f $(DESTDIR)$(bindir)/wim$${cmd};           \
241         done
242         for cmd in $(imagex_cmds); do                           \
243                 rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1;    \
244         done
245
246
247 dist_bin_SCRIPTS = programs/mkwinpeimg
248
249 include_HEADERS = include/wimlib.h
250
251 EXTRA_DIST =                                    \
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 wimlib_manpages =                               \
275         doc/man1/@IMAGEX_PROGNAME@.1                    \
276         doc/man1/@IMAGEX_PROGNAME@-append.1             \
277         doc/man1/@IMAGEX_PROGNAME@-apply.1              \
278         doc/man1/@IMAGEX_PROGNAME@-capture.1            \
279         doc/man1/@IMAGEX_PROGNAME@-delete.1             \
280         doc/man1/@IMAGEX_PROGNAME@-dir.1                \
281         doc/man1/@IMAGEX_PROGNAME@-export.1             \
282         doc/man1/@IMAGEX_PROGNAME@-extract.1            \
283         doc/man1/@IMAGEX_PROGNAME@-info.1               \
284         doc/man1/@IMAGEX_PROGNAME@-join.1               \
285         doc/man1/@IMAGEX_PROGNAME@-mount.1              \
286         doc/man1/@IMAGEX_PROGNAME@-mountrw.1            \
287         doc/man1/@IMAGEX_PROGNAME@-optimize.1   \
288         doc/man1/@IMAGEX_PROGNAME@-split.1              \
289         doc/man1/@IMAGEX_PROGNAME@-unmount.1            \
290         doc/man1/@IMAGEX_PROGNAME@-update.1             \
291         doc/man1/@IMAGEX_PROGNAME@-verify.1             \
292         doc/man1/mkwinpeimg.1
293
294 man1_MANS = $(wimlib_manpages)
295 DISTCLEANFILES = $(wimlib_manpages)
296
297 $(man1_MANS): config.status
298
299 check_PROGRAMS = tests/tree-cmp
300 tests_tree_cmp_SOURCES = tests/tree-cmp.c
301
302 dist_check_SCRIPTS = tests/test-imagex \
303                      tests/test-imagex-capture_and_apply \
304                      tests/test-imagex-update_and_extract
305
306 if WITH_FUSE
307 dist_check_SCRIPTS += tests/test-imagex-mount
308 endif
309
310 if WITH_NTFS_3G
311 dist_check_SCRIPTS += tests/test-imagex-ntfs
312 endif
313
314 if WINDOWS_NATIVE_BUILD
315 # Tests are run manually for Windows builds.
316 TESTS =
317 else
318 TESTS = $(dist_check_SCRIPTS)
319 endif
320