Moving attr-sql plugin from libstrongswan to libhydra.
[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 attributes/attributes.c attributes/attributes.h \
14 attributes/attribute_provider.h attributes/attribute_handler.h \
15 attributes/attribute_manager.c attributes/attribute_manager.h \
16 crypto/crypters/crypter.c crypto/crypters/crypter.h \
17 crypto/hashers/hasher.h crypto/hashers/hasher.c \
18 crypto/pkcs9.c crypto/pkcs9.h \
19 crypto/proposal/proposal_keywords.c crypto/proposal/proposal_keywords.h \
20 crypto/prfs/prf.c crypto/prfs/prf.h \
21 crypto/rngs/rng.c crypto/rngs/rng.h \
22 crypto/prf_plus.h crypto/prf_plus.c \
23 crypto/signers/signer.c crypto/signers/signer.h \
24 crypto/crypto_factory.c crypto/crypto_factory.h \
25 crypto/crypto_tester.c crypto/crypto_tester.h \
26 crypto/diffie_hellman.c crypto/diffie_hellman.h \
27 crypto/transform.c crypto/transform.h \
28 credentials/credential_factory.c credentials/credential_factory.h \
29 credentials/builder.c credentials/builder.h \
30 credentials/keys/key_encoding.c credentials/keys/key_encoding.h \
31 credentials/keys/private_key.c credentials/keys/private_key.h \
32 credentials/keys/public_key.c credentials/keys/public_key.h \
33 credentials/keys/shared_key.c credentials/keys/shared_key.h \
34 credentials/certificates/certificate.c credentials/certificates/certificate.h \
35 credentials/certificates/x509.h credentials/certificates/x509.c \
36 credentials/certificates/ac.h \
37 credentials/certificates/crl.h credentials/certificates/crl.c \
38 credentials/certificates/pkcs10.h \
39 credentials/certificates/ocsp_request.h \
40 credentials/certificates/ocsp_response.h credentials/certificates/ocsp_response.c \
41 credentials/certificates/pgp_certificate.h \
42 credentials/ietf_attributes/ietf_attributes.c credentials/ietf_attributes/ietf_attributes.h \
43 database/database.h database/database_factory.h database/database_factory.c \
44 fetcher/fetcher.h fetcher/fetcher_manager.h fetcher/fetcher_manager.c \
45 selectors/traffic_selector.c selectors/traffic_selector.h \
46 threading/thread.h threading/thread.c \
47 threading/thread_value.h threading/thread_value.c \
48 threading/mutex.h threading/mutex.c threading/condvar.h  \
49 threading/rwlock.h threading/rwlock.c \
50 threading/lock_profiler.h \
51 utils.h utils.c \
52 utils/host.c utils/host.h \
53 utils/identification.c utils/identification.h \
54 utils/iterator.h \
55 utils/lexparser.c utils/lexparser.h \
56 utils/linked_list.c utils/linked_list.h \
57 utils/hashtable.c utils/hashtable.h \
58 utils/enumerator.c utils/enumerator.h \
59 utils/optionsfrom.c utils/optionsfrom.h \
60 utils/backtrace.c utils/backtrace.h \
61 plugins/plugin_loader.c plugins/plugin_loader.h plugins/plugin.h
62
63 libstrongswan_la_LIBADD = $(PTHREADLIB) $(DLLIB) $(BTLIB) $(SOCKLIB) $(RTLIB)
64
65 INCLUDES = -I$(top_srcdir)/src/libstrongswan
66 AM_CFLAGS = \
67 -DIPSEC_DIR=\"${ipsecdir}\" \
68 -DPLUGINDIR=\"${plugindir}\" \
69 -DSTRONGSWAN_CONF=\"${strongswan_conf}\"
70
71 if USE_LEAK_DETECTIVE
72   AM_CFLAGS += -DLEAK_DETECTIVE
73   libstrongswan_la_SOURCES += \
74     utils/leak_detective.c utils/leak_detective.h
75 endif
76
77 if USE_LOCK_PROFILER
78   AM_CFLAGS += -DLOCK_PROFILER
79 endif
80
81 if USE_INTEGRITY_TEST
82   AM_CFLAGS += -DINTEGRITY_TEST
83   libstrongswan_la_SOURCES += \
84     integrity_checker.c integrity_checker.h
85 endif
86
87 if USE_VSTR
88   libstrongswan_la_LIBADD += -lvstr
89 endif
90
91 EXTRA_DIST = \
92 asn1/oid.txt asn1/oid.pl \
93 crypto/proposal/proposal_keywords.txt \
94 Android.mk AndroidConfigLocal.h
95
96 BUILT_SOURCES = \
97 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
98 $(srcdir)/crypto/proposal/proposal_keywords.c
99
100 MAINTAINERCLEANFILES = \
101 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
102 $(srcdir)/crypto/proposal/proposal_keywords.c
103
104 $(srcdir)/asn1/oid.c :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
105                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
106
107 $(srcdir)/asn1/oid.h :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
108                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
109
110 $(srcdir)/crypto/proposal/proposal_keywords.c:  $(srcdir)/crypto/proposal/proposal_keywords.txt \
111                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords.h
112                 $(GPERF) -N proposal_get_token -m 10 -C -G -c -t -D < \
113                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords.txt > $@
114
115
116 # build plugins with their own Makefile
117 #######################################
118
119 if MONOLITHIC
120 SUBDIRS =
121 else
122 SUBDIRS = .
123 endif
124
125 if USE_AES
126   SUBDIRS += plugins/aes
127 if MONOLITHIC
128   libstrongswan_la_LIBADD += plugins/aes/libstrongswan-aes.la
129 endif
130 endif
131
132 if USE_DES
133   SUBDIRS += plugins/des
134 if MONOLITHIC
135   libstrongswan_la_LIBADD += plugins/des/libstrongswan-des.la
136 endif
137 endif
138
139 if USE_BLOWFISH
140   SUBDIRS += plugins/blowfish
141 if MONOLITHIC
142   libstrongswan_la_LIBADD += plugins/blowfish/libstrongswan-blowfish.la
143 endif
144 endif
145
146 if USE_MD4
147   SUBDIRS += plugins/md4
148 if MONOLITHIC
149   libstrongswan_la_LIBADD += plugins/md4/libstrongswan-md4.la
150 endif
151 endif
152
153 if USE_MD5
154   SUBDIRS += plugins/md5
155 if MONOLITHIC
156   libstrongswan_la_LIBADD += plugins/md5/libstrongswan-md5.la
157 endif
158 endif
159
160 if USE_SHA1
161   SUBDIRS += plugins/sha1
162 if MONOLITHIC
163   libstrongswan_la_LIBADD += plugins/sha1/libstrongswan-sha1.la
164 endif
165 endif
166
167 if USE_SHA2
168   SUBDIRS += plugins/sha2
169 if MONOLITHIC
170   libstrongswan_la_LIBADD += plugins/sha2/libstrongswan-sha2.la
171 endif
172 endif
173
174 if USE_GMP
175   SUBDIRS += plugins/gmp
176 if MONOLITHIC
177   libstrongswan_la_LIBADD += plugins/gmp/libstrongswan-gmp.la
178 endif
179 endif
180
181 if USE_RANDOM
182   SUBDIRS += plugins/random
183 if MONOLITHIC
184   libstrongswan_la_LIBADD += plugins/random/libstrongswan-random.la
185 endif
186 endif
187
188 if USE_HMAC
189   SUBDIRS += plugins/hmac
190 if MONOLITHIC
191   libstrongswan_la_LIBADD += plugins/hmac/libstrongswan-hmac.la
192 endif
193 endif
194
195 if USE_XCBC
196   SUBDIRS += plugins/xcbc
197 if MONOLITHIC
198   libstrongswan_la_LIBADD += plugins/xcbc/libstrongswan-xcbc.la
199 endif
200 endif
201
202 if USE_X509
203   SUBDIRS += plugins/x509
204 if MONOLITHIC
205   libstrongswan_la_LIBADD += plugins/x509/libstrongswan-x509.la
206 endif
207 endif
208
209 if USE_PUBKEY
210   SUBDIRS += plugins/pubkey
211 if MONOLITHIC
212   libstrongswan_la_LIBADD += plugins/pubkey/libstrongswan-pubkey.la
213 endif
214 endif
215
216 if USE_PKCS1
217   SUBDIRS += plugins/pkcs1
218 if MONOLITHIC
219   libstrongswan_la_LIBADD += plugins/pkcs1/libstrongswan-pkcs1.la
220 endif
221 endif
222
223 if USE_PGP
224   SUBDIRS += plugins/pgp
225 if MONOLITHIC
226   libstrongswan_la_LIBADD += plugins/pgp/libstrongswan-pgp.la
227 endif
228 endif
229
230 if USE_DNSKEY
231   SUBDIRS += plugins/dnskey
232 if MONOLITHIC
233   libstrongswan_la_LIBADD += plugins/dnskey/libstrongswan-dnskey.la
234 endif
235 endif
236
237 if USE_PEM
238   SUBDIRS += plugins/pem
239 if MONOLITHIC
240   libstrongswan_la_LIBADD += plugins/pem/libstrongswan-pem.la
241 endif
242 endif
243
244 if USE_CURL
245   SUBDIRS += plugins/curl
246 if MONOLITHIC
247   libstrongswan_la_LIBADD += plugins/curl/libstrongswan-curl.la
248 endif
249 endif
250
251 if USE_LDAP
252   SUBDIRS += plugins/ldap
253 if MONOLITHIC
254   libstrongswan_la_LIBADD += plugins/ldap/libstrongswan-ldap.la
255 endif
256 endif
257
258 if USE_MYSQL
259   SUBDIRS += plugins/mysql
260 if MONOLITHIC
261   libstrongswan_la_LIBADD += plugins/mysql/libstrongswan-mysql.la
262 endif
263 endif
264
265 if USE_SQLITE
266   SUBDIRS += plugins/sqlite
267 if MONOLITHIC
268   libstrongswan_la_LIBADD += plugins/sqlite/libstrongswan-sqlite.la
269 endif
270 endif
271
272 if USE_PADLOCK
273   SUBDIRS += plugins/padlock
274 if MONOLITHIC
275   libstrongswan_la_LIBADD += plugins/padlock/libstrongswan-padlock.la
276 endif
277 endif
278
279 if USE_OPENSSL
280   SUBDIRS += plugins/openssl
281 if MONOLITHIC
282   libstrongswan_la_LIBADD += plugins/openssl/libstrongswan-openssl.la
283 endif
284 endif
285
286 if USE_GCRYPT
287   SUBDIRS += plugins/gcrypt
288 if MONOLITHIC
289   libstrongswan_la_LIBADD += plugins/gcrypt/libstrongswan-gcrypt.la
290 endif
291 endif
292
293 if USE_FIPS_PRF
294   SUBDIRS += plugins/fips_prf
295 if MONOLITHIC
296   libstrongswan_la_LIBADD += plugins/fips_prf/libstrongswan-fips-prf.la
297 endif
298 endif
299
300 if USE_AGENT
301   SUBDIRS += plugins/agent
302 if MONOLITHIC
303   libstrongswan_la_LIBADD += plugins/agent/libstrongswan-agent.la
304 endif
305 endif
306
307 if USE_TEST_VECTORS
308   SUBDIRS += plugins/test_vectors
309 if MONOLITHIC
310   libstrongswan_la_LIBADD += plugins/test_vectors/libstrongswan-test-vectors.la
311 endif
312 endif