035eda4c04d64ebb83bc0773a46277d39fe80432
[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/rbtree.c            \
38         src/rbtree.h            \
39         src/rbtree_augmented.h  \
40         src/security.c          \
41         src/security.h          \
42         src/sha1.c              \
43         src/sha1.h              \
44         src/split.c             \
45         src/symlink.c           \
46         src/timestamp.h         \
47         src/util.c              \
48         src/util.h              \
49         src/wim.c               \
50         src/wimlib.h            \
51         src/wimlib_internal.h   \
52         src/write.c             \
53         src/xml.c               \
54         src/xml.h               \
55         src/xpress-comp.c       \
56         src/xpress-decomp.c     \
57         src/xpress.h
58
59 EXTRA_libwim_la_SOURCES = src/sha1-ssse3.asm
60 libwim_la_DEPENDENCIES = $(SSSE3_SHA1_OBJ)
61 STRIP_FPIC = sh $(top_srcdir)/build-aux/strip_fPIC.sh
62
63 sha1-ssse3.lo:src/sha1-ssse3.asm
64         $(LIBTOOL) --mode=compile --tag=CC $(STRIP_FPIC) $(NASM) -f elf64 \
65         -DINTEL_SHA1_UPDATE_DEFAULT_DISPATCH=ssse3_not_found \
66         $<
67
68 libwim_la_LIBADD =              \
69         $(LIBXML2_LDADD)        \
70         $(LIBFUSE_LDADD)        \
71         $(LIBNTFS_3G_LDADD)     \
72         $(LTLIBICONV)           \
73         $(LIBCRYPTO_LDADD)      \
74         $(SSSE3_SHA1_OBJ)       \
75         $(PTHREAD_LDADD)
76
77 libwim_la_CFLAGS =              \
78         $(AM_CFLAGS)            \
79         -fvisibility=hidden     \
80         $(LIBXML2_CFLAGS)       \
81         $(LIBFUSE_CFLAGS)       \
82         $(LIBNTFS_3G_CFLAGS)    \
83         $(LIBCRYPTO_CFLAGS)
84
85
86 bin_PROGRAMS     = imagex
87 imagex_SOURCES   = programs/imagex.c
88 imagex_LDADD     = $(top_builddir)/libwim.la
89
90 dist_bin_SCRIPTS = programs/mkwinpeimg
91
92 include_HEADERS = src/wimlib.h
93
94 EXTRA_DIST =                                    \
95         build-aux/strip_fPIC.sh                 \
96         archlinux                               \
97         debian                                  \
98         rpm                                     \
99         programs/install.cmd                    \
100         tests/common_tests.sh                   \
101         tests/security_descriptor_1.base64      \
102         tests/security_descriptor_1.bin         \
103         tests/security_descriptor_2.base64      \
104         tests/security_descriptor_2.bin
105
106 pkgconfigdir    = @pkgconfigdir@
107 pkgconfig_DATA  = wimlib.pc
108
109 $(pkgconfig_DATA): config.status
110
111 man1_MANS =                     \
112         doc/imagex.1            \
113         doc/imagex-append.1     \
114         doc/imagex-apply.1      \
115         doc/imagex-capture.1    \
116         doc/imagex-delete.1     \
117         doc/imagex-dir.1        \
118         doc/imagex-export.1     \
119         doc/imagex-info.1       \
120         doc/imagex-join.1       \
121         doc/imagex-mount.1      \
122         doc/imagex-mountrw.1    \
123         doc/imagex-split.1      \
124         doc/imagex-unmount.1    \
125         doc/mkwinpeimg.1
126
127 $(man1_MANS): config.status
128
129 check_PROGRAMS = tests/tree-cmp
130 tests_tree_cmp_SOURCES = tests/tree-cmp.c
131
132 dist_check_SCRIPTS = tests/test-imagex \
133                      tests/test-imagex-capture_and_apply
134
135 if WITH_FUSE
136 dist_check_SCRIPTS += tests/test-imagex-mount
137 endif
138
139 if WITH_NTFS_3G
140 dist_check_SCRIPTS += tests/test-imagex-ntfs
141 endif
142
143 TESTS = $(dist_check_SCRIPTS)
144