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