bb820d7c32f114fa8ccaa530d62582544f980ccd
[strongswan.git] / src / libcharon / Makefile.am
1 lib_LTLIBRARIES = libcharon.la
2
3 libcharon_la_SOURCES = \
4 bus/bus.c bus/bus.h \
5 bus/listeners/listener.h \
6 bus/listeners/file_logger.c bus/listeners/file_logger.h \
7 bus/listeners/sys_logger.c bus/listeners/sys_logger.h \
8 config/backend_manager.c config/backend_manager.h config/backend.h \
9 config/child_cfg.c config/child_cfg.h \
10 config/ike_cfg.c config/ike_cfg.h \
11 config/peer_cfg.c config/peer_cfg.h \
12 config/proposal.c config/proposal.h \
13 control/controller.c control/controller.h \
14 daemon.c daemon.h \
15 encoding/generator.c encoding/generator.h \
16 encoding/message.c encoding/message.h \
17 encoding/parser.c encoding/parser.h \
18 encoding/payloads/auth_payload.c encoding/payloads/auth_payload.h \
19 encoding/payloads/cert_payload.c encoding/payloads/cert_payload.h \
20 encoding/payloads/certreq_payload.c encoding/payloads/certreq_payload.h \
21 encoding/payloads/configuration_attribute.c encoding/payloads/configuration_attribute.h \
22 encoding/payloads/cp_payload.c encoding/payloads/cp_payload.h \
23 encoding/payloads/delete_payload.c encoding/payloads/delete_payload.h \
24 encoding/payloads/eap_payload.c encoding/payloads/eap_payload.h \
25 encoding/payloads/encodings.c encoding/payloads/encodings.h \
26 encoding/payloads/encryption_payload.c encoding/payloads/encryption_payload.h \
27 encoding/payloads/id_payload.c encoding/payloads/id_payload.h \
28 encoding/payloads/ike_header.c encoding/payloads/ike_header.h \
29 encoding/payloads/ke_payload.c  encoding/payloads/ke_payload.h \
30 encoding/payloads/nonce_payload.c encoding/payloads/nonce_payload.h \
31 encoding/payloads/notify_payload.c encoding/payloads/notify_payload.h \
32 encoding/payloads/payload.c encoding/payloads/payload.h \
33 encoding/payloads/proposal_substructure.c encoding/payloads/proposal_substructure.h \
34 encoding/payloads/sa_payload.c encoding/payloads/sa_payload.h \
35 encoding/payloads/traffic_selector_substructure.c encoding/payloads/traffic_selector_substructure.h \
36 encoding/payloads/transform_attribute.c encoding/payloads/transform_attribute.h \
37 encoding/payloads/transform_substructure.c encoding/payloads/transform_substructure.h \
38 encoding/payloads/ts_payload.c encoding/payloads/ts_payload.h \
39 encoding/payloads/unknown_payload.c encoding/payloads/unknown_payload.h \
40 encoding/payloads/vendor_id_payload.c encoding/payloads/vendor_id_payload.h \
41 kernel/kernel_handler.c kernel/kernel_handler.h \
42 network/packet.c network/packet.h \
43 network/receiver.c network/receiver.h \
44 network/sender.c network/sender.h \
45 network/socket_manager.c network/socket_manager.h network/socket.h \
46 processing/jobs/acquire_job.c processing/jobs/acquire_job.h \
47 processing/jobs/delete_child_sa_job.c processing/jobs/delete_child_sa_job.h \
48 processing/jobs/delete_ike_sa_job.c processing/jobs/delete_ike_sa_job.h \
49 processing/jobs/migrate_job.c processing/jobs/migrate_job.h \
50 processing/jobs/process_message_job.c processing/jobs/process_message_job.h \
51 processing/jobs/rekey_child_sa_job.c processing/jobs/rekey_child_sa_job.h \
52 processing/jobs/rekey_ike_sa_job.c processing/jobs/rekey_ike_sa_job.h \
53 processing/jobs/retransmit_job.c processing/jobs/retransmit_job.h \
54 processing/jobs/send_dpd_job.c processing/jobs/send_dpd_job.h \
55 processing/jobs/send_keepalive_job.c processing/jobs/send_keepalive_job.h \
56 processing/jobs/roam_job.c processing/jobs/roam_job.h \
57 processing/jobs/update_sa_job.c processing/jobs/update_sa_job.h \
58 processing/jobs/inactivity_job.c processing/jobs/inactivity_job.h \
59 sa/authenticators/authenticator.c sa/authenticators/authenticator.h \
60 sa/authenticators/eap_authenticator.c sa/authenticators/eap_authenticator.h \
61 sa/authenticators/eap/eap_method.c sa/authenticators/eap/eap_method.h \
62 sa/authenticators/eap/eap_manager.c sa/authenticators/eap/eap_manager.h \
63 sa/authenticators/eap/sim_manager.c sa/authenticators/eap/sim_manager.h \
64 sa/authenticators/psk_authenticator.c sa/authenticators/psk_authenticator.h \
65 sa/authenticators/pubkey_authenticator.c sa/authenticators/pubkey_authenticator.h \
66 sa/child_sa.c sa/child_sa.h \
67 sa/ike_sa.c sa/ike_sa.h \
68 sa/ike_sa_id.c sa/ike_sa_id.h \
69 sa/ike_sa_manager.c sa/ike_sa_manager.h \
70 sa/task_manager.c sa/task_manager.h \
71 sa/keymat.c sa/keymat.h \
72 sa/trap_manager.c sa/trap_manager.h \
73 sa/tasks/child_create.c sa/tasks/child_create.h \
74 sa/tasks/child_delete.c sa/tasks/child_delete.h \
75 sa/tasks/child_rekey.c sa/tasks/child_rekey.h \
76 sa/tasks/ike_auth.c sa/tasks/ike_auth.h \
77 sa/tasks/ike_cert_pre.c sa/tasks/ike_cert_pre.h \
78 sa/tasks/ike_cert_post.c sa/tasks/ike_cert_post.h \
79 sa/tasks/ike_config.c sa/tasks/ike_config.h \
80 sa/tasks/ike_delete.c sa/tasks/ike_delete.h \
81 sa/tasks/ike_dpd.c sa/tasks/ike_dpd.h \
82 sa/tasks/ike_init.c sa/tasks/ike_init.h \
83 sa/tasks/ike_natd.c sa/tasks/ike_natd.h \
84 sa/tasks/ike_mobike.c sa/tasks/ike_mobike.h \
85 sa/tasks/ike_rekey.c sa/tasks/ike_rekey.h \
86 sa/tasks/ike_reauth.c sa/tasks/ike_reauth.h \
87 sa/tasks/ike_auth_lifetime.c sa/tasks/ike_auth_lifetime.h \
88 sa/tasks/ike_vendor.c sa/tasks/ike_vendor.h \
89 sa/tasks/task.c sa/tasks/task.h \
90 tnc/tncif.h tnc/tncifimc.h tnc/tncifimv.h \
91 tnc/tncifimv_names.h tnc/tncifimv_names.c \
92 tnc/imc/imc.h tnc/imc/imc_manager.h \
93 tnc/imv/imv.h tnc/imv/imv_manager.h tnc/imv/imv_recommendations.h \
94 tnc/tnccs/tnccs.c tnc/tnccs/tnccs.h \
95 tnc/tnccs/tnccs_manager.c tnc/tnccs/tnccs_manager.h
96
97 daemon.lo :             $(top_builddir)/config.status
98
99 INCLUDES = \
100         -I${linux_headers} \
101         -I$(top_srcdir)/src/libstrongswan \
102         -I$(top_srcdir)/src/libhydra \
103         -I$(top_srcdir)/src/libcharon
104
105 AM_CFLAGS = \
106         -DIPSEC_DIR=\"${ipsecdir}\" \
107         -DIPSEC_PIDDIR=\"${piddir}\" \
108         -DPLUGINS=\""${libcharon_plugins}\""
109
110 libcharon_la_LIBADD = -lm $(PTHREADLIB) $(DLLIB) $(SOCKLIB)
111
112 EXTRA_DIST = Android.mk
113
114 # compile options
115 #################
116
117 if USE_ME
118   libcharon_la_SOURCES += encoding/payloads/endpoint_notify.c encoding/payloads/endpoint_notify.h \
119     processing/jobs/initiate_mediation_job.c processing/jobs/initiate_mediation_job.h \
120     processing/jobs/mediation_job.c processing/jobs/mediation_job.h \
121     sa/connect_manager.c sa/connect_manager.h \
122     sa/mediation_manager.c sa/mediation_manager.h \
123     sa/tasks/ike_me.c sa/tasks/ike_me.h
124 endif
125
126 if USE_LIBCAP
127   libcharon_la_LIBADD += -lcap
128 endif
129
130 # build optional plugins
131 ########################
132
133 if MONOLITHIC
134 SUBDIRS =
135 else
136 SUBDIRS = .
137 endif
138
139 if USE_LOAD_TESTER
140   SUBDIRS += plugins/load_tester
141 if MONOLITHIC
142   libcharon_la_LIBADD += plugins/load_tester/libstrongswan-load-tester.la
143 endif
144 endif
145
146 if USE_SOCKET_DEFAULT
147   SUBDIRS += plugins/socket_default
148 if MONOLITHIC
149   libcharon_la_LIBADD += plugins/socket_default/libstrongswan-socket-default.la
150 endif
151 endif
152
153 if USE_SOCKET_RAW
154   SUBDIRS += plugins/socket_raw
155 if MONOLITHIC
156   libcharon_la_LIBADD += plugins/socket_raw/libstrongswan-socket-raw.la
157 endif
158 endif
159
160 if USE_SOCKET_DYNAMIC
161   SUBDIRS += plugins/socket_dynamic
162 if MONOLITHIC
163   libcharon_la_LIBADD += plugins/socket_dynamic/libstrongswan-socket-dynamic.la
164 endif
165 endif
166
167 if USE_FARP
168   SUBDIRS += plugins/farp
169 if MONOLITHIC
170   libcharon_la_LIBADD += plugins/farp/libstrongswan-farp.la
171 endif
172 endif
173
174 if USE_STROKE
175   SUBDIRS += plugins/stroke
176 if MONOLITHIC
177   libcharon_la_LIBADD += plugins/stroke/libstrongswan-stroke.la
178 endif
179 endif
180
181 if USE_SMP
182   SUBDIRS += plugins/smp
183 if MONOLITHIC
184   libcharon_la_LIBADD += plugins/smp/libstrongswan-smp.la
185 endif
186 endif
187
188 if USE_SQL
189   SUBDIRS += plugins/sql
190 if MONOLITHIC
191   libcharon_la_LIBADD += plugins/sql/libstrongswan-sql.la
192 endif
193 endif
194
195 if USE_UPDOWN
196   SUBDIRS += plugins/updown
197 if MONOLITHIC
198   libcharon_la_LIBADD += plugins/updown/libstrongswan-updown.la
199 endif
200 endif
201
202 if USE_EAP_IDENTITY
203   SUBDIRS += plugins/eap_identity
204 if MONOLITHIC
205   libcharon_la_LIBADD += plugins/eap_identity/libstrongswan-eap-identity.la
206 endif
207 endif
208
209 if USE_EAP_SIM
210   SUBDIRS += plugins/eap_sim
211 if MONOLITHIC
212   libcharon_la_LIBADD += plugins/eap_sim/libstrongswan-eap-sim.la
213 endif
214 endif
215
216 if USE_EAP_SIM_FILE
217   SUBDIRS += plugins/eap_sim_file
218 if MONOLITHIC
219   libcharon_la_LIBADD += plugins/eap_sim_file/libstrongswan-eap-sim-file.la
220 endif
221 endif
222
223 if USE_EAP_SIMAKA_SQL
224   SUBDIRS += plugins/eap_simaka_sql
225 if MONOLITHIC
226   libcharon_la_LIBADD += plugins/eap_simaka_sql/libstrongswan-eap-simaka-sql.la
227 endif
228 endif
229
230 if USE_EAP_SIMAKA_PSEUDONYM
231   SUBDIRS += plugins/eap_simaka_pseudonym
232 if MONOLITHIC
233   libcharon_la_LIBADD += plugins/eap_simaka_pseudonym/libstrongswan-eap-simaka-pseudonym.la
234 endif
235 endif
236
237 if USE_EAP_SIMAKA_REAUTH
238   SUBDIRS += plugins/eap_simaka_reauth
239 if MONOLITHIC
240   libcharon_la_LIBADD += plugins/eap_simaka_reauth/libstrongswan-eap-simaka-reauth.la
241 endif
242 endif
243
244 if USE_EAP_AKA
245   SUBDIRS += plugins/eap_aka
246 if MONOLITHIC
247   libcharon_la_LIBADD += plugins/eap_aka/libstrongswan-eap-aka.la
248 endif
249 endif
250
251 if USE_EAP_AKA_3GPP2
252   SUBDIRS += plugins/eap_aka_3gpp2
253 if MONOLITHIC
254   libcharon_la_LIBADD += plugins/eap_aka_3gpp2/libstrongswan-eap-aka-3gpp2.la
255 endif
256 endif
257
258 if USE_SIMAKA
259 if MONOLITHIC
260   # otherwise this library is linked to both the eap_aka and the eap_sim plugin
261   libcharon_la_LIBADD += $(top_builddir)/src/libsimaka/libsimaka.la
262 endif
263 endif
264
265 if USE_EAP_MD5
266   SUBDIRS += plugins/eap_md5
267 if MONOLITHIC
268   libcharon_la_LIBADD += plugins/eap_md5/libstrongswan-eap-md5.la
269 endif
270 endif
271
272 if USE_EAP_GTC
273   SUBDIRS += plugins/eap_gtc
274 if MONOLITHIC
275   libcharon_la_LIBADD += plugins/eap_gtc/libstrongswan-eap-gtc.la
276 endif
277 endif
278
279 if USE_EAP_MSCHAPV2
280   SUBDIRS += plugins/eap_mschapv2
281 if MONOLITHIC
282   libcharon_la_LIBADD += plugins/eap_mschapv2/libstrongswan-eap-mschapv2.la
283 endif
284 endif
285
286 if USE_EAP_RADIUS
287   SUBDIRS += plugins/eap_radius
288 if MONOLITHIC
289   libcharon_la_LIBADD += plugins/eap_radius/libstrongswan-eap-radius.la
290 endif
291 endif
292
293 if USE_EAP_TLS
294   SUBDIRS += plugins/eap_tls
295 if MONOLITHIC
296   libcharon_la_LIBADD += plugins/eap_tls/libstrongswan-eap-tls.la
297 endif
298 endif
299
300 if USE_EAP_TTLS
301   SUBDIRS += plugins/eap_ttls
302 if MONOLITHIC
303   libcharon_la_LIBADD += plugins/eap_ttls/libstrongswan-eap-ttls.la
304 endif
305 endif
306
307 if USE_EAP_TNC
308   SUBDIRS += plugins/eap_tnc
309 if MONOLITHIC
310   libcharon_la_LIBADD += plugins/eap_tnc/libstrongswan-eap-tnc.la
311 endif
312 endif
313
314 if USE_TLS
315 if MONOLITHIC
316   # otherwise this library is linked to eap_tls
317   libcharon_la_LIBADD += $(top_builddir)/src/libtls/libtls.la
318 endif
319 endif
320
321 if USE_TNC_IMC
322   SUBDIRS += plugins/tnc_imc
323 if MONOLITHIC
324   libcharon_la_LIBADD += plugins/tnc_imc/libstrongswan-tnc_imc.la
325 endif
326 endif
327
328 if USE_TNC_IMV
329   SUBDIRS += plugins/tnc_imv
330 if MONOLITHIC
331   libcharon_la_LIBADD += plugins/tnc_imv/libstrongswan-tnc_imv.la
332 endif
333 endif
334
335 if USE_TNCCS_11
336   SUBDIRS += plugins/tnccs_11
337 if MONOLITHIC
338   libcharon_la_LIBADD += plugins/tnccs_11/libstrongswan-tnccs-11.la
339 endif
340 endif
341
342 if USE_TNCCS_20
343   SUBDIRS += plugins/tnccs_20
344 if MONOLITHIC
345   libcharon_la_LIBADD += plugins/tnccs_20/libstrongswan-tnccs-20.la
346 endif
347 endif
348
349 if USE_MEDSRV
350   SUBDIRS += plugins/medsrv
351 if MONOLITHIC
352   libcharon_la_LIBADD += plugins/medsrv/libstrongswan-medsrv.la
353 endif
354 endif
355
356 if USE_MEDCLI
357   SUBDIRS += plugins/medcli
358 if MONOLITHIC
359   libcharon_la_LIBADD += plugins/medcli/libstrongswan-medcli.la
360 endif
361 endif
362
363 if USE_NM
364   SUBDIRS += plugins/nm
365 if MONOLITHIC
366   libcharon_la_LIBADD += plugins/nm/libstrongswan-nm.la
367 endif
368 endif
369
370 if USE_DHCP
371   SUBDIRS += plugins/dhcp
372 if MONOLITHIC
373   libcharon_la_LIBADD += plugins/dhcp/libstrongswan-dhcp.la
374 endif
375 endif
376
377 if USE_ANDROID
378   SUBDIRS += plugins/android
379 if MONOLITHIC
380   libcharon_la_LIBADD += plugins/android/libstrongswan-android.la
381 endif
382 endif
383
384 if USE_MAEMO
385   SUBDIRS += plugins/maemo
386 if MONOLITHIC
387   libcharon_la_LIBADD += plugins/maemo/libstrongswan-maemo.la
388 endif
389 endif
390
391 if USE_HA
392   SUBDIRS += plugins/ha
393 if MONOLITHIC
394   libcharon_la_LIBADD += plugins/ha/libstrongswan-ha.la
395 endif
396 endif
397
398 if USE_LED
399   SUBDIRS += plugins/led
400 if MONOLITHIC
401   libcharon_la_LIBADD += plugins/led/libstrongswan-led.la
402 endif
403 endif
404
405 if USE_UCI
406   SUBDIRS += plugins/uci
407 if MONOLITHIC
408   libcharon_la_LIBADD += plugins/uci/libstrongswan-uci.la
409 endif
410 endif
411
412 if USE_ADDRBLOCK
413   SUBDIRS += plugins/addrblock
414 if MONOLITHIC
415   libcharon_la_LIBADD += plugins/uci/libstrongswan-addrblock.la
416 endif
417 endif
418
419 if USE_UNIT_TESTS
420   SUBDIRS += plugins/unit_tester
421 if MONOLITHIC
422   libcharon_la_LIBADD += plugins/unit_tester/libstrongswan-unit-tester.la
423 endif
424 endif
425