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