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