]> git.ipfire.org Git - people/ms/strongswan.git/blob - src/libstrongswan/Makefile.am
string: Move string related utility functions 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 utils/utils/string.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 utils/utils/types.h utils/utils/byteorder.h \
112 utils/utils/string.h
113 endif
114
115 library.lo : $(top_builddir)/config.status
116
117 libstrongswan_la_LIBADD = $(DLLIB) $(BTLIB) $(SOCKLIB) $(RTLIB) $(BFDLIB) $(UNWINDLIB)
118
119 AM_CPPFLAGS = \
120 -I$(top_srcdir)/src/libstrongswan \
121 -DIPSEC_DIR=\"${ipsecdir}\" \
122 -DIPSEC_LIB_DIR=\"${ipseclibdir}\" \
123 -DPLUGINDIR=\"${plugindir}\" \
124 -DSTRONGSWAN_CONF=\"${strongswan_conf}\"
125
126 AM_CFLAGS = \
127 @COVERAGE_CFLAGS@
128
129 AM_LDFLAGS = \
130 -no-undefined
131
132 AM_YFLAGS = -v -d
133
134 if USE_WINDOWS
135 libstrongswan_la_LIBADD += -lws2_32 -lpsapi
136 libstrongswan_la_SOURCES += \
137 threading/windows/thread.c \
138 threading/windows/thread_value.c \
139 threading/windows/mutex.c \
140 threading/windows/rwlock.c \
141 threading/windows/spinlock.c \
142 threading/windows/semaphore.c \
143 utils/compat/windows.c
144 else
145 libstrongswan_la_LIBADD += $(PTHREADLIB)
146 endif
147
148 if USE_DBGHELP
149 libstrongswan_la_LIBADD += -ldbghelp
150 AM_CPPFLAGS += -DHAVE_DBGHELP
151 endif
152
153 if USE_LEAK_DETECTIVE
154 AM_CPPFLAGS += -DLEAK_DETECTIVE
155 libstrongswan_la_SOURCES += utils/leak_detective.c
156 endif
157
158 if USE_LOCK_PROFILER
159 AM_CPPFLAGS += -DLOCK_PROFILER
160 endif
161
162 if USE_INTEGRITY_TEST
163 AM_CPPFLAGS += -DINTEGRITY_TEST
164 libstrongswan_la_SOURCES += utils/integrity_checker.c
165 endif
166
167 if USE_VSTR
168 libstrongswan_la_SOURCES += utils/printf_hook/printf_hook_vstr.c
169 libstrongswan_la_LIBADD += -lvstr
170 endif
171
172 if USE_BUILTIN_PRINTF
173 libstrongswan_la_SOURCES += utils/printf_hook/printf_hook_builtin.c
174 libstrongswan_la_LIBADD += -lm
175 endif
176
177 if !USE_BUILTIN_PRINTF
178 if !USE_VSTR
179 libstrongswan_la_SOURCES += utils/printf_hook/printf_hook_glibc.c
180 endif
181 endif
182
183 if USE_LIBCAP
184 libstrongswan_la_LIBADD += -lcap
185 endif
186
187 EXTRA_DIST = \
188 asn1/oid.txt asn1/oid.pl \
189 crypto/proposal/proposal_keywords_static.txt \
190 Android.mk AndroidConfigLocal.h
191
192 BUILT_SOURCES = \
193 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
194 $(srcdir)/crypto/proposal/proposal_keywords_static.c \
195 settings/settings_parser.h
196
197 MAINTAINERCLEANFILES = \
198 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
199 $(srcdir)/crypto/proposal/proposal_keywords_static.c
200
201 $(srcdir)/asn1/oid.c : $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
202 $(AM_V_GEN) \
203 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
204
205 $(srcdir)/asn1/oid.h : $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
206 $(AM_V_GEN) \
207 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
208
209 $(srcdir)/crypto/proposal/proposal_keywords_static.c: $(srcdir)/crypto/proposal/proposal_keywords_static.txt \
210 $(srcdir)/crypto/proposal/proposal_keywords_static.h
211 $(AM_V_GEN) \
212 $(GPERF) -N proposal_get_token_static -m 10 -C -G -c -t -D < \
213 $(srcdir)/crypto/proposal/proposal_keywords_static.txt > $@
214
215
216 # build plugins with their own Makefile
217 #######################################
218
219 if MONOLITHIC
220 SUBDIRS =
221 else
222 SUBDIRS = .
223 endif
224
225 if USE_AF_ALG
226 SUBDIRS += plugins/af_alg
227 if MONOLITHIC
228 libstrongswan_la_LIBADD += plugins/af_alg/libstrongswan-af-alg.la
229 endif
230 endif
231
232 if USE_AES
233 SUBDIRS += plugins/aes
234 if MONOLITHIC
235 libstrongswan_la_LIBADD += plugins/aes/libstrongswan-aes.la
236 endif
237 endif
238
239 if USE_DES
240 SUBDIRS += plugins/des
241 if MONOLITHIC
242 libstrongswan_la_LIBADD += plugins/des/libstrongswan-des.la
243 endif
244 endif
245
246 if USE_BLOWFISH
247 SUBDIRS += plugins/blowfish
248 if MONOLITHIC
249 libstrongswan_la_LIBADD += plugins/blowfish/libstrongswan-blowfish.la
250 endif
251 endif
252
253 if USE_RC2
254 SUBDIRS += plugins/rc2
255 if MONOLITHIC
256 libstrongswan_la_LIBADD += plugins/rc2/libstrongswan-rc2.la
257 endif
258 endif
259
260 if USE_MD4
261 SUBDIRS += plugins/md4
262 if MONOLITHIC
263 libstrongswan_la_LIBADD += plugins/md4/libstrongswan-md4.la
264 endif
265 endif
266
267 if USE_MD5
268 SUBDIRS += plugins/md5
269 if MONOLITHIC
270 libstrongswan_la_LIBADD += plugins/md5/libstrongswan-md5.la
271 endif
272 endif
273
274 if USE_SHA1
275 SUBDIRS += plugins/sha1
276 if MONOLITHIC
277 libstrongswan_la_LIBADD += plugins/sha1/libstrongswan-sha1.la
278 endif
279 endif
280
281 if USE_SHA2
282 SUBDIRS += plugins/sha2
283 if MONOLITHIC
284 libstrongswan_la_LIBADD += plugins/sha2/libstrongswan-sha2.la
285 endif
286 endif
287
288 if USE_GMP
289 SUBDIRS += plugins/gmp
290 if MONOLITHIC
291 libstrongswan_la_LIBADD += plugins/gmp/libstrongswan-gmp.la
292 endif
293 endif
294
295 if USE_RDRAND
296 SUBDIRS += plugins/rdrand
297 if MONOLITHIC
298 libstrongswan_la_LIBADD += plugins/rdrand/libstrongswan-rdrand.la
299 endif
300 endif
301
302 if USE_AESNI
303 SUBDIRS += plugins/aesni
304 if MONOLITHIC
305 libstrongswan_la_LIBADD += plugins/aesni/libstrongswan-aesni.la
306 endif
307 endif
308
309 if USE_RANDOM
310 SUBDIRS += plugins/random
311 if MONOLITHIC
312 libstrongswan_la_LIBADD += plugins/random/libstrongswan-random.la
313 endif
314 endif
315
316 if USE_NONCE
317 SUBDIRS += plugins/nonce
318 if MONOLITHIC
319 libstrongswan_la_LIBADD += plugins/nonce/libstrongswan-nonce.la
320 endif
321 endif
322
323 if USE_HMAC
324 SUBDIRS += plugins/hmac
325 if MONOLITHIC
326 libstrongswan_la_LIBADD += plugins/hmac/libstrongswan-hmac.la
327 endif
328 endif
329
330 if USE_CMAC
331 SUBDIRS += plugins/cmac
332 if MONOLITHIC
333 libstrongswan_la_LIBADD += plugins/cmac/libstrongswan-cmac.la
334 endif
335 endif
336
337 if USE_XCBC
338 SUBDIRS += plugins/xcbc
339 if MONOLITHIC
340 libstrongswan_la_LIBADD += plugins/xcbc/libstrongswan-xcbc.la
341 endif
342 endif
343
344 if USE_X509
345 SUBDIRS += plugins/x509
346 if MONOLITHIC
347 libstrongswan_la_LIBADD += plugins/x509/libstrongswan-x509.la
348 endif
349 endif
350
351 if USE_REVOCATION
352 SUBDIRS += plugins/revocation
353 if MONOLITHIC
354 libstrongswan_la_LIBADD += plugins/revocation/libstrongswan-revocation.la
355 endif
356 endif
357
358 if USE_CONSTRAINTS
359 SUBDIRS += plugins/constraints
360 if MONOLITHIC
361 libstrongswan_la_LIBADD += plugins/constraints/libstrongswan-constraints.la
362 endif
363 endif
364
365 if USE_ACERT
366 SUBDIRS += plugins/acert
367 if MONOLITHIC
368 libstrongswan_la_LIBADD += plugins/acert/libstrongswan-acert.la
369 endif
370 endif
371
372 if USE_PUBKEY
373 SUBDIRS += plugins/pubkey
374 if MONOLITHIC
375 libstrongswan_la_LIBADD += plugins/pubkey/libstrongswan-pubkey.la
376 endif
377 endif
378
379 if USE_PKCS1
380 SUBDIRS += plugins/pkcs1
381 if MONOLITHIC
382 libstrongswan_la_LIBADD += plugins/pkcs1/libstrongswan-pkcs1.la
383 endif
384 endif
385
386 if USE_PKCS7
387 SUBDIRS += plugins/pkcs7
388 if MONOLITHIC
389 libstrongswan_la_LIBADD += plugins/pkcs7/libstrongswan-pkcs7.la
390 endif
391 endif
392
393 if USE_PKCS8
394 SUBDIRS += plugins/pkcs8
395 if MONOLITHIC
396 libstrongswan_la_LIBADD += plugins/pkcs8/libstrongswan-pkcs8.la
397 endif
398 endif
399
400 if USE_PKCS12
401 SUBDIRS += plugins/pkcs12
402 if MONOLITHIC
403 libstrongswan_la_LIBADD += plugins/pkcs12/libstrongswan-pkcs12.la
404 endif
405 endif
406
407 if USE_PGP
408 SUBDIRS += plugins/pgp
409 if MONOLITHIC
410 libstrongswan_la_LIBADD += plugins/pgp/libstrongswan-pgp.la
411 endif
412 endif
413
414 if USE_DNSKEY
415 SUBDIRS += plugins/dnskey
416 if MONOLITHIC
417 libstrongswan_la_LIBADD += plugins/dnskey/libstrongswan-dnskey.la
418 endif
419 endif
420
421 if USE_SSHKEY
422 SUBDIRS += plugins/sshkey
423 if MONOLITHIC
424 libstrongswan_la_LIBADD += plugins/sshkey/libstrongswan-sshkey.la
425 endif
426 endif
427
428 if USE_PEM
429 SUBDIRS += plugins/pem
430 if MONOLITHIC
431 libstrongswan_la_LIBADD += plugins/pem/libstrongswan-pem.la
432 endif
433 endif
434
435 if USE_CURL
436 SUBDIRS += plugins/curl
437 if MONOLITHIC
438 libstrongswan_la_LIBADD += plugins/curl/libstrongswan-curl.la
439 endif
440 endif
441
442 if USE_FILES
443 SUBDIRS += plugins/files
444 if MONOLITHIC
445 libstrongswan_la_LIBADD += plugins/files/libstrongswan-files.la
446 endif
447 endif
448
449 if USE_WINHTTP
450 SUBDIRS += plugins/winhttp
451 if MONOLITHIC
452 libstrongswan_la_LIBADD += plugins/winhttp/libstrongswan-winhttp.la
453 endif
454 endif
455
456 if USE_UNBOUND
457 SUBDIRS += plugins/unbound
458 if MONOLITHIC
459 libstrongswan_la_LIBADD += plugins/unbound/libstrongswan-unbound.la
460 endif
461 endif
462
463 if USE_SOUP
464 SUBDIRS += plugins/soup
465 if MONOLITHIC
466 libstrongswan_la_LIBADD += plugins/soup/libstrongswan-soup.la
467 endif
468 endif
469
470 if USE_LDAP
471 SUBDIRS += plugins/ldap
472 if MONOLITHIC
473 libstrongswan_la_LIBADD += plugins/ldap/libstrongswan-ldap.la
474 endif
475 endif
476
477 if USE_MYSQL
478 SUBDIRS += plugins/mysql
479 if MONOLITHIC
480 libstrongswan_la_LIBADD += plugins/mysql/libstrongswan-mysql.la
481 endif
482 endif
483
484 if USE_SQLITE
485 SUBDIRS += plugins/sqlite
486 if MONOLITHIC
487 libstrongswan_la_LIBADD += plugins/sqlite/libstrongswan-sqlite.la
488 endif
489 endif
490
491 if USE_PADLOCK
492 SUBDIRS += plugins/padlock
493 if MONOLITHIC
494 libstrongswan_la_LIBADD += plugins/padlock/libstrongswan-padlock.la
495 endif
496 endif
497
498 if USE_OPENSSL
499 SUBDIRS += plugins/openssl
500 if MONOLITHIC
501 libstrongswan_la_LIBADD += plugins/openssl/libstrongswan-openssl.la
502 endif
503 endif
504
505 if USE_GCRYPT
506 SUBDIRS += plugins/gcrypt
507 if MONOLITHIC
508 libstrongswan_la_LIBADD += plugins/gcrypt/libstrongswan-gcrypt.la
509 endif
510 endif
511
512 if USE_FIPS_PRF
513 SUBDIRS += plugins/fips_prf
514 if MONOLITHIC
515 libstrongswan_la_LIBADD += plugins/fips_prf/libstrongswan-fips-prf.la
516 endif
517 endif
518
519 if USE_AGENT
520 SUBDIRS += plugins/agent
521 if MONOLITHIC
522 libstrongswan_la_LIBADD += plugins/agent/libstrongswan-agent.la
523 endif
524 endif
525
526 if USE_KEYCHAIN
527 SUBDIRS += plugins/keychain
528 if MONOLITHIC
529 libstrongswan_la_LIBADD += plugins/keychain/libstrongswan-keychain.la
530 endif
531 endif
532
533 if USE_PKCS11
534 SUBDIRS += plugins/pkcs11
535 if MONOLITHIC
536 libstrongswan_la_LIBADD += plugins/pkcs11/libstrongswan-pkcs11.la
537 endif
538 endif
539
540 if USE_CTR
541 SUBDIRS += plugins/ctr
542 if MONOLITHIC
543 libstrongswan_la_LIBADD += plugins/ctr/libstrongswan-ctr.la
544 endif
545 endif
546
547 if USE_CCM
548 SUBDIRS += plugins/ccm
549 if MONOLITHIC
550 libstrongswan_la_LIBADD += plugins/ccm/libstrongswan-ccm.la
551 endif
552 endif
553
554 if USE_GCM
555 SUBDIRS += plugins/gcm
556 if MONOLITHIC
557 libstrongswan_la_LIBADD += plugins/gcm/libstrongswan-gcm.la
558 endif
559 endif
560
561 if USE_NTRU
562 SUBDIRS += plugins/ntru
563 if MONOLITHIC
564 libstrongswan_la_LIBADD += plugins/ntru/libstrongswan-ntru.la
565 endif
566 endif
567
568 if USE_BLISS
569 SUBDIRS += plugins/bliss
570 if MONOLITHIC
571 libstrongswan_la_LIBADD += plugins/bliss/libstrongswan-bliss.la
572 endif
573 endif
574
575 if USE_TEST_VECTORS
576 SUBDIRS += plugins/test_vectors
577 if MONOLITHIC
578 libstrongswan_la_LIBADD += plugins/test_vectors/libstrongswan-test-vectors.la
579 endif
580 endif
581
582 if MONOLITHIC
583 SUBDIRS += .
584 endif
585 SUBDIRS += tests
586 if USE_BLISS
587 SUBDIRS += plugins/bliss/tests
588 endif