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