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