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