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