60e740d9e1a9b93290292abc3d7c7fb2530b8e99
[platform/upstream/cryptsetup.git] / src / Makefile.am
1 INCLUDES = \
2         -I$(top_srcdir)                         \
3         -I$(top_srcdir)/lib                     \
4         -DDATADIR=\""$(datadir)"\"              \
5         -DLOCALEDIR=\""$(datadir)/locale"\"     \
6         -DLIBDIR=\""$(libdir)"\"                \
7         -DPREFIX=\""$(prefix)"\"                \
8         -DSYSCONFDIR=\""$(sysconfdir)"\"        \
9         -DVERSION=\""$(VERSION)"\"              \
10         -D_GNU_SOURCE
11
12 # cryptsetup
13 cryptsetup_SOURCES = \
14         $(top_builddir)/lib/utils_crypt.c       \
15         $(top_builddir)/lib/utils_loop.c        \
16         $(top_builddir)/lib/utils_fips.c        \
17         cryptsetup.c                            \
18         cryptsetup.h
19
20 cryptsetup_LDADD = \
21         $(top_builddir)/lib/libcryptsetup.la    \
22         @POPT_LIBS@                             \
23         @FIPSCHECK_LIBS@
24
25 cryptsetup_CFLAGS = -Wall
26
27 sbin_PROGRAMS=cryptsetup
28
29 if STATIC_TOOLS
30 sbin_PROGRAMS += cryptsetup.static
31 cryptsetup_static_SOURCES = $(cryptsetup_SOURCES)
32 cryptsetup_static_CFLAGS = $(cryptsetup_CFLAGS)
33 cryptsetup_static_LDFLAGS = -all-static
34 cryptsetup_static_LDADD = $(cryptsetup_LDADD)   \
35         @CRYPTO_STATIC_LIBS@                    \
36         @DEVMAPPER_STATIC_LIBS@                 \
37         @UUID_LIBS@
38 endif
39
40 # veritysetup
41 if VERITYSETUP
42
43 veritysetup_SOURCES = \
44         $(top_builddir)/lib/utils_crypt.c       \
45         $(top_builddir)/lib/utils_loop.c        \
46         veritysetup.c                           \
47         cryptsetup.h
48
49 veritysetup_LDADD = \
50         $(top_builddir)/lib/libcryptsetup.la    \
51         @POPT_LIBS@
52
53 veritysetup_CFLAGS = $(cryptsetup_CFLAGS)
54
55 sbin_PROGRAMS += veritysetup
56
57 if STATIC_TOOLS
58 sbin_PROGRAMS += veritysetup.static
59 veritysetup_static_SOURCES = $(veritysetup_SOURCES)
60 veritysetup_static_CFLAGS = $(veritysetup_CFLAGS)
61 veritysetup_static_LDFLAGS = -all-static
62 veritysetup_static_LDADD = $(veritysetup_LDADD) \
63         @CRYPTO_STATIC_LIBS@ \
64         @DEVMAPPER_STATIC_LIBS@ \
65         @UUID_LIBS@
66 endif
67 endif
68
69 # reencrypt
70 if REENCRYPT
71 cryptsetup_reencrypt_SOURCES = \
72         $(top_builddir)/lib/utils_crypt.c       \
73         cryptsetup_reencrypt.c                  \
74         cryptsetup.h
75
76 cryptsetup_reencrypt_LDADD = $(cryptsetup_LDADD)
77 cryptsetup_reencrypt_CFLAGS = $(cryptsetup_CFLAGS)
78
79 sbin_PROGRAMS += cryptsetup-reencrypt
80
81 if STATIC_TOOLS
82 sbin_PROGRAMS += cryptsetup-reencrypt.static
83 cryptsetup_reencrypt_static_SOURCES = $(cryptsetup_reencrypt_SOURCES)
84 cryptsetup_reencrypt_static_CFLAGS = $(cryptsetup_reencrypt_CFLAGS)
85 cryptsetup_reencrypt_static_LDFLAGS = -all-static
86 cryptsetup_reencrypt_static_LDADD = $(cryptsetup_reencrypt_LDADD)       \
87         @CRYPTO_STATIC_LIBS@ \
88         @DEVMAPPER_STATIC_LIBS@ \
89         @UUID_LIBS@
90 endif
91 endif