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