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