cec197d39fe8eb85141caedefbef719ed3588a5e
[wimlib] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 AM_CPPFLAGS     = -I$(top_srcdir)/src
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_SOURCES =             \
11         src/comp.c              \
12         src/comp.h              \
13         src/decomp.c            \
14         src/decomp.h            \
15         src/dentry.c            \
16         src/dentry.h            \
17         src/endianness.h        \
18         src/extract.c           \
19         src/hardlink.c          \
20         src/header.c            \
21         src/integrity.c         \
22         src/io.h                \
23         src/join.c              \
24         src/list.h              \
25         src/lookup_table.c      \
26         src/lookup_table.h      \
27         src/lz.c                \
28         src/lzx-common.c        \
29         src/lzx-comp.c          \
30         src/lzx-decomp.c        \
31         src/lzx.h               \
32         src/modify.c            \
33         src/mount.c             \
34         src/ntfs-apply.c        \
35         src/ntfs-capture.c      \
36         src/resource.c          \
37         src/security.c          \
38         src/security.h          \
39         src/sha1.c              \
40         src/sha1.h              \
41         src/split.c             \
42         src/symlink.c           \
43         src/timestamp.h         \
44         src/util.c              \
45         src/util.h              \
46         src/wim.c               \
47         src/wimlib.h            \
48         src/wimlib_internal.h   \
49         src/write.c             \
50         src/xml.c               \
51         src/xml.h               \
52         src/xpress-comp.c       \
53         src/xpress-decomp.c     \
54         src/xpress.h
55
56 EXTRA_libwim_la_SOURCES = src/sha1-ssse3.asm
57 libwim_la_DEPENDENCIES = $(SSSE3_SHA1_OBJ)
58 STRIP_FPIC = sh $(top_srcdir)/build-aux/strip_fPIC.sh
59
60 sha1-ssse3.lo:src/sha1-ssse3.asm
61         $(LIBTOOL) --mode=compile --tag=CC $(STRIP_FPIC) $(NASM) -f elf64 \
62         -DINTEL_SHA1_UPDATE_DEFAULT_DISPATCH=ssse3_not_found \
63         $<
64
65 libwim_la_LIBADD =              \
66         $(LIBXML2_LDADD)        \
67         $(LIBFUSE_LDADD)        \
68         $(LIBNTFS_3G_LDADD)     \
69         $(LTLIBICONV)           \
70         $(LIBCRYPTO_LDADD)      \
71         $(SSSE3_SHA1_OBJ)
72
73 libwim_la_CFLAGS =              \
74         $(AM_CFLAGS)            \
75         -fvisibility=hidden     \
76         $(LIBXML2_CFLAGS)       \
77         $(LIBFUSE_CFLAGS)       \
78         $(LIBNTFS_3G_CFLAGS)    \
79         $(LIBCRYPTO_CFLAGS)
80
81
82 bin_PROGRAMS     = imagex
83 imagex_SOURCES   = programs/imagex.c
84 imagex_LDADD     = $(top_builddir)/libwim.la
85
86 dist_bin_SCRIPTS = programs/mkwinpeimg
87
88 include_HEADERS = src/wimlib.h
89
90 EXTRA_DIST =                                    \
91         build-aux/strip_fPIC.sh                 \
92         debian                                  \
93         programs/install.cmd                    \
94         tests/common_tests.sh                   \
95         tests/security_descriptor_1.base64      \
96         tests/security_descriptor_1.bin         \
97         tests/security_descriptor_2.base64      \
98         tests/security_descriptor_2.bin
99
100 pkgconfigdir    = @pkgconfigdir@
101 pkgconfig_DATA  = wimlib.pc
102
103 $(pkgconfig_DATA): config.status
104
105 man1_MANS =                     \
106         doc/imagex.1            \
107         doc/imagex-append.1     \
108         doc/imagex-apply.1      \
109         doc/imagex-capture.1    \
110         doc/imagex-delete.1     \
111         doc/imagex-dir.1        \
112         doc/imagex-export.1     \
113         doc/imagex-info.1       \
114         doc/imagex-join.1       \
115         doc/imagex-mount.1      \
116         doc/imagex-mountrw.1    \
117         doc/imagex-split.1      \
118         doc/imagex-unmount.1    \
119         doc/mkwinpeimg.1
120
121 $(man1_MANS): config.status
122
123 check_PROGRAMS = tests/tree-cmp
124 tests_tree_cmp_SOURCES = tests/tree-cmp.c
125
126 dist_check_SCRIPTS = tests/test-imagex \
127                      tests/test-imagex-capture_and_apply
128
129 if WITH_FUSE
130 dist_check_SCRIPTS += tests/test-imagex-mount
131 endif
132
133 if WITH_NTFS_3G
134 dist_check_SCRIPTS += tests/test-imagex-ntfs
135 endif
136
137 TESTS = $(dist_check_SCRIPTS)
138