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