]> wimlib.net Git - wimlib/blob - Makefile.am
Update progress functions
[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_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/reference.c         \
62         src/security.c          \
63         src/sha1.c              \
64         src/split.c             \
65         src/reparse.c           \
66         src/template.c          \
67         src/textfile.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/avl_tree.h       \
81         include/wimlib/callback.h       \
82         include/wimlib/capture.h        \
83         include/wimlib/case.h           \
84         include/wimlib/compiler.h       \
85         include/wimlib/compressor_ops.h \
86         include/wimlib/compress_common.h        \
87         include/wimlib/chunk_compressor.h       \
88         include/wimlib/decompressor_ops.h       \
89         include/wimlib/decompress_common.h      \
90         include/wimlib/dentry.h         \
91         include/wimlib/encoding.h       \
92         include/wimlib/endianness.h     \
93         include/wimlib/error.h          \
94         include/wimlib/file_io.h        \
95         include/wimlib/glob.h           \
96         include/wimlib/header.h         \
97         include/wimlib/inode.h          \
98         include/wimlib/inode_table.h    \
99         include/wimlib/integrity.h      \
100         include/wimlib/list.h           \
101         include/wimlib/lookup_table.h   \
102         include/wimlib/lz.h             \
103         include/wimlib/lz_hash.h        \
104         include/wimlib/lz_optimal.h     \
105         include/wimlib/lz_sarray.h      \
106         include/wimlib/lzms.h           \
107         include/wimlib/lzx.h            \
108         include/wimlib/metadata.h       \
109         include/wimlib/pathlist.h       \
110         include/wimlib/paths.h          \
111         include/wimlib/progress.h       \
112         include/wimlib/reparse.h        \
113         include/wimlib/resource.h       \
114         include/wimlib/security.h       \
115         include/wimlib/security_descriptor.h    \
116         include/wimlib/sha1.h           \
117         include/wimlib/textfile.h       \
118         include/wimlib/timestamp.h      \
119         include/wimlib/types.h          \
120         include/wimlib/unix_data.h      \
121         include/wimlib/util.h           \
122         include/wimlib/version.h        \
123         include/wimlib/wildcard.h       \
124         include/wimlib/wim.h            \
125         include/wimlib/write.h          \
126         include/wimlib/xml.h            \
127         include/wimlib/xpress.h
128
129 if WITH_NTFS_3G
130 libwim_la_SOURCES += src/ntfs-3g_apply.c        \
131                      src/ntfs-3g_capture.c      \
132                      include/wimlib/ntfs_3g.h
133 endif
134
135 if WINDOWS_NATIVE_BUILD
136 libwim_la_SOURCES += src/win32_common.c                 \
137                      src/win32_apply.c                  \
138                      src/win32_capture.c                \
139                      src/win32_replacements.c           \
140                      src/wimboot.c                      \
141                      include/wimlib/win32_common.h      \
142                      include/wimlib/win32.h             \
143                      include/wimlib/wimboot.h           \
144                      include/wimlib/wof.h
145 else
146 libwim_la_SOURCES += src/unix_apply.c           \
147                      src/unix_capture.c
148 endif
149
150
151
152 EXTRA_libwim_la_SOURCES = src/sha1-ssse3.asm
153 libwim_la_DEPENDENCIES = $(SSSE3_SHA1_OBJ)
154 STRIP_FPIC = sh $(top_srcdir)/build-aux/strip_fPIC.sh
155
156 sha1-ssse3.lo:src/sha1-ssse3.asm
157         $(LIBTOOL) --mode=compile --tag=CC $(STRIP_FPIC) $(NASM) -f elf64 \
158         -DINTEL_SHA1_UPDATE_DEFAULT_DISPATCH=ssse3_not_found \
159         $<
160
161 libwim_la_LIBADD =              \
162         $(LIBXML2_LIBS)         \
163         $(LIBFUSE_LIBS)         \
164         $(LIBRT_LIBS)           \
165         $(LIBNTFS_3G_LIBS)      \
166         $(LTLIBICONV)           \
167         $(LIBCRYPTO_LIBS)       \
168         $(SSSE3_SHA1_OBJ)       \
169         $(PTHREAD_LDADD)        \
170         $(WINDOWS_LDADD)
171
172 libwim_la_CFLAGS =              \
173         $(AM_CFLAGS)            \
174         $(VISIBILITY_CFLAGS)    \
175         $(LIBXML2_CFLAGS)       \
176         $(LIBFUSE_CFLAGS)       \
177         $(LIBNTFS_3G_CFLAGS)    \
178         $(LIBCRYPTO_CFLAGS)
179
180
181 bin_PROGRAMS     = imagex
182 imagex_SOURCES   = programs/imagex.c    \
183                    include/wimlib.h     \
184                    include/wimlib_tchar.h
185 imagex_LDADD     = $(top_builddir)/libwim.la
186 imagex_CFLAGS    = $(AM_CFLAGS) $(WINDOWS_CFLAGS) -Wno-deprecated-declarations
187
188 if WINDOWS_NATIVE_BUILD
189 imagex_SOURCES += programs/imagex-win32.c       \
190                   programs/imagex-win32.h       \
191                   programs/wgetopt.c            \
192                   programs/wgetopt.h
193 endif
194
195 imagex_cmds =   append  \
196                 apply   \
197                 capture \
198                 delete  \
199                 dir     \
200                 export  \
201                 extract \
202                 info    \
203                 join    \
204                 mount   \
205                 mountrw \
206                 optimize\
207                 split   \
208                 unmount \
209                 update
210
211 install-exec-hook:
212         if [ "@IMAGEX_PROGNAME@" != imagex ]; then                          \
213                 cd $(DESTDIR)$(bindir) && mv -f imagex "@IMAGEX_PROGNAME@"; \
214         fi
215         for cmd in $(imagex_cmds); do                           \
216                 cd $(DESTDIR)$(bindir) &&                       \
217                         ln -f "@IMAGEX_PROGNAME@" wim$${cmd};   \
218         done
219
220 install-data-hook:
221         for cmd in $(imagex_cmds); do                                       \
222                 cd $(DESTDIR)$(mandir)/man1 &&                              \
223                         ln -sf "@IMAGEX_PROGNAME@-$${cmd}.1" wim$${cmd}.1;  \
224         done
225
226 uninstall-hook:
227         if [ "@IMAGEX_PROGNAME@" != imagex ]; then              \
228                 rm -f $(DESTDIR)$(bindir)/"@IMAGEX_PROGNAME@";  \
229                 rm -f $(DESTDIR)$(bindir)/imagex;               \
230         fi
231         for cmd in $(imagex_cmds); do                           \
232                 rm -f $(DESTDIR)$(bindir)/wim$${cmd};           \
233         done
234         for cmd in $(imagex_cmds); do                           \
235                 rm -f $(DESTDIR)$(mandir)/man1/wim$${cmd}.1;    \
236         done
237
238
239 dist_bin_SCRIPTS = programs/mkwinpeimg
240
241 include_HEADERS = include/wimlib.h
242
243 EXTRA_DIST =                                    \
244         build-aux/strip_fPIC.sh                 \
245         archlinux                               \
246         debian                                  \
247         rpm                                     \
248         examples                                \
249         README.WINDOWS                          \
250         tests/common_tests.sh                   \
251         tests/tests-common.sh                   \
252         tests/security_descriptor_1.base64      \
253         tests/security_descriptor_1.bin         \
254         tests/security_descriptor_2.base64      \
255         tests/security_descriptor_2.bin
256
257 pkgconfigdir    = @pkgconfigdir@
258 pkgconfig_DATA  = wimlib.pc
259
260 $(pkgconfig_DATA): config.status
261
262 wimlib_manpages =                               \
263         doc/man1/@IMAGEX_PROGNAME@.1                    \
264         doc/man1/@IMAGEX_PROGNAME@-append.1             \
265         doc/man1/@IMAGEX_PROGNAME@-apply.1              \
266         doc/man1/@IMAGEX_PROGNAME@-capture.1            \
267         doc/man1/@IMAGEX_PROGNAME@-delete.1             \
268         doc/man1/@IMAGEX_PROGNAME@-dir.1                \
269         doc/man1/@IMAGEX_PROGNAME@-export.1             \
270         doc/man1/@IMAGEX_PROGNAME@-extract.1            \
271         doc/man1/@IMAGEX_PROGNAME@-info.1               \
272         doc/man1/@IMAGEX_PROGNAME@-join.1               \
273         doc/man1/@IMAGEX_PROGNAME@-mount.1              \
274         doc/man1/@IMAGEX_PROGNAME@-mountrw.1            \
275         doc/man1/@IMAGEX_PROGNAME@-optimize.1   \
276         doc/man1/@IMAGEX_PROGNAME@-split.1              \
277         doc/man1/@IMAGEX_PROGNAME@-unmount.1            \
278         doc/man1/@IMAGEX_PROGNAME@-update.1             \
279         doc/man1/mkwinpeimg.1
280
281 man1_MANS = $(wimlib_manpages)
282 DISTCLEANFILES = $(wimlib_manpages)
283
284 $(man1_MANS): config.status
285
286 check_PROGRAMS = tests/tree-cmp
287 tests_tree_cmp_SOURCES = tests/tree-cmp.c
288
289 dist_check_SCRIPTS = tests/test-imagex \
290                      tests/test-imagex-capture_and_apply \
291                      tests/test-imagex-update_and_extract
292
293 if WITH_FUSE
294 dist_check_SCRIPTS += tests/test-imagex-mount
295 endif
296
297 if WITH_NTFS_3G
298 dist_check_SCRIPTS += tests/test-imagex-ntfs
299 endif
300
301 if WINDOWS_NATIVE_BUILD
302 # Tests are run manually for Windows builds.
303 TESTS =
304 else
305 TESTS = $(dist_check_SCRIPTS)
306 endif
307