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