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