Update version number to 1.4.0; update NEWS
[wimlib] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 AM_CPPFLAGS     = -I$(top_srcdir)/src $(WINDOWS_CPPFLAGS) \
4                   -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
5 AM_CFLAGS       = -std=gnu99 -fno-strict-aliasing
6
7 lib_LTLIBRARIES = libwim.la
8
9 libwim_la_LDFLAGS = -version-info 7:0:0 $(WINDOWS_LDFLAGS)
10
11 libwim_la_SOURCES =             \
12         src/add_image.c         \
13         src/buffer_io.h         \
14         src/capture_common.c    \
15         src/compress.c          \
16         src/compress.h          \
17         src/decompress.c        \
18         src/decompress.h        \
19         src/delete_image.c      \
20         src/dentry.c            \
21         src/dentry.h            \
22         src/encoding.c          \
23         src/endianness.h        \
24         src/export_image.c      \
25         src/extract_image.c     \
26         src/hardlink.c          \
27         src/header.c            \
28         src/integrity.c         \
29         src/join.c              \
30         src/list.h              \
31         src/lookup_table.c      \
32         src/lookup_table.h      \
33         src/lz77.c              \
34         src/lzx-common.c        \
35         src/lzx-compress.c      \
36         src/lzx-decompress.c    \
37         src/lzx.h               \
38         src/metadata_resource.c \
39         src/mount_image.c       \
40         src/resource.c          \
41         src/rbtree.c            \
42         src/rbtree.h            \
43         src/security.c          \
44         src/security.h          \
45         src/sha1.c              \
46         src/sha1.h              \
47         src/split.c             \
48         src/reparse.c           \
49         src/timestamp.h         \
50         src/update_image.c      \
51         src/util.c              \
52         src/util.h              \
53         src/verify.c            \
54         src/wim.c               \
55         src/wimlib.h            \
56         wimlib_tchar.h          \
57         src/wimlib_internal.h   \
58         src/write.c             \
59         src/xml.c               \
60         src/xml.h               \
61         src/xpress-compress.c   \
62         src/xpress-decompress.c \
63         src/xpress.h
64
65 if WITH_NTFS_3G
66 libwim_la_SOURCES += src/ntfs-apply.c   \
67                      src/ntfs-capture.c
68 endif
69
70
71 EXTRA_libwim_la_SOURCES = src/sha1-ssse3.asm
72 libwim_la_DEPENDENCIES = $(SSSE3_SHA1_OBJ)
73 STRIP_FPIC = sh $(top_srcdir)/build-aux/strip_fPIC.sh
74
75 sha1-ssse3.lo:src/sha1-ssse3.asm
76         $(LIBTOOL) --mode=compile --tag=CC $(STRIP_FPIC) $(NASM) -f elf64 \
77         -DINTEL_SHA1_UPDATE_DEFAULT_DISPATCH=ssse3_not_found \
78         $<
79
80 libwim_la_LIBADD =              \
81         $(LIBXML2_LDADD)        \
82         $(LIBFUSE_LDADD)        \
83         $(LIBNTFS_3G_LDADD)     \
84         $(LTLIBICONV)           \
85         $(LIBCRYPTO_LDADD)      \
86         $(SSSE3_SHA1_OBJ)       \
87         $(PTHREAD_LDADD)        \
88         $(WINDOWS_LDADD)
89
90 libwim_la_CFLAGS =              \
91         $(AM_CFLAGS)            \
92         $(VISIBILITY_CFLAGS)    \
93         $(LIBXML2_CFLAGS)       \
94         $(LIBFUSE_CFLAGS)       \
95         $(LIBNTFS_3G_CFLAGS)    \
96         $(LIBCRYPTO_CFLAGS)
97
98
99 bin_PROGRAMS     = imagex
100 imagex_SOURCES   = programs/imagex.c wimlib_tchar.h
101 imagex_LDADD     = $(top_builddir)/libwim.la
102 imagex_CFLAGS    = $(AM_CFLAGS) $(WINDOWS_CFLAGS)
103
104 if WINDOWS_NATIVE_BUILD
105 imagex_SOURCES += programs/imagex-win32.c       \
106                   programs/imagex-win32.h       \
107                   programs/wgetopt.c            \
108                   programs/wgetopt.h
109
110 libwim_la_SOURCES += src/win32_common.c         \
111                      src/win32_apply.c          \
112                      src/win32_capture.c        \
113                      src/win32.h                \
114                      src/win32_common.h
115 else
116 libwim_la_SOURCES += src/unix_apply.c           \
117                      src/unix_capture.c
118 endif
119
120 install-exec-hook:
121         if [ "@IMAGEX_PROGNAME@" != imagex ]; then \
122                 cd $(DESTDIR)$(bindir) && mv -f imagex "@IMAGEX_PROGNAME@"; \
123         fi
124
125 uninstall-hook:
126         if [ "@IMAGEX_PROGNAME@" != imagex ]; then \
127                 cd $(DESTDIR)$(bindir) && rm -f "@IMAGEX_PROGNAME@"; \
128         fi
129
130 dist_bin_SCRIPTS = programs/mkwinpeimg
131
132 include_HEADERS = src/wimlib.h
133
134 EXTRA_DIST =                                    \
135         build-aux/strip_fPIC.sh                 \
136         archlinux                               \
137         debian                                  \
138         rpm                                     \
139         README.WINDOWS                          \
140         programs/install.cmd                    \
141         programs/wimapply.c                     \
142         tests/common_tests.sh                   \
143         tests/tests-common.sh                   \
144         tests/security_descriptor_1.base64      \
145         tests/security_descriptor_1.bin         \
146         tests/security_descriptor_2.base64      \
147         tests/security_descriptor_2.bin
148
149 pkgconfigdir    = @pkgconfigdir@
150 pkgconfig_DATA  = wimlib.pc
151
152 $(pkgconfig_DATA): config.status
153
154 wimlib_manpages =                               \
155         doc/@IMAGEX_PROGNAME@.1                 \
156         doc/@IMAGEX_PROGNAME@-append.1          \
157         doc/@IMAGEX_PROGNAME@-apply.1           \
158         doc/@IMAGEX_PROGNAME@-capture.1         \
159         doc/@IMAGEX_PROGNAME@-delete.1          \
160         doc/@IMAGEX_PROGNAME@-dir.1             \
161         doc/@IMAGEX_PROGNAME@-export.1          \
162         doc/@IMAGEX_PROGNAME@-extract.1         \
163         doc/@IMAGEX_PROGNAME@-info.1            \
164         doc/@IMAGEX_PROGNAME@-join.1            \
165         doc/@IMAGEX_PROGNAME@-mount.1           \
166         doc/@IMAGEX_PROGNAME@-mountrw.1         \
167         doc/@IMAGEX_PROGNAME@-optimize.1        \
168         doc/@IMAGEX_PROGNAME@-split.1           \
169         doc/@IMAGEX_PROGNAME@-unmount.1         \
170         doc/@IMAGEX_PROGNAME@-update.1          \
171         doc/mkwinpeimg.1
172
173 man1_MANS = $(wimlib_manpages)
174 DISTCLEANFILES = $(wimlib_manpages)
175
176 $(man1_MANS): config.status
177
178 check_PROGRAMS = tests/tree-cmp
179 tests_tree_cmp_SOURCES = tests/tree-cmp.c
180
181 dist_check_SCRIPTS = tests/test-imagex \
182                      tests/test-imagex-capture_and_apply
183
184 if WITH_FUSE
185 dist_check_SCRIPTS += tests/test-imagex-mount
186 endif
187
188 if WITH_NTFS_3G
189 dist_check_SCRIPTS += tests/test-imagex-ntfs
190 endif
191
192 if WINDOWS_NATIVE_BUILD
193 # Tests are run manually for Windows builds.
194 TESTS =
195 else
196 TESTS = $(dist_check_SCRIPTS)
197 endif
198