Added PKCS#11 token plugin stub
[strongswan.git] / src / libstrongswan / Makefile.am
1 lib_LTLIBRARIES = libstrongswan.la
2
3 libstrongswan_la_SOURCES = \
4 library.c library.h \
5 chunk.c chunk.h \
6 debug.c debug.h \
7 enum.c enum.h \
8 settings.h settings.c \
9 printf_hook.c printf_hook.h \
10 asn1/asn1.c asn1/asn1.h \
11 asn1/asn1_parser.c asn1/asn1_parser.h \
12 asn1/oid.c asn1/oid.h \
13 crypto/crypters/crypter.c crypto/crypters/crypter.h \
14 crypto/hashers/hasher.h crypto/hashers/hasher.c \
15 crypto/pkcs9.c crypto/pkcs9.h \
16 crypto/proposal/proposal_keywords.c crypto/proposal/proposal_keywords.h \
17 crypto/prfs/prf.c crypto/prfs/prf.h \
18 crypto/rngs/rng.c crypto/rngs/rng.h \
19 crypto/prf_plus.h crypto/prf_plus.c \
20 crypto/signers/signer.c crypto/signers/signer.h \
21 crypto/crypto_factory.c crypto/crypto_factory.h \
22 crypto/crypto_tester.c crypto/crypto_tester.h \
23 crypto/diffie_hellman.c crypto/diffie_hellman.h \
24 crypto/transform.c crypto/transform.h \
25 credentials/credential_factory.c credentials/credential_factory.h \
26 credentials/builder.c credentials/builder.h \
27 credentials/cred_encoding.c credentials/cred_encoding.h \
28 credentials/keys/private_key.c credentials/keys/private_key.h \
29 credentials/keys/public_key.c credentials/keys/public_key.h \
30 credentials/keys/shared_key.c credentials/keys/shared_key.h \
31 credentials/certificates/certificate.c credentials/certificates/certificate.h \
32 credentials/certificates/x509.h credentials/certificates/x509.c \
33 credentials/certificates/ac.h \
34 credentials/certificates/crl.h credentials/certificates/crl.c \
35 credentials/certificates/pkcs10.h \
36 credentials/certificates/ocsp_request.h \
37 credentials/certificates/ocsp_response.h credentials/certificates/ocsp_response.c \
38 credentials/certificates/pgp_certificate.h \
39 credentials/ietf_attributes/ietf_attributes.c credentials/ietf_attributes/ietf_attributes.h \
40 credentials/credential_manager.c credentials/credential_manager.h \
41 credentials/sets/auth_cfg_wrapper.c credentials/sets/auth_cfg_wrapper.h \
42 credentials/sets/ocsp_response_wrapper.c credentials/sets/ocsp_response_wrapper.h \
43 credentials/sets/cert_cache.c credentials/sets/cert_cache.h \
44 credentials/auth_cfg.c credentials/auth_cfg.h credentials/credential_set.h \
45 credentials/cert_validator.h \
46 database/database.h database/database_factory.h database/database_factory.c \
47 fetcher/fetcher.h fetcher/fetcher_manager.h fetcher/fetcher_manager.c \
48 selectors/traffic_selector.c selectors/traffic_selector.h \
49 threading/thread.h threading/thread.c \
50 threading/thread_value.h threading/thread_value.c \
51 threading/mutex.h threading/mutex.c threading/condvar.h  \
52 threading/rwlock.h threading/rwlock.c \
53 threading/lock_profiler.h \
54 utils.h utils.c \
55 utils/host.c utils/host.h \
56 utils/identification.c utils/identification.h \
57 utils/iterator.h \
58 utils/lexparser.c utils/lexparser.h \
59 utils/linked_list.c utils/linked_list.h \
60 utils/hashtable.c utils/hashtable.h \
61 utils/enumerator.c utils/enumerator.h \
62 utils/optionsfrom.c utils/optionsfrom.h \
63 utils/backtrace.c utils/backtrace.h \
64 plugins/plugin_loader.c plugins/plugin_loader.h plugins/plugin.h
65
66 libstrongswan_la_LIBADD = $(PTHREADLIB) $(DLLIB) $(BTLIB) $(SOCKLIB) $(RTLIB)
67
68 INCLUDES = -I$(top_srcdir)/src/libstrongswan
69 AM_CFLAGS = \
70 -DIPSEC_DIR=\"${ipsecdir}\" \
71 -DPLUGINDIR=\"${plugindir}\" \
72 -DSTRONGSWAN_CONF=\"${strongswan_conf}\"
73
74 if USE_LEAK_DETECTIVE
75   AM_CFLAGS += -DLEAK_DETECTIVE
76   libstrongswan_la_SOURCES += \
77     utils/leak_detective.c utils/leak_detective.h
78 endif
79
80 if USE_LOCK_PROFILER
81   AM_CFLAGS += -DLOCK_PROFILER
82 endif
83
84 if USE_INTEGRITY_TEST
85   AM_CFLAGS += -DINTEGRITY_TEST
86   libstrongswan_la_SOURCES += \
87     integrity_checker.c integrity_checker.h
88 endif
89
90 if USE_VSTR
91   libstrongswan_la_LIBADD += -lvstr
92 endif
93
94 EXTRA_DIST = \
95 asn1/oid.txt asn1/oid.pl \
96 crypto/proposal/proposal_keywords.txt \
97 Android.mk AndroidConfigLocal.h
98
99 BUILT_SOURCES = \
100 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
101 $(srcdir)/crypto/proposal/proposal_keywords.c
102
103 MAINTAINERCLEANFILES = \
104 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
105 $(srcdir)/crypto/proposal/proposal_keywords.c
106
107 $(srcdir)/asn1/oid.c :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
108                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
109
110 $(srcdir)/asn1/oid.h :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
111                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
112
113 $(srcdir)/crypto/proposal/proposal_keywords.c:  $(srcdir)/crypto/proposal/proposal_keywords.txt \
114                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords.h
115                 $(GPERF) -N proposal_get_token -m 10 -C -G -c -t -D < \
116                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords.txt > $@
117
118
119 # build plugins with their own Makefile
120 #######################################
121
122 if MONOLITHIC
123 SUBDIRS =
124 else
125 SUBDIRS = .
126 endif
127
128 if USE_AES
129   SUBDIRS += plugins/aes
130 if MONOLITHIC
131   libstrongswan_la_LIBADD += plugins/aes/libstrongswan-aes.la
132 endif
133 endif
134
135 if USE_DES
136   SUBDIRS += plugins/des
137 if MONOLITHIC
138   libstrongswan_la_LIBADD += plugins/des/libstrongswan-des.la
139 endif
140 endif
141
142 if USE_BLOWFISH
143   SUBDIRS += plugins/blowfish
144 if MONOLITHIC
145   libstrongswan_la_LIBADD += plugins/blowfish/libstrongswan-blowfish.la
146 endif
147 endif
148
149 if USE_MD4
150   SUBDIRS += plugins/md4
151 if MONOLITHIC
152   libstrongswan_la_LIBADD += plugins/md4/libstrongswan-md4.la
153 endif
154 endif
155
156 if USE_MD5
157   SUBDIRS += plugins/md5
158 if MONOLITHIC
159   libstrongswan_la_LIBADD += plugins/md5/libstrongswan-md5.la
160 endif
161 endif
162
163 if USE_SHA1
164   SUBDIRS += plugins/sha1
165 if MONOLITHIC
166   libstrongswan_la_LIBADD += plugins/sha1/libstrongswan-sha1.la
167 endif
168 endif
169
170 if USE_SHA2
171   SUBDIRS += plugins/sha2
172 if MONOLITHIC
173   libstrongswan_la_LIBADD += plugins/sha2/libstrongswan-sha2.la
174 endif
175 endif
176
177 if USE_GMP
178   SUBDIRS += plugins/gmp
179 if MONOLITHIC
180   libstrongswan_la_LIBADD += plugins/gmp/libstrongswan-gmp.la
181 endif
182 endif
183
184 if USE_RANDOM
185   SUBDIRS += plugins/random
186 if MONOLITHIC
187   libstrongswan_la_LIBADD += plugins/random/libstrongswan-random.la
188 endif
189 endif
190
191 if USE_HMAC
192   SUBDIRS += plugins/hmac
193 if MONOLITHIC
194   libstrongswan_la_LIBADD += plugins/hmac/libstrongswan-hmac.la
195 endif
196 endif
197
198 if USE_XCBC
199   SUBDIRS += plugins/xcbc
200 if MONOLITHIC
201   libstrongswan_la_LIBADD += plugins/xcbc/libstrongswan-xcbc.la
202 endif
203 endif
204
205 if USE_X509
206   SUBDIRS += plugins/x509
207 if MONOLITHIC
208   libstrongswan_la_LIBADD += plugins/x509/libstrongswan-x509.la
209 endif
210 endif
211
212 if USE_REVOCATION
213   SUBDIRS += plugins/revocation
214 if MONOLITHIC
215   libstrongswan_la_LIBADD += plugins/revocation/libstrongswan-revocation.la
216 endif
217 endif
218
219 if USE_PUBKEY
220   SUBDIRS += plugins/pubkey
221 if MONOLITHIC
222   libstrongswan_la_LIBADD += plugins/pubkey/libstrongswan-pubkey.la
223 endif
224 endif
225
226 if USE_PKCS1
227   SUBDIRS += plugins/pkcs1
228 if MONOLITHIC
229   libstrongswan_la_LIBADD += plugins/pkcs1/libstrongswan-pkcs1.la
230 endif
231 endif
232
233 if USE_PGP
234   SUBDIRS += plugins/pgp
235 if MONOLITHIC
236   libstrongswan_la_LIBADD += plugins/pgp/libstrongswan-pgp.la
237 endif
238 endif
239
240 if USE_DNSKEY
241   SUBDIRS += plugins/dnskey
242 if MONOLITHIC
243   libstrongswan_la_LIBADD += plugins/dnskey/libstrongswan-dnskey.la
244 endif
245 endif
246
247 if USE_PEM
248   SUBDIRS += plugins/pem
249 if MONOLITHIC
250   libstrongswan_la_LIBADD += plugins/pem/libstrongswan-pem.la
251 endif
252 endif
253
254 if USE_CURL
255   SUBDIRS += plugins/curl
256 if MONOLITHIC
257   libstrongswan_la_LIBADD += plugins/curl/libstrongswan-curl.la
258 endif
259 endif
260
261 if USE_LDAP
262   SUBDIRS += plugins/ldap
263 if MONOLITHIC
264   libstrongswan_la_LIBADD += plugins/ldap/libstrongswan-ldap.la
265 endif
266 endif
267
268 if USE_MYSQL
269   SUBDIRS += plugins/mysql
270 if MONOLITHIC
271   libstrongswan_la_LIBADD += plugins/mysql/libstrongswan-mysql.la
272 endif
273 endif
274
275 if USE_SQLITE
276   SUBDIRS += plugins/sqlite
277 if MONOLITHIC
278   libstrongswan_la_LIBADD += plugins/sqlite/libstrongswan-sqlite.la
279 endif
280 endif
281
282 if USE_PADLOCK
283   SUBDIRS += plugins/padlock
284 if MONOLITHIC
285   libstrongswan_la_LIBADD += plugins/padlock/libstrongswan-padlock.la
286 endif
287 endif
288
289 if USE_OPENSSL
290   SUBDIRS += plugins/openssl
291 if MONOLITHIC
292   libstrongswan_la_LIBADD += plugins/openssl/libstrongswan-openssl.la
293 endif
294 endif
295
296 if USE_GCRYPT
297   SUBDIRS += plugins/gcrypt
298 if MONOLITHIC
299   libstrongswan_la_LIBADD += plugins/gcrypt/libstrongswan-gcrypt.la
300 endif
301 endif
302
303 if USE_FIPS_PRF
304   SUBDIRS += plugins/fips_prf
305 if MONOLITHIC
306   libstrongswan_la_LIBADD += plugins/fips_prf/libstrongswan-fips-prf.la
307 endif
308 endif
309
310 if USE_AGENT
311   SUBDIRS += plugins/agent
312 if MONOLITHIC
313   libstrongswan_la_LIBADD += plugins/agent/libstrongswan-agent.la
314 endif
315 endif
316
317 if USE_PKCS11
318   SUBDIRS += plugins/pkcs11
319 if MONOLITHIC
320   libstrongswan_la_LIBADD += plugins/pkcs11/libstrongswan-pkcs11.la
321 endif
322 endif
323
324 if USE_TEST_VECTORS
325   SUBDIRS += plugins/test_vectors
326 if MONOLITHIC
327   libstrongswan_la_LIBADD += plugins/test_vectors/libstrongswan-test-vectors.la
328 endif
329 endif