Replace rename()
[wimlib] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 AM_CPPFLAGS     = -I$(top_srcdir)/src $(WINDOWS_CPPFLAGS)
4
5 AM_CFLAGS       = -std=gnu99 -D_LARGEFILE_SOURCE \
6                    -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
7
8 lib_LTLIBRARIES = libwim.la
9
10 libwim_la_LDFLAGS = -version-info 4:0:2 $(WINDOWS_LDFLAGS)
11
12 libwim_la_SOURCES =             \
13         src/add_image.c         \
14         src/buffer_io.h         \
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/symlink.c           \
49         src/timestamp.h         \
50         src/util.c              \
51         src/util.h              \
52         src/verify.c            \
53         src/wim.c               \
54         src/wimlib.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
99 imagex_LDADD     = $(top_builddir)/libwim.la
100
101 if WINDOWS_NATIVE_BUILD
102 imagex_SOURCES += programs/imagex-win32.c programs/imagex-win32.h
103 libwim_la_SOURCES += src/win32.c
104 endif
105
106 dist_bin_SCRIPTS = programs/mkwinpeimg
107
108 include_HEADERS = src/wimlib.h
109
110 EXTRA_DIST =                                    \
111         build-aux/strip_fPIC.sh                 \
112         archlinux                               \
113         debian                                  \
114         rpm                                     \
115         README.WINDOWS                          \
116         programs/install.cmd                    \
117         programs/wimapply.c                     \
118         tests/common_tests.sh                   \
119         tests/tests-common.sh                   \
120         tests/security_descriptor_1.base64      \
121         tests/security_descriptor_1.bin         \
122         tests/security_descriptor_2.base64      \
123         tests/security_descriptor_2.bin
124
125 pkgconfigdir    = @pkgconfigdir@
126 pkgconfig_DATA  = wimlib.pc
127
128 $(pkgconfig_DATA): config.status
129
130 man1_MANS =                     \
131         doc/imagex.1            \
132         doc/imagex-append.1     \
133         doc/imagex-apply.1      \
134         doc/imagex-capture.1    \
135         doc/imagex-delete.1     \
136         doc/imagex-dir.1        \
137         doc/imagex-export.1     \
138         doc/imagex-info.1       \
139         doc/imagex-join.1       \
140         doc/imagex-mount.1      \
141         doc/imagex-mountrw.1    \
142         doc/imagex-optimize.1   \
143         doc/imagex-split.1      \
144         doc/imagex-unmount.1    \
145         doc/mkwinpeimg.1
146
147 $(man1_MANS): config.status
148
149 check_PROGRAMS = tests/tree-cmp
150 tests_tree_cmp_SOURCES = tests/tree-cmp.c
151
152 dist_check_SCRIPTS = tests/test-imagex \
153                      tests/test-imagex-capture_and_apply
154
155 if WITH_FUSE
156 dist_check_SCRIPTS += tests/test-imagex-mount
157 endif
158
159 if WITH_NTFS_3G
160 dist_check_SCRIPTS += tests/test-imagex-ntfs
161 endif
162
163 if WINDOWS_NATIVE_BUILD
164 # TODO: The tests need to be re-written for Windows builds.
165 TESTS =
166 else
167 TESTS = $(dist_check_SCRIPTS)
168 endif
169