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