stream: add a stream class abstracting BSD sockets
[strongswan.git] / src / libstrongswan / Makefile.am
1 ipseclib_LTLIBRARIES = libstrongswan.la
2
3 libstrongswan_la_SOURCES = \
4 library.c \
5 asn1/asn1.c asn1/asn1_parser.c asn1/oid.c bio/bio_reader.c bio/bio_writer.c \
6 collections/blocking_queue.c collections/enumerator.c collections/hashtable.c \
7 collections/array.c \
8 collections/linked_list.c crypto/crypters/crypter.c crypto/hashers/hasher.c \
9 crypto/proposal/proposal_keywords.c crypto/proposal/proposal_keywords_static.c \
10 crypto/prfs/prf.c crypto/prfs/mac_prf.c crypto/pkcs5.c \
11 crypto/rngs/rng.c crypto/prf_plus.c crypto/signers/signer.c \
12 crypto/signers/mac_signer.c crypto/crypto_factory.c crypto/crypto_tester.c \
13 crypto/diffie_hellman.c crypto/aead.c crypto/transform.c \
14 credentials/credential_factory.c credentials/builder.c \
15 credentials/cred_encoding.c credentials/keys/private_key.c \
16 credentials/keys/public_key.c credentials/keys/shared_key.c \
17 credentials/certificates/certificate.c credentials/certificates/crl.c \
18 credentials/certificates/ocsp_response.c \
19 credentials/containers/container.c credentials/containers/pkcs12.c \
20 credentials/ietf_attributes/ietf_attributes.c credentials/credential_manager.c \
21 credentials/sets/auth_cfg_wrapper.c credentials/sets/ocsp_response_wrapper.c \
22 credentials/sets/cert_cache.c credentials/sets/mem_cred.c \
23 credentials/sets/callback_cred.c credentials/auth_cfg.c database/database.c \
24 database/database_factory.c fetcher/fetcher.c fetcher/fetcher_manager.c eap/eap.c \
25 ipsec/ipsec_types.c \
26 networking/host.c networking/host_resolver.c networking/packet.c \
27 networking/tun_device.c networking/streams/stream.c \
28 pen/pen.c plugins/plugin_loader.c plugins/plugin_feature.c processing/jobs/job.c \
29 processing/jobs/callback_job.c processing/processor.c processing/scheduler.c \
30 processing/watcher.c resolver/resolver_manager.c resolver/rr_set.c \
31 selectors/traffic_selector.c threading/thread.c threading/thread_value.c \
32 threading/mutex.c threading/semaphore.c threading/rwlock.c threading/spinlock.c \
33 utils/utils.c utils/chunk.c utils/debug.c utils/enum.c utils/identification.c \
34 utils/lexparser.c utils/optionsfrom.c utils/capabilities.c utils/backtrace.c \
35 utils/printf_hook.c utils/settings.c
36
37 if USE_DEV_HEADERS
38 strongswan_includedir = ${dev_headers}
39 nobase_strongswan_include_HEADERS = \
40 library.h \
41 asn1/asn1.h asn1/asn1_parser.h asn1/oid.h bio/bio_reader.h bio/bio_writer.h \
42 collections/blocking_queue.h collections/enumerator.h collections/hashtable.h \
43 collections/linked_list.h collections/array.h \
44 crypto/crypters/crypter.h crypto/hashers/hasher.h crypto/mac.h \
45 crypto/proposal/proposal_keywords.h crypto/proposal/proposal_keywords_static.h \
46 crypto/prfs/prf.h crypto/prfs/mac_prf.h crypto/rngs/rng.h crypto/nonce_gen.h \
47 crypto/prf_plus.h crypto/signers/signer.h crypto/signers/mac_signer.h \
48 crypto/crypto_factory.h crypto/crypto_tester.h crypto/diffie_hellman.h \
49 crypto/aead.h crypto/transform.h crypto/pkcs5.h \
50 credentials/credential_factory.h credentials/builder.h \
51 credentials/cred_encoding.h credentials/keys/private_key.h \
52 credentials/keys/public_key.h credentials/keys/shared_key.h \
53 credentials/certificates/certificate.h credentials/certificates/x509.h \
54 credentials/certificates/ac.h credentials/certificates/crl.h \
55 credentials/certificates/pkcs10.h credentials/certificates/ocsp_request.h \
56 credentials/certificates/ocsp_response.h \
57 credentials/certificates/pgp_certificate.h \
58 credentials/containers/container.h credentials/containers/pkcs7.h \
59 credentials/containers/pkcs12.h \
60 credentials/ietf_attributes/ietf_attributes.h \
61 credentials/credential_manager.h credentials/sets/auth_cfg_wrapper.h \
62 credentials/sets/ocsp_response_wrapper.h credentials/sets/cert_cache.h \
63 credentials/sets/mem_cred.h credentials/sets/callback_cred.h \
64 credentials/auth_cfg.h credentials/credential_set.h credentials/cert_validator.h \
65 database/database.h database/database_factory.h fetcher/fetcher.h \
66 fetcher/fetcher_manager.h eap/eap.h pen/pen.h ipsec/ipsec_types.h \
67 networking/host.h networking/host_resolver.h networking/packet.h \
68 networking/tun_device.h networking/streams/stream.h \
69 resolver/resolver.h resolver/resolver_response.h resolver/rr_set.h \
70 resolver/rr.h resolver/resolver_manager.h \
71 plugins/plugin_loader.h plugins/plugin.h plugins/plugin_feature.h \
72 processing/jobs/job.h processing/jobs/callback_job.h processing/processor.h \
73 processing/scheduler.h processing/watcher.h selectors/traffic_selector.h \
74 threading/thread.h threading/thread_value.h \
75 threading/mutex.h threading/condvar.h threading/spinlock.h threading/semaphore.h \
76 threading/rwlock.h threading/rwlock_condvar.h threading/lock_profiler.h \
77 utils/utils.h utils/chunk.h utils/debug.h utils/enum.h utils/identification.h \
78 utils/lexparser.h utils/optionsfrom.h utils/capabilities.h utils/backtrace.h \
79 utils/leak_detective.h utils/printf_hook.h utils/settings.h utils/integrity_checker.h
80 endif
81
82 library.lo :    $(top_builddir)/config.status
83
84 libstrongswan_la_LIBADD = $(PTHREADLIB) $(DLLIB) $(BTLIB) $(SOCKLIB) $(RTLIB) $(BFDLIB) $(UNWINDLIB)
85
86 AM_CPPFLAGS = \
87         -I$(top_srcdir)/src/libstrongswan \
88         -DIPSEC_DIR=\"${ipsecdir}\" \
89         -DIPSEC_LIB_DIR=\"${ipseclibdir}\" \
90         -DPLUGINDIR=\"${plugindir}\" \
91         -DSTRONGSWAN_CONF=\"${strongswan_conf}\"
92
93 AM_CFLAGS = \
94         @COVERAGE_CFLAGS@
95
96 if USE_LEAK_DETECTIVE
97   AM_CPPFLAGS += -DLEAK_DETECTIVE
98   libstrongswan_la_SOURCES += utils/leak_detective.c
99 endif
100
101 if USE_LOCK_PROFILER
102   AM_CPPFLAGS += -DLOCK_PROFILER
103 endif
104
105 if USE_INTEGRITY_TEST
106   AM_CPPFLAGS += -DINTEGRITY_TEST
107   libstrongswan_la_SOURCES += utils/integrity_checker.c
108 endif
109
110 if USE_VSTR
111   libstrongswan_la_LIBADD += -lvstr
112 endif
113
114 if USE_LIBCAP
115   libstrongswan_la_LIBADD += -lcap
116 endif
117
118 EXTRA_DIST = \
119 asn1/oid.txt asn1/oid.pl \
120 crypto/proposal/proposal_keywords_static.txt \
121 Android.mk AndroidConfigLocal.h
122
123 BUILT_SOURCES = \
124 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
125 $(srcdir)/crypto/proposal/proposal_keywords_static.c
126
127 MAINTAINERCLEANFILES = \
128 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
129 $(srcdir)/crypto/proposal/proposal_keywords_static.c
130
131 $(srcdir)/asn1/oid.c :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
132                 $(AM_V_GEN) \
133                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
134
135 $(srcdir)/asn1/oid.h :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
136                 $(AM_V_GEN) \
137                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
138
139 $(srcdir)/crypto/proposal/proposal_keywords_static.c:   $(srcdir)/crypto/proposal/proposal_keywords_static.txt \
140                                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords_static.h
141                 $(AM_V_GEN) \
142                 $(GPERF) -N proposal_get_token_static -m 10 -C -G -c -t -D < \
143                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords_static.txt > $@
144
145
146 # build plugins with their own Makefile
147 #######################################
148
149 if MONOLITHIC
150 SUBDIRS =
151 else
152 SUBDIRS = .
153 endif
154
155 if USE_AF_ALG
156   SUBDIRS += plugins/af_alg
157 if MONOLITHIC
158   libstrongswan_la_LIBADD += plugins/af_alg/libstrongswan-af-alg.la
159 endif
160 endif
161
162 if USE_AES
163   SUBDIRS += plugins/aes
164 if MONOLITHIC
165   libstrongswan_la_LIBADD += plugins/aes/libstrongswan-aes.la
166 endif
167 endif
168
169 if USE_DES
170   SUBDIRS += plugins/des
171 if MONOLITHIC
172   libstrongswan_la_LIBADD += plugins/des/libstrongswan-des.la
173 endif
174 endif
175
176 if USE_BLOWFISH
177   SUBDIRS += plugins/blowfish
178 if MONOLITHIC
179   libstrongswan_la_LIBADD += plugins/blowfish/libstrongswan-blowfish.la
180 endif
181 endif
182
183 if USE_RC2
184   SUBDIRS += plugins/rc2
185 if MONOLITHIC
186   libstrongswan_la_LIBADD += plugins/rc2/libstrongswan-rc2.la
187 endif
188 endif
189
190 if USE_MD4
191   SUBDIRS += plugins/md4
192 if MONOLITHIC
193   libstrongswan_la_LIBADD += plugins/md4/libstrongswan-md4.la
194 endif
195 endif
196
197 if USE_MD5
198   SUBDIRS += plugins/md5
199 if MONOLITHIC
200   libstrongswan_la_LIBADD += plugins/md5/libstrongswan-md5.la
201 endif
202 endif
203
204 if USE_SHA1
205   SUBDIRS += plugins/sha1
206 if MONOLITHIC
207   libstrongswan_la_LIBADD += plugins/sha1/libstrongswan-sha1.la
208 endif
209 endif
210
211 if USE_SHA2
212   SUBDIRS += plugins/sha2
213 if MONOLITHIC
214   libstrongswan_la_LIBADD += plugins/sha2/libstrongswan-sha2.la
215 endif
216 endif
217
218 if USE_GMP
219   SUBDIRS += plugins/gmp
220 if MONOLITHIC
221   libstrongswan_la_LIBADD += plugins/gmp/libstrongswan-gmp.la
222 endif
223 endif
224
225 if USE_RDRAND
226   SUBDIRS += plugins/rdrand
227 if MONOLITHIC
228   libstrongswan_la_LIBADD += plugins/rdrand/libstrongswan-rdrand.la
229 endif
230 endif
231
232 if USE_RANDOM
233   SUBDIRS += plugins/random
234 if MONOLITHIC
235   libstrongswan_la_LIBADD += plugins/random/libstrongswan-random.la
236 endif
237 endif
238
239 if USE_NONCE
240   SUBDIRS += plugins/nonce
241 if MONOLITHIC
242   libstrongswan_la_LIBADD += plugins/nonce/libstrongswan-nonce.la
243 endif
244 endif
245
246 if USE_HMAC
247   SUBDIRS += plugins/hmac
248 if MONOLITHIC
249   libstrongswan_la_LIBADD += plugins/hmac/libstrongswan-hmac.la
250 endif
251 endif
252
253 if USE_CMAC
254   SUBDIRS += plugins/cmac
255 if MONOLITHIC
256   libstrongswan_la_LIBADD += plugins/cmac/libstrongswan-cmac.la
257 endif
258 endif
259
260 if USE_XCBC
261   SUBDIRS += plugins/xcbc
262 if MONOLITHIC
263   libstrongswan_la_LIBADD += plugins/xcbc/libstrongswan-xcbc.la
264 endif
265 endif
266
267 if USE_X509
268   SUBDIRS += plugins/x509
269 if MONOLITHIC
270   libstrongswan_la_LIBADD += plugins/x509/libstrongswan-x509.la
271 endif
272 endif
273
274 if USE_REVOCATION
275   SUBDIRS += plugins/revocation
276 if MONOLITHIC
277   libstrongswan_la_LIBADD += plugins/revocation/libstrongswan-revocation.la
278 endif
279 endif
280
281 if USE_CONSTRAINTS
282   SUBDIRS += plugins/constraints
283 if MONOLITHIC
284   libstrongswan_la_LIBADD += plugins/constraints/libstrongswan-constraints.la
285 endif
286 endif
287
288 if USE_PUBKEY
289   SUBDIRS += plugins/pubkey
290 if MONOLITHIC
291   libstrongswan_la_LIBADD += plugins/pubkey/libstrongswan-pubkey.la
292 endif
293 endif
294
295 if USE_PKCS1
296   SUBDIRS += plugins/pkcs1
297 if MONOLITHIC
298   libstrongswan_la_LIBADD += plugins/pkcs1/libstrongswan-pkcs1.la
299 endif
300 endif
301
302 if USE_PKCS7
303   SUBDIRS += plugins/pkcs7
304 if MONOLITHIC
305   libstrongswan_la_LIBADD += plugins/pkcs7/libstrongswan-pkcs7.la
306 endif
307 endif
308
309 if USE_PKCS8
310   SUBDIRS += plugins/pkcs8
311 if MONOLITHIC
312   libstrongswan_la_LIBADD += plugins/pkcs8/libstrongswan-pkcs8.la
313 endif
314 endif
315
316 if USE_PKCS12
317   SUBDIRS += plugins/pkcs12
318 if MONOLITHIC
319   libstrongswan_la_LIBADD += plugins/pkcs12/libstrongswan-pkcs12.la
320 endif
321 endif
322
323 if USE_PGP
324   SUBDIRS += plugins/pgp
325 if MONOLITHIC
326   libstrongswan_la_LIBADD += plugins/pgp/libstrongswan-pgp.la
327 endif
328 endif
329
330 if USE_DNSKEY
331   SUBDIRS += plugins/dnskey
332 if MONOLITHIC
333   libstrongswan_la_LIBADD += plugins/dnskey/libstrongswan-dnskey.la
334 endif
335 endif
336
337 if USE_SSHKEY
338   SUBDIRS += plugins/sshkey
339 if MONOLITHIC
340   libstrongswan_la_LIBADD += plugins/sshkey/libstrongswan-sshkey.la
341 endif
342 endif
343
344 if USE_PEM
345   SUBDIRS += plugins/pem
346 if MONOLITHIC
347   libstrongswan_la_LIBADD += plugins/pem/libstrongswan-pem.la
348 endif
349 endif
350
351 if USE_CURL
352   SUBDIRS += plugins/curl
353 if MONOLITHIC
354   libstrongswan_la_LIBADD += plugins/curl/libstrongswan-curl.la
355 endif
356 endif
357
358 if USE_UNBOUND
359   SUBDIRS += plugins/unbound
360 if MONOLITHIC
361   libstrongswan_la_LIBADD += plugins/unbound/libstrongswan-unbound.la
362 endif
363 endif
364
365 if USE_SOUP
366   SUBDIRS += plugins/soup
367 if MONOLITHIC
368   libstrongswan_la_LIBADD += plugins/soup/libstrongswan-soup.la
369 endif
370 endif
371
372 if USE_LDAP
373   SUBDIRS += plugins/ldap
374 if MONOLITHIC
375   libstrongswan_la_LIBADD += plugins/ldap/libstrongswan-ldap.la
376 endif
377 endif
378
379 if USE_MYSQL
380   SUBDIRS += plugins/mysql
381 if MONOLITHIC
382   libstrongswan_la_LIBADD += plugins/mysql/libstrongswan-mysql.la
383 endif
384 endif
385
386 if USE_SQLITE
387   SUBDIRS += plugins/sqlite
388 if MONOLITHIC
389   libstrongswan_la_LIBADD += plugins/sqlite/libstrongswan-sqlite.la
390 endif
391 endif
392
393 if USE_PADLOCK
394   SUBDIRS += plugins/padlock
395 if MONOLITHIC
396   libstrongswan_la_LIBADD += plugins/padlock/libstrongswan-padlock.la
397 endif
398 endif
399
400 if USE_OPENSSL
401   SUBDIRS += plugins/openssl
402 if MONOLITHIC
403   libstrongswan_la_LIBADD += plugins/openssl/libstrongswan-openssl.la
404 endif
405 endif
406
407 if USE_GCRYPT
408   SUBDIRS += plugins/gcrypt
409 if MONOLITHIC
410   libstrongswan_la_LIBADD += plugins/gcrypt/libstrongswan-gcrypt.la
411 endif
412 endif
413
414 if USE_FIPS_PRF
415   SUBDIRS += plugins/fips_prf
416 if MONOLITHIC
417   libstrongswan_la_LIBADD += plugins/fips_prf/libstrongswan-fips-prf.la
418 endif
419 endif
420
421 if USE_AGENT
422   SUBDIRS += plugins/agent
423 if MONOLITHIC
424   libstrongswan_la_LIBADD += plugins/agent/libstrongswan-agent.la
425 endif
426 endif
427
428 if USE_KEYCHAIN
429   SUBDIRS += plugins/keychain
430 if MONOLITHIC
431   libstrongswan_la_LIBADD += plugins/keychain/libstrongswan-keychain.la
432 endif
433 endif
434
435 if USE_PKCS11
436   SUBDIRS += plugins/pkcs11
437 if MONOLITHIC
438   libstrongswan_la_LIBADD += plugins/pkcs11/libstrongswan-pkcs11.la
439 endif
440 endif
441
442 if USE_CTR
443   SUBDIRS += plugins/ctr
444 if MONOLITHIC
445   libstrongswan_la_LIBADD += plugins/ctr/libstrongswan-ctr.la
446 endif
447 endif
448
449 if USE_CCM
450   SUBDIRS += plugins/ccm
451 if MONOLITHIC
452   libstrongswan_la_LIBADD += plugins/ccm/libstrongswan-ccm.la
453 endif
454 endif
455
456 if USE_GCM
457   SUBDIRS += plugins/gcm
458 if MONOLITHIC
459   libstrongswan_la_LIBADD += plugins/gcm/libstrongswan-gcm.la
460 endif
461 endif
462
463 if USE_TEST_VECTORS
464   SUBDIRS += plugins/test_vectors
465 if MONOLITHIC
466   libstrongswan_la_LIBADD += plugins/test_vectors/libstrongswan-test-vectors.la
467 endif
468 endif
469
470 if UNITTESTS
471 if MONOLITHIC
472   SUBDIRS += .
473 endif
474   SUBDIRS += tests
475 endif