added skeleton for libgcrypt based crypto plugin
[strongswan.git] / src / libstrongswan / Makefile.am
1 lib_LTLIBRARIES = libstrongswan.la
2
3 if USE_INTEGRITY_TEST
4   libstrongswan_la_SOURCES = \
5   fips/fips_canister_start.c \
6   fips/fips.c fips/fips.h
7 else
8   libstrongswan_la_SOURCES =
9 endif
10
11 libstrongswan_la_SOURCES += \
12 library.c library.h \
13 chunk.c chunk.h \
14 debug.c debug.h \
15 enum.c enum.h \
16 settings.h settings.c \
17 printf_hook.c printf_hook.h \
18 asn1/asn1.c asn1/asn1.h \
19 asn1/asn1_parser.c asn1/asn1_parser.h \
20 asn1/oid.c asn1/oid.h \
21 asn1/pem.c asn1/pem.h \
22 crypto/crypters/crypter.c crypto/crypters/crypter.h \
23 crypto/hashers/hasher.h crypto/hashers/hasher.c \
24 crypto/pkcs9.c crypto/pkcs9.h \
25 crypto/proposal/proposal_keywords.c crypto/proposal/proposal_keywords.h \
26 crypto/prfs/prf.c crypto/prfs/prf.h \
27 crypto/rngs/rng.c crypto/rngs/rng.h \
28 crypto/prf_plus.h crypto/prf_plus.c \
29 crypto/signers/signer.c crypto/signers/signer.h \
30 crypto/crypto_factory.c crypto/crypto_factory.h \
31 crypto/diffie_hellman.c crypto/diffie_hellman.h \
32 crypto/transform.c crypto/transform.h \
33 credentials/credential_factory.c credentials/credential_factory.h \
34 credentials/builder.c credentials/builder.h \
35 credentials/keys/private_key.c credentials/keys/private_key.h \
36 credentials/keys/public_key.c credentials/keys/public_key.h \
37 credentials/keys/shared_key.c credentials/keys/shared_key.h \
38 credentials/certificates/certificate.c credentials/certificates/certificate.h \
39 credentials/certificates/x509.h credentials/certificates/x509.c \
40 credentials/certificates/ac.h \
41 credentials/certificates/crl.h credentials/certificates/crl.c \
42 credentials/certificates/ocsp_request.h \
43 credentials/certificates/ocsp_response.h credentials/certificates/ocsp_response.c \
44 database/database.h database/database_factory.h database/database_factory.c \
45 fetcher/fetcher.h fetcher/fetcher_manager.h fetcher/fetcher_manager.c \
46 pgp/pgp.c pgp/pgp.h \
47 utils.h utils.c \
48 utils/host.c utils/host.h \
49 utils/identification.c utils/identification.h \
50 utils/iterator.h \
51 utils/lexparser.c utils/lexparser.h \
52 utils/linked_list.c utils/linked_list.h \
53 utils/hashtable.c utils/hashtable.h \
54 utils/enumerator.c utils/enumerator.h \
55 utils/optionsfrom.c utils/optionsfrom.h \
56 utils/mutex.c utils/mutex.h \
57 utils/backtrace.c utils/backtrace.h \
58 plugins/plugin_loader.c plugins/plugin_loader.h plugins/plugin.h
59
60 libstrongswan_la_LIBADD = -lpthread $(DLLIB)
61
62 INCLUDES = -I$(top_srcdir)/src/libstrongswan
63 AM_CFLAGS = \
64 -DIPSEC_DIR=\"${ipsecdir}\" \
65 -DIPSEC_PLUGINDIR=\"${plugindir}\"
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   libstrongswan_la_SOURCES += \
79   fips/fips_canister_end.c
80 endif
81
82 if USE_VSTR
83   libstrongswan_la_LIBADD += -lvstr
84 endif
85
86 EXTRA_DIST = \
87 asn1/oid.txt asn1/oid.pl \
88 crypto/proposal/proposal_keywords.txt
89
90 BUILT_SOURCES = \
91 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
92 $(srcdir)/crypto/proposal/proposal_keywords.c
93
94 MAINTAINERCLEANFILES = \
95 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
96 $(srcdir)/crypto/proposal/proposal_keywords.c
97
98 $(srcdir)/asn1/oid.c :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
99                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
100
101 $(srcdir)/asn1/oid.h :  $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
102                 (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
103
104 $(srcdir)/crypto/proposal/proposal_keywords.c:  $(srcdir)/crypto/proposal/proposal_keywords.txt \
105                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords.h
106                 $(GPERF) -N proposal_get_token -m 10 -C -G -c -t -D < \
107                                                                                                 $(srcdir)/crypto/proposal/proposal_keywords.txt > $@
108
109
110 # build plugins with their own Makefile
111 #######################################
112
113 SUBDIRS = .
114
115 if USE_AES
116   SUBDIRS += plugins/aes
117 endif
118
119 if USE_DES
120   SUBDIRS += plugins/des
121 endif
122
123 if USE_BLOWFISH
124   SUBDIRS += plugins/blowfish
125 endif
126
127 if USE_SERPENT
128   SUBDIRS += plugins/serpent
129 endif
130
131 if USE_TWOFISH
132   SUBDIRS += plugins/twofish
133 endif
134
135 if USE_MD4
136   SUBDIRS += plugins/md4
137 endif
138
139 if USE_MD5
140   SUBDIRS += plugins/md5
141 endif
142
143 if USE_SHA1
144   SUBDIRS += plugins/sha1
145 endif
146
147 if USE_SHA2
148   SUBDIRS += plugins/sha2
149 endif
150
151 if USE_FIPS_PRF
152   SUBDIRS += plugins/fips_prf
153 endif
154
155 if USE_GMP
156   SUBDIRS += plugins/gmp
157 endif
158
159 if USE_RANDOM
160   SUBDIRS += plugins/random
161 endif
162
163 if USE_HMAC
164   SUBDIRS += plugins/hmac
165 endif
166
167 if USE_XCBC
168   SUBDIRS += plugins/xcbc
169 endif
170
171 if USE_X509
172   SUBDIRS += plugins/x509
173 endif
174
175 if USE_PUBKEY
176   SUBDIRS += plugins/pubkey
177 endif
178
179 if USE_CURL
180   SUBDIRS += plugins/curl
181 endif
182
183 if USE_LDAP
184   SUBDIRS += plugins/ldap
185 endif
186
187 if USE_MYSQL
188   SUBDIRS += plugins/mysql
189 endif
190
191 if USE_SQLITE
192   SUBDIRS += plugins/sqlite
193 endif
194
195 if USE_PADLOCK
196   SUBDIRS += plugins/padlock
197 endif
198
199 if USE_OPENSSL
200   SUBDIRS += plugins/openssl
201 endif
202
203 if USE_GCRYPT
204   SUBDIRS += plugins/gcrypt
205 endif
206
207 if USE_AGENT
208   SUBDIRS += plugins/agent
209 endif
210
211 if USE_INTEGRITY_TEST
212   SUBDIRS += fips
213 endif