d708eb93319d99e6f4c4963b599cc59b8cc4d681
[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/mutex.h threading/mutex.c \
47 threading/condvar.h threading/condvar.c \
48 threading/rwlock.h threading/rwlock.c \
49 threading/lock_profiler.h \
50 utils.h utils.c \
51 utils/host.c utils/host.h \
52 utils/identification.c utils/identification.h \
53 utils/iterator.h \
54 utils/lexparser.c utils/lexparser.h \
55 utils/linked_list.c utils/linked_list.h \
56 utils/hashtable.c utils/hashtable.h \
57 utils/enumerator.c utils/enumerator.h \
58 utils/optionsfrom.c utils/optionsfrom.h \
59 utils/backtrace.c utils/backtrace.h \
60 plugins/plugin_loader.c plugins/plugin_loader.h plugins/plugin.h
61
62 libstrongswan_la_LIBADD = -lpthread $(DLLIB) $(BTLIB) $(SOCKLIB) $(RTLIB)
63
64 INCLUDES = -I$(top_srcdir)/src/libstrongswan
65 AM_CFLAGS = \
66 -DIPSEC_DIR=\"${ipsecdir}\" \
67 -DPLUGINDIR=\"${plugindir}\" \
68 -DSTRONGSWAN_CONF=\"${strongswan_conf}\"
69
70 if USE_LEAK_DETECTIVE
71   AM_CFLAGS += -DLEAK_DETECTIVE
72   libstrongswan_la_SOURCES += \
73     utils/leak_detective.c utils/leak_detective.h
74 endif
75
76 if USE_LOCK_PROFILER
77   AM_CFLAGS += -DLOCK_PROFILER
78 endif
79
80 if USE_INTEGRITY_TEST
81   AM_CFLAGS += -DINTEGRITY_TEST
82   libstrongswan_la_SOURCES += \
83     integrity_checker.c integrity_checker.h
84 endif
85
86 if USE_VSTR
87   libstrongswan_la_LIBADD += -lvstr
88 endif
89
90 EXTRA_DIST = \
91 asn1/oid.txt asn1/oid.pl \
92 crypto/proposal/proposal_keywords.txt
93
94 BUILT_SOURCES = \
95 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
96 $(srcdir)/crypto/proposal/proposal_keywords.c
97
98 MAINTAINERCLEANFILES = \
99 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
100 $(srcdir)/crypto/proposal/proposal_keywords.c
101
102 $(srcdir)/asn1/oid.c :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
103                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
104
105 $(srcdir)/asn1/oid.h :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
106                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
107
108 $(srcdir)/crypto/proposal/proposal_keywords.c:  $(srcdir)/crypto/proposal/proposal_keywords.txt \
109                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords.h
110                 $(GPERF) -N proposal_get_token -m 10 -C -G -c -t -D < \
111                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords.txt > $@
112
113
114 # build plugins with their own Makefile
115 #######################################
116
117 SUBDIRS = .
118
119 if USE_AES
120   SUBDIRS += plugins/aes
121 endif
122
123 if USE_DES
124   SUBDIRS += plugins/des
125 endif
126
127 if USE_BLOWFISH
128   SUBDIRS += plugins/blowfish
129 endif
130
131 if USE_MD4
132   SUBDIRS += plugins/md4
133 endif
134
135 if USE_MD5
136   SUBDIRS += plugins/md5
137 endif
138
139 if USE_SHA1
140   SUBDIRS += plugins/sha1
141 endif
142
143 if USE_SHA2
144   SUBDIRS += plugins/sha2
145 endif
146
147 if USE_FIPS_PRF
148   SUBDIRS += plugins/fips_prf
149 endif
150
151 if USE_GMP
152   SUBDIRS += plugins/gmp
153 endif
154
155 if USE_RANDOM
156   SUBDIRS += plugins/random
157 endif
158
159 if USE_HMAC
160   SUBDIRS += plugins/hmac
161 endif
162
163 if USE_XCBC
164   SUBDIRS += plugins/xcbc
165 endif
166
167 if USE_X509
168   SUBDIRS += plugins/x509
169 endif
170
171 if USE_PUBKEY
172   SUBDIRS += plugins/pubkey
173 endif
174
175 if USE_PKCS1
176   SUBDIRS += plugins/pkcs1
177 endif
178
179 if USE_PGP
180   SUBDIRS += plugins/pgp
181 endif
182
183 if USE_DNSKEY
184   SUBDIRS += plugins/dnskey
185 endif
186
187 if USE_PEM
188   SUBDIRS += plugins/pem
189 endif
190
191 if USE_CURL
192   SUBDIRS += plugins/curl
193 endif
194
195 if USE_LDAP
196   SUBDIRS += plugins/ldap
197 endif
198
199 if USE_MYSQL
200   SUBDIRS += plugins/mysql
201 endif
202
203 if USE_SQLITE
204   SUBDIRS += plugins/sqlite
205 endif
206
207 if USE_ATTR_SQL
208   SUBDIRS += plugins/attr_sql
209 endif
210
211 if USE_PADLOCK
212   SUBDIRS += plugins/padlock
213 endif
214
215 if USE_OPENSSL
216   SUBDIRS += plugins/openssl
217 endif
218
219 if USE_GCRYPT
220   SUBDIRS += plugins/gcrypt
221 endif
222
223 if USE_AGENT
224   SUBDIRS += plugins/agent
225 endif
226
227 if USE_TEST_VECTORS
228   SUBDIRS += plugins/test_vectors
229 endif