added a plugin providing crypto test vectors
[strongswan.git] / src / libstrongswan / Makefile.am
1 lib_LTLIBRARIES = libstrongswan.la
2
3 if USE_INTEGRITY_TEST
4   libstrongswan_la_SOURCES = \
5   fips/fips_canister_start.c \
6   fips/fips.c fips/fips.h
7 else
8   libstrongswan_la_SOURCES =
9 endif
10
11 libstrongswan_la_SOURCES += \
12 library.c library.h \
13 chunk.c chunk.h \
14 debug.c debug.h \
15 enum.c enum.h \
16 settings.h settings.c \
17 printf_hook.c printf_hook.h \
18 asn1/asn1.c asn1/asn1.h \
19 asn1/asn1_parser.c asn1/asn1_parser.h \
20 asn1/oid.c asn1/oid.h \
21 asn1/pem.c asn1/pem.h \
22 crypto/crypters/crypter.c crypto/crypters/crypter.h \
23 crypto/hashers/hasher.h crypto/hashers/hasher.c \
24 crypto/pkcs9.c crypto/pkcs9.h \
25 crypto/proposal/proposal_keywords.c crypto/proposal/proposal_keywords.h \
26 crypto/prfs/prf.c crypto/prfs/prf.h \
27 crypto/rngs/rng.c crypto/rngs/rng.h \
28 crypto/prf_plus.h crypto/prf_plus.c \
29 crypto/signers/signer.c crypto/signers/signer.h \
30 crypto/crypto_factory.c crypto/crypto_factory.h \
31 crypto/crypto_tester.c crypto/crypto_tester.h \
32 crypto/diffie_hellman.c crypto/diffie_hellman.h \
33 crypto/transform.c crypto/transform.h \
34 credentials/credential_factory.c credentials/credential_factory.h \
35 credentials/builder.c credentials/builder.h \
36 credentials/keys/private_key.c credentials/keys/private_key.h \
37 credentials/keys/public_key.c credentials/keys/public_key.h \
38 credentials/keys/shared_key.c credentials/keys/shared_key.h \
39 credentials/certificates/certificate.c credentials/certificates/certificate.h \
40 credentials/certificates/x509.h credentials/certificates/x509.c \
41 credentials/certificates/ac.h \
42 credentials/certificates/crl.h credentials/certificates/crl.c \
43 credentials/certificates/ocsp_request.h \
44 credentials/certificates/ocsp_response.h credentials/certificates/ocsp_response.c \
45 database/database.h database/database_factory.h database/database_factory.c \
46 fetcher/fetcher.h fetcher/fetcher_manager.h fetcher/fetcher_manager.c \
47 pgp/pgp.c pgp/pgp.h \
48 utils.h utils.c \
49 utils/host.c utils/host.h \
50 utils/identification.c utils/identification.h \
51 utils/iterator.h \
52 utils/lexparser.c utils/lexparser.h \
53 utils/linked_list.c utils/linked_list.h \
54 utils/hashtable.c utils/hashtable.h \
55 utils/enumerator.c utils/enumerator.h \
56 utils/optionsfrom.c utils/optionsfrom.h \
57 utils/mutex.c utils/mutex.h \
58 utils/backtrace.c utils/backtrace.h \
59 plugins/plugin_loader.c plugins/plugin_loader.h plugins/plugin.h
60
61 libstrongswan_la_LIBADD = -lpthread $(DLLIB)
62
63 INCLUDES = -I$(top_srcdir)/src/libstrongswan
64 AM_CFLAGS = \
65 -DIPSEC_DIR=\"${ipsecdir}\" \
66 -DIPSEC_PLUGINDIR=\"${plugindir}\"
67
68 if USE_LEAK_DETECTIVE
69   AM_CFLAGS += -DLEAK_DETECTIVE
70   libstrongswan_la_SOURCES += \
71     utils/leak_detective.c utils/leak_detective.h
72 endif
73
74 if USE_LOCK_PROFILER
75   AM_CFLAGS += -DLOCK_PROFILER
76 endif
77
78 if USE_INTEGRITY_TEST
79   libstrongswan_la_SOURCES += \
80   fips/fips_canister_end.c
81 endif
82
83 if USE_VSTR
84   libstrongswan_la_LIBADD += -lvstr
85 endif
86
87 EXTRA_DIST = \
88 asn1/oid.txt asn1/oid.pl \
89 crypto/proposal/proposal_keywords.txt
90
91 BUILT_SOURCES = \
92 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
93 $(srcdir)/crypto/proposal/proposal_keywords.c
94
95 MAINTAINERCLEANFILES = \
96 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
97 $(srcdir)/crypto/proposal/proposal_keywords.c
98
99 $(srcdir)/asn1/oid.c :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
100                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
101
102 $(srcdir)/asn1/oid.h :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
103                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
104
105 $(srcdir)/crypto/proposal/proposal_keywords.c:  $(srcdir)/crypto/proposal/proposal_keywords.txt \
106                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords.h
107                 $(GPERF) -N proposal_get_token -m 10 -C -G -c -t -D < \
108                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords.txt > $@
109
110
111 # build plugins with their own Makefile
112 #######################################
113
114 SUBDIRS = .
115
116 if USE_AES
117   SUBDIRS += plugins/aes
118 endif
119
120 if USE_DES
121   SUBDIRS += plugins/des
122 endif
123
124 if USE_BLOWFISH
125   SUBDIRS += plugins/blowfish
126 endif
127
128 if USE_SERPENT
129   SUBDIRS += plugins/serpent
130 endif
131
132 if USE_TWOFISH
133   SUBDIRS += plugins/twofish
134 endif
135
136 if USE_MD4
137   SUBDIRS += plugins/md4
138 endif
139
140 if USE_MD5
141   SUBDIRS += plugins/md5
142 endif
143
144 if USE_SHA1
145   SUBDIRS += plugins/sha1
146 endif
147
148 if USE_SHA2
149   SUBDIRS += plugins/sha2
150 endif
151
152 if USE_FIPS_PRF
153   SUBDIRS += plugins/fips_prf
154 endif
155
156 if USE_GMP
157   SUBDIRS += plugins/gmp
158 endif
159
160 if USE_RANDOM
161   SUBDIRS += plugins/random
162 endif
163
164 if USE_HMAC
165   SUBDIRS += plugins/hmac
166 endif
167
168 if USE_XCBC
169   SUBDIRS += plugins/xcbc
170 endif
171
172 if USE_X509
173   SUBDIRS += plugins/x509
174 endif
175
176 if USE_PUBKEY
177   SUBDIRS += plugins/pubkey
178 endif
179
180 if USE_CURL
181   SUBDIRS += plugins/curl
182 endif
183
184 if USE_LDAP
185   SUBDIRS += plugins/ldap
186 endif
187
188 if USE_MYSQL
189   SUBDIRS += plugins/mysql
190 endif
191
192 if USE_SQLITE
193   SUBDIRS += plugins/sqlite
194 endif
195
196 if USE_PADLOCK
197   SUBDIRS += plugins/padlock
198 endif
199
200 if USE_OPENSSL
201   SUBDIRS += plugins/openssl
202 endif
203
204 if USE_GCRYPT
205   SUBDIRS += plugins/gcrypt
206 endif
207
208 if USE_AGENT
209   SUBDIRS += plugins/agent
210 endif
211
212 if USE_TEST_VECTORS
213   SUBDIRS += plugins/test_vectors
214 endif
215
216 if USE_INTEGRITY_TEST
217   SUBDIRS += fips
218 endif