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