Don't install the libraries directly in lib/.
[strongswan.git] / src / libstrongswan / Makefile.am
1 ipseclib_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 -DIPSEC_LIB_DIR=\"${ipseclibdir}\" \
84 -DPLUGINDIR=\"${plugindir}\" \
85 -DSTRONGSWAN_CONF=\"${strongswan_conf}\"
86
87 if USE_LEAK_DETECTIVE
88   AM_CFLAGS += -DLEAK_DETECTIVE
89   libstrongswan_la_SOURCES += \
90     utils/leak_detective.c utils/leak_detective.h
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 += \
100     integrity_checker.c integrity_checker.h
101 endif
102
103 if USE_VSTR
104   libstrongswan_la_LIBADD += -lvstr
105 endif
106
107 EXTRA_DIST = \
108 asn1/oid.txt asn1/oid.pl \
109 crypto/proposal/proposal_keywords.txt \
110 Android.mk AndroidConfigLocal.h
111
112 BUILT_SOURCES = \
113 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
114 $(srcdir)/crypto/proposal/proposal_keywords.c
115
116 MAINTAINERCLEANFILES = \
117 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
118 $(srcdir)/crypto/proposal/proposal_keywords.c
119
120 $(srcdir)/asn1/oid.c :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
121                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
122
123 $(srcdir)/asn1/oid.h :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
124                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
125
126 $(srcdir)/crypto/proposal/proposal_keywords.c:  $(srcdir)/crypto/proposal/proposal_keywords.txt \
127                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords.h
128                 $(GPERF) -N proposal_get_token -m 10 -C -G -c -t -D < \
129                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords.txt > $@
130
131
132 # build plugins with their own Makefile
133 #######################################
134
135 if MONOLITHIC
136 SUBDIRS =
137 else
138 SUBDIRS = .
139 endif
140
141 if USE_AF_ALG
142   SUBDIRS += plugins/af_alg
143 if MONOLITHIC
144   libstrongswan_la_LIBADD += plugins/af_alg/libstrongswan-af-alg.la
145 endif
146 endif
147
148 if USE_AES
149   SUBDIRS += plugins/aes
150 if MONOLITHIC
151   libstrongswan_la_LIBADD += plugins/aes/libstrongswan-aes.la
152 endif
153 endif
154
155 if USE_DES
156   SUBDIRS += plugins/des
157 if MONOLITHIC
158   libstrongswan_la_LIBADD += plugins/des/libstrongswan-des.la
159 endif
160 endif
161
162 if USE_BLOWFISH
163   SUBDIRS += plugins/blowfish
164 if MONOLITHIC
165   libstrongswan_la_LIBADD += plugins/blowfish/libstrongswan-blowfish.la
166 endif
167 endif
168
169 if USE_MD4
170   SUBDIRS += plugins/md4
171 if MONOLITHIC
172   libstrongswan_la_LIBADD += plugins/md4/libstrongswan-md4.la
173 endif
174 endif
175
176 if USE_MD5
177   SUBDIRS += plugins/md5
178 if MONOLITHIC
179   libstrongswan_la_LIBADD += plugins/md5/libstrongswan-md5.la
180 endif
181 endif
182
183 if USE_SHA1
184   SUBDIRS += plugins/sha1
185 if MONOLITHIC
186   libstrongswan_la_LIBADD += plugins/sha1/libstrongswan-sha1.la
187 endif
188 endif
189
190 if USE_SHA2
191   SUBDIRS += plugins/sha2
192 if MONOLITHIC
193   libstrongswan_la_LIBADD += plugins/sha2/libstrongswan-sha2.la
194 endif
195 endif
196
197 if USE_GMP
198   SUBDIRS += plugins/gmp
199 if MONOLITHIC
200   libstrongswan_la_LIBADD += plugins/gmp/libstrongswan-gmp.la
201 endif
202 endif
203
204 if USE_RANDOM
205   SUBDIRS += plugins/random
206 if MONOLITHIC
207   libstrongswan_la_LIBADD += plugins/random/libstrongswan-random.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_XCBC
219   SUBDIRS += plugins/xcbc
220 if MONOLITHIC
221   libstrongswan_la_LIBADD += plugins/xcbc/libstrongswan-xcbc.la
222 endif
223 endif
224
225 if USE_X509
226   SUBDIRS += plugins/x509
227 if MONOLITHIC
228   libstrongswan_la_LIBADD += plugins/x509/libstrongswan-x509.la
229 endif
230 endif
231
232 if USE_REVOCATION
233   SUBDIRS += plugins/revocation
234 if MONOLITHIC
235   libstrongswan_la_LIBADD += plugins/revocation/libstrongswan-revocation.la
236 endif
237 endif
238
239 if USE_CONSTRAINTS
240   SUBDIRS += plugins/constraints
241 if MONOLITHIC
242   libstrongswan_la_LIBADD += plugins/constraints/libstrongswan-constraints.la
243 endif
244 endif
245
246 if USE_PUBKEY
247   SUBDIRS += plugins/pubkey
248 if MONOLITHIC
249   libstrongswan_la_LIBADD += plugins/pubkey/libstrongswan-pubkey.la
250 endif
251 endif
252
253 if USE_PKCS1
254   SUBDIRS += plugins/pkcs1
255 if MONOLITHIC
256   libstrongswan_la_LIBADD += plugins/pkcs1/libstrongswan-pkcs1.la
257 endif
258 endif
259
260 if USE_PGP
261   SUBDIRS += plugins/pgp
262 if MONOLITHIC
263   libstrongswan_la_LIBADD += plugins/pgp/libstrongswan-pgp.la
264 endif
265 endif
266
267 if USE_DNSKEY
268   SUBDIRS += plugins/dnskey
269 if MONOLITHIC
270   libstrongswan_la_LIBADD += plugins/dnskey/libstrongswan-dnskey.la
271 endif
272 endif
273
274 if USE_PEM
275   SUBDIRS += plugins/pem
276 if MONOLITHIC
277   libstrongswan_la_LIBADD += plugins/pem/libstrongswan-pem.la
278 endif
279 endif
280
281 if USE_CURL
282   SUBDIRS += plugins/curl
283 if MONOLITHIC
284   libstrongswan_la_LIBADD += plugins/curl/libstrongswan-curl.la
285 endif
286 endif
287
288 if USE_SOUP
289   SUBDIRS += plugins/soup
290 if MONOLITHIC
291   libstrongswan_la_LIBADD += plugins/soup/libstrongswan-soup.la
292 endif
293 endif
294
295 if USE_LDAP
296   SUBDIRS += plugins/ldap
297 if MONOLITHIC
298   libstrongswan_la_LIBADD += plugins/ldap/libstrongswan-ldap.la
299 endif
300 endif
301
302 if USE_MYSQL
303   SUBDIRS += plugins/mysql
304 if MONOLITHIC
305   libstrongswan_la_LIBADD += plugins/mysql/libstrongswan-mysql.la
306 endif
307 endif
308
309 if USE_SQLITE
310   SUBDIRS += plugins/sqlite
311 if MONOLITHIC
312   libstrongswan_la_LIBADD += plugins/sqlite/libstrongswan-sqlite.la
313 endif
314 endif
315
316 if USE_PADLOCK
317   SUBDIRS += plugins/padlock
318 if MONOLITHIC
319   libstrongswan_la_LIBADD += plugins/padlock/libstrongswan-padlock.la
320 endif
321 endif
322
323 if USE_OPENSSL
324   SUBDIRS += plugins/openssl
325 if MONOLITHIC
326   libstrongswan_la_LIBADD += plugins/openssl/libstrongswan-openssl.la
327 endif
328 endif
329
330 if USE_GCRYPT
331   SUBDIRS += plugins/gcrypt
332 if MONOLITHIC
333   libstrongswan_la_LIBADD += plugins/gcrypt/libstrongswan-gcrypt.la
334 endif
335 endif
336
337 if USE_FIPS_PRF
338   SUBDIRS += plugins/fips_prf
339 if MONOLITHIC
340   libstrongswan_la_LIBADD += plugins/fips_prf/libstrongswan-fips-prf.la
341 endif
342 endif
343
344 if USE_AGENT
345   SUBDIRS += plugins/agent
346 if MONOLITHIC
347   libstrongswan_la_LIBADD += plugins/agent/libstrongswan-agent.la
348 endif
349 endif
350
351 if USE_PKCS11
352   SUBDIRS += plugins/pkcs11
353 if MONOLITHIC
354   libstrongswan_la_LIBADD += plugins/pkcs11/libstrongswan-pkcs11.la
355 endif
356 endif
357
358 if USE_CTR
359   SUBDIRS += plugins/ctr
360 if MONOLITHIC
361   libstrongswan_la_LIBADD += plugins/ctr/libstrongswan-ctr.la
362 endif
363 endif
364
365 if USE_CCM
366   SUBDIRS += plugins/ccm
367 if MONOLITHIC
368   libstrongswan_la_LIBADD += plugins/ccm/libstrongswan-ccm.la
369 endif
370 endif
371
372 if USE_GCM
373   SUBDIRS += plugins/gcm
374 if MONOLITHIC
375   libstrongswan_la_LIBADD += plugins/gcm/libstrongswan-gcm.la
376 endif
377 endif
378
379 if USE_TEST_VECTORS
380   SUBDIRS += plugins/test_vectors
381 if MONOLITHIC
382   libstrongswan_la_LIBADD += plugins/test_vectors/libstrongswan-test-vectors.la
383 endif
384 endif