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