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