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