Integrate nm plugin directly in charon-nm.
[strongswan.git] / src / libcharon / Makefile.am
1 ipseclib_LTLIBRARIES = libcharon.la
2
3 libcharon_la_SOURCES = \
4 bus/bus.c bus/bus.h \
5 bus/listeners/listener.h \
6 bus/listeners/logger.h \
7 bus/listeners/file_logger.c bus/listeners/file_logger.h \
8 bus/listeners/sys_logger.c bus/listeners/sys_logger.h \
9 config/backend_manager.c config/backend_manager.h config/backend.h \
10 config/child_cfg.c config/child_cfg.h \
11 config/ike_cfg.c config/ike_cfg.h \
12 config/peer_cfg.c config/peer_cfg.h \
13 config/proposal.c config/proposal.h \
14 control/controller.c control/controller.h \
15 daemon.c daemon.h \
16 encoding/generator.c encoding/generator.h \
17 encoding/message.c encoding/message.h \
18 encoding/parser.c encoding/parser.h \
19 encoding/payloads/auth_payload.c encoding/payloads/auth_payload.h \
20 encoding/payloads/cert_payload.c encoding/payloads/cert_payload.h \
21 encoding/payloads/certreq_payload.c encoding/payloads/certreq_payload.h \
22 encoding/payloads/configuration_attribute.c encoding/payloads/configuration_attribute.h \
23 encoding/payloads/cp_payload.c encoding/payloads/cp_payload.h \
24 encoding/payloads/delete_payload.c encoding/payloads/delete_payload.h \
25 encoding/payloads/eap_payload.c encoding/payloads/eap_payload.h \
26 encoding/payloads/encodings.c encoding/payloads/encodings.h \
27 encoding/payloads/encryption_payload.c encoding/payloads/encryption_payload.h \
28 encoding/payloads/id_payload.c encoding/payloads/id_payload.h \
29 encoding/payloads/ike_header.c encoding/payloads/ike_header.h \
30 encoding/payloads/ke_payload.c  encoding/payloads/ke_payload.h \
31 encoding/payloads/nonce_payload.c encoding/payloads/nonce_payload.h \
32 encoding/payloads/notify_payload.c encoding/payloads/notify_payload.h \
33 encoding/payloads/payload.c encoding/payloads/payload.h \
34 encoding/payloads/proposal_substructure.c encoding/payloads/proposal_substructure.h \
35 encoding/payloads/sa_payload.c encoding/payloads/sa_payload.h \
36 encoding/payloads/traffic_selector_substructure.c encoding/payloads/traffic_selector_substructure.h \
37 encoding/payloads/transform_attribute.c encoding/payloads/transform_attribute.h \
38 encoding/payloads/transform_substructure.c encoding/payloads/transform_substructure.h \
39 encoding/payloads/ts_payload.c encoding/payloads/ts_payload.h \
40 encoding/payloads/unknown_payload.c encoding/payloads/unknown_payload.h \
41 encoding/payloads/vendor_id_payload.c encoding/payloads/vendor_id_payload.h \
42 encoding/payloads/hash_payload.c encoding/payloads/hash_payload.h \
43 kernel/kernel_handler.c kernel/kernel_handler.h \
44 network/receiver.c network/receiver.h network/sender.c network/sender.h \
45 network/packet.c network/packet.h network/socket.c network/socket.h \
46 network/socket_manager.c network/socket_manager.h \
47 processing/jobs/acquire_job.c processing/jobs/acquire_job.h \
48 processing/jobs/delete_child_sa_job.c processing/jobs/delete_child_sa_job.h \
49 processing/jobs/delete_ike_sa_job.c processing/jobs/delete_ike_sa_job.h \
50 processing/jobs/migrate_job.c processing/jobs/migrate_job.h \
51 processing/jobs/process_message_job.c processing/jobs/process_message_job.h \
52 processing/jobs/rekey_child_sa_job.c processing/jobs/rekey_child_sa_job.h \
53 processing/jobs/rekey_ike_sa_job.c processing/jobs/rekey_ike_sa_job.h \
54 processing/jobs/retransmit_job.c processing/jobs/retransmit_job.h \
55 processing/jobs/send_dpd_job.c processing/jobs/send_dpd_job.h \
56 processing/jobs/send_keepalive_job.c processing/jobs/send_keepalive_job.h \
57 processing/jobs/start_action_job.c processing/jobs/start_action_job.h \
58 processing/jobs/roam_job.c processing/jobs/roam_job.h \
59 processing/jobs/update_sa_job.c processing/jobs/update_sa_job.h \
60 processing/jobs/inactivity_job.c processing/jobs/inactivity_job.h \
61 sa/eap/eap_method.c sa/eap/eap_method.h \
62 sa/eap/eap_manager.c sa/eap/eap_manager.h \
63 sa/xauth/xauth_method.c sa/xauth/xauth_method.h \
64 sa/xauth/xauth_manager.c sa/xauth/xauth_manager.h \
65 sa/authenticator.c sa/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/keymat.h sa/keymat.c \
70 sa/ike_sa_manager.c sa/ike_sa_manager.h \
71 sa/task_manager.h sa/task_manager.c \
72 sa/shunt_manager.c sa/shunt_manager.h \
73 sa/trap_manager.c sa/trap_manager.h \
74 sa/task.c sa/task.h
75
76 if USE_IKEV2
77 libcharon_la_SOURCES += \
78 sa/ikev2/keymat_v2.c sa/ikev2/keymat_v2.h \
79 sa/ikev2/task_manager_v2.c sa/ikev2/task_manager_v2.h \
80 sa/ikev2/authenticators/eap_authenticator.c sa/ikev2/authenticators/eap_authenticator.h \
81 sa/ikev2/authenticators/psk_authenticator.c sa/ikev2/authenticators/psk_authenticator.h \
82 sa/ikev2/authenticators/pubkey_authenticator.c sa/ikev2/authenticators/pubkey_authenticator.h \
83 sa/ikev2/tasks/child_create.c sa/ikev2/tasks/child_create.h \
84 sa/ikev2/tasks/child_delete.c sa/ikev2/tasks/child_delete.h \
85 sa/ikev2/tasks/child_rekey.c sa/ikev2/tasks/child_rekey.h \
86 sa/ikev2/tasks/ike_auth.c sa/ikev2/tasks/ike_auth.h \
87 sa/ikev2/tasks/ike_cert_pre.c sa/ikev2/tasks/ike_cert_pre.h \
88 sa/ikev2/tasks/ike_cert_post.c sa/ikev2/tasks/ike_cert_post.h \
89 sa/ikev2/tasks/ike_config.c sa/ikev2/tasks/ike_config.h \
90 sa/ikev2/tasks/ike_delete.c sa/ikev2/tasks/ike_delete.h \
91 sa/ikev2/tasks/ike_dpd.c sa/ikev2/tasks/ike_dpd.h \
92 sa/ikev2/tasks/ike_init.c sa/ikev2/tasks/ike_init.h \
93 sa/ikev2/tasks/ike_natd.c sa/ikev2/tasks/ike_natd.h \
94 sa/ikev2/tasks/ike_mobike.c sa/ikev2/tasks/ike_mobike.h \
95 sa/ikev2/tasks/ike_rekey.c sa/ikev2/tasks/ike_rekey.h \
96 sa/ikev2/tasks/ike_reauth.c sa/ikev2/tasks/ike_reauth.h \
97 sa/ikev2/tasks/ike_auth_lifetime.c sa/ikev2/tasks/ike_auth_lifetime.h \
98 sa/ikev2/tasks/ike_vendor.c sa/ikev2/tasks/ike_vendor.h
99 endif
100
101 if USE_IKEV1
102 libcharon_la_SOURCES += \
103 sa/ikev1/keymat_v1.c sa/ikev1/keymat_v1.h \
104 sa/ikev1/task_manager_v1.c sa/ikev1/task_manager_v1.h \
105 sa/ikev1/authenticators/psk_v1_authenticator.c sa/ikev1/authenticators/psk_v1_authenticator.h \
106 sa/ikev1/authenticators/pubkey_v1_authenticator.c sa/ikev1/authenticators/pubkey_v1_authenticator.h \
107 sa/ikev1/authenticators/hybrid_authenticator.c sa/ikev1/authenticators/hybrid_authenticator.h \
108 sa/ikev1/phase1.c sa/ikev1/phase1.h \
109 sa/ikev1/tasks/main_mode.c sa/ikev1/tasks/main_mode.h \
110 sa/ikev1/tasks/aggressive_mode.c sa/ikev1/tasks/aggressive_mode.h \
111 sa/ikev1/tasks/informational.c sa/ikev1/tasks/informational.h \
112 sa/ikev1/tasks/isakmp_cert_pre.c sa/ikev1/tasks/isakmp_cert_pre.h \
113 sa/ikev1/tasks/isakmp_cert_post.c sa/ikev1/tasks/isakmp_cert_post.h \
114 sa/ikev1/tasks/isakmp_natd.c sa/ikev1/tasks/isakmp_natd.h \
115 sa/ikev1/tasks/isakmp_vendor.c sa/ikev1/tasks/isakmp_vendor.h \
116 sa/ikev1/tasks/isakmp_delete.c sa/ikev1/tasks/isakmp_delete.h \
117 sa/ikev1/tasks/isakmp_dpd.c sa/ikev1/tasks/isakmp_dpd.h \
118 sa/ikev1/tasks/xauth.c sa/ikev1/tasks/xauth.h \
119 sa/ikev1/tasks/quick_mode.c sa/ikev1/tasks/quick_mode.h \
120 sa/ikev1/tasks/quick_delete.c sa/ikev1/tasks/quick_delete.h \
121 sa/ikev1/tasks/mode_config.c sa/ikev1/tasks/mode_config.h \
122 processing/jobs/adopt_children_job.c processing/jobs/adopt_children_job.h
123 endif
124
125
126 daemon.lo :             $(top_builddir)/config.status
127
128 INCLUDES = \
129         -I${linux_headers} \
130         -I$(top_srcdir)/src/libstrongswan \
131         -I$(top_srcdir)/src/libhydra \
132         -I$(top_srcdir)/src/libcharon
133
134 AM_CFLAGS = \
135         -DIPSEC_DIR=\"${ipsecdir}\" \
136         -DIPSEC_PIDDIR=\"${piddir}\"
137
138 libcharon_la_LIBADD = -lm $(PTHREADLIB) $(DLLIB) $(SOCKLIB)
139
140 EXTRA_DIST = Android.mk
141
142 # compile options
143 #################
144
145 if USE_ME
146   libcharon_la_SOURCES += encoding/payloads/endpoint_notify.c encoding/payloads/endpoint_notify.h \
147     processing/jobs/initiate_mediation_job.c processing/jobs/initiate_mediation_job.h \
148     processing/jobs/mediation_job.c processing/jobs/mediation_job.h \
149     sa/ikev2/connect_manager.c sa/ikev2/connect_manager.h \
150     sa/ikev2/mediation_manager.c sa/ikev2/mediation_manager.h \
151     sa/ikev2/tasks/ike_me.c sa/ikev2/tasks/ike_me.h
152 endif
153
154 if USE_LIBCAP
155   libcharon_la_LIBADD += -lcap
156 endif
157
158 # build optional plugins
159 ########################
160
161 if MONOLITHIC
162 SUBDIRS =
163 else
164 SUBDIRS = .
165 endif
166
167 if USE_LOAD_TESTER
168   SUBDIRS += plugins/load_tester
169 if MONOLITHIC
170   libcharon_la_LIBADD += plugins/load_tester/libstrongswan-load-tester.la
171 endif
172 endif
173
174 if USE_SOCKET_DEFAULT
175   SUBDIRS += plugins/socket_default
176 if MONOLITHIC
177   libcharon_la_LIBADD += plugins/socket_default/libstrongswan-socket-default.la
178 endif
179 endif
180
181 if USE_SOCKET_RAW
182   SUBDIRS += plugins/socket_raw
183 if MONOLITHIC
184   libcharon_la_LIBADD += plugins/socket_raw/libstrongswan-socket-raw.la
185 endif
186 endif
187
188 if USE_SOCKET_DYNAMIC
189   SUBDIRS += plugins/socket_dynamic
190 if MONOLITHIC
191   libcharon_la_LIBADD += plugins/socket_dynamic/libstrongswan-socket-dynamic.la
192 endif
193 endif
194
195 if USE_FARP
196   SUBDIRS += plugins/farp
197 if MONOLITHIC
198   libcharon_la_LIBADD += plugins/farp/libstrongswan-farp.la
199 endif
200 endif
201
202 if USE_STROKE
203   SUBDIRS += plugins/stroke
204 if MONOLITHIC
205   libcharon_la_LIBADD += plugins/stroke/libstrongswan-stroke.la
206 endif
207 endif
208
209 if USE_SMP
210   SUBDIRS += plugins/smp
211 if MONOLITHIC
212   libcharon_la_LIBADD += plugins/smp/libstrongswan-smp.la
213 endif
214 endif
215
216 if USE_SQL
217   SUBDIRS += plugins/sql
218 if MONOLITHIC
219   libcharon_la_LIBADD += plugins/sql/libstrongswan-sql.la
220 endif
221 endif
222
223 if USE_UPDOWN
224   SUBDIRS += plugins/updown
225 if MONOLITHIC
226   libcharon_la_LIBADD += plugins/updown/libstrongswan-updown.la
227 endif
228 endif
229
230 if USE_EAP_IDENTITY
231   SUBDIRS += plugins/eap_identity
232 if MONOLITHIC
233   libcharon_la_LIBADD += plugins/eap_identity/libstrongswan-eap-identity.la
234 endif
235 endif
236
237 if USE_EAP_SIM
238   SUBDIRS += plugins/eap_sim
239 if MONOLITHIC
240   libcharon_la_LIBADD += plugins/eap_sim/libstrongswan-eap-sim.la
241 endif
242 endif
243
244 if USE_EAP_SIM_FILE
245   SUBDIRS += plugins/eap_sim_file
246 if MONOLITHIC
247   libcharon_la_LIBADD += plugins/eap_sim_file/libstrongswan-eap-sim-file.la
248 endif
249 endif
250
251 if USE_EAP_SIM_PCSC
252   SUBDIRS += plugins/eap_sim_pcsc
253 if MONOLITHIC
254   libcharon_la_LIBADD += plugins/eap_sim_pcsc/libstrongswan-eap-sim-pcsc.la
255 endif
256 endif
257
258 if USE_EAP_SIMAKA_SQL
259   SUBDIRS += plugins/eap_simaka_sql
260 if MONOLITHIC
261   libcharon_la_LIBADD += plugins/eap_simaka_sql/libstrongswan-eap-simaka-sql.la
262 endif
263 endif
264
265 if USE_EAP_SIMAKA_PSEUDONYM
266   SUBDIRS += plugins/eap_simaka_pseudonym
267 if MONOLITHIC
268   libcharon_la_LIBADD += plugins/eap_simaka_pseudonym/libstrongswan-eap-simaka-pseudonym.la
269 endif
270 endif
271
272 if USE_EAP_SIMAKA_REAUTH
273   SUBDIRS += plugins/eap_simaka_reauth
274 if MONOLITHIC
275   libcharon_la_LIBADD += plugins/eap_simaka_reauth/libstrongswan-eap-simaka-reauth.la
276 endif
277 endif
278
279 if USE_EAP_AKA
280   SUBDIRS += plugins/eap_aka
281 if MONOLITHIC
282   libcharon_la_LIBADD += plugins/eap_aka/libstrongswan-eap-aka.la
283 endif
284 endif
285
286 if USE_EAP_AKA_3GPP2
287   SUBDIRS += plugins/eap_aka_3gpp2
288 if MONOLITHIC
289   libcharon_la_LIBADD += plugins/eap_aka_3gpp2/libstrongswan-eap-aka-3gpp2.la
290 endif
291 endif
292
293 if USE_SIMAKA
294 if MONOLITHIC
295   # otherwise this library is linked to both the eap_aka and the eap_sim plugin
296   libcharon_la_LIBADD += $(top_builddir)/src/libsimaka/libsimaka.la
297 endif
298 endif
299
300 if USE_EAP_MD5
301   SUBDIRS += plugins/eap_md5
302 if MONOLITHIC
303   libcharon_la_LIBADD += plugins/eap_md5/libstrongswan-eap-md5.la
304 endif
305 endif
306
307 if USE_EAP_GTC
308   SUBDIRS += plugins/eap_gtc
309 if MONOLITHIC
310   libcharon_la_LIBADD += plugins/eap_gtc/libstrongswan-eap-gtc.la
311 endif
312 endif
313
314 if USE_EAP_MSCHAPV2
315   SUBDIRS += plugins/eap_mschapv2
316 if MONOLITHIC
317   libcharon_la_LIBADD += plugins/eap_mschapv2/libstrongswan-eap-mschapv2.la
318 endif
319 endif
320
321 if USE_EAP_RADIUS
322   SUBDIRS += plugins/eap_radius
323 if MONOLITHIC
324   libcharon_la_LIBADD += plugins/eap_radius/libstrongswan-eap-radius.la
325 endif
326 endif
327
328 if USE_EAP_TLS
329   SUBDIRS += plugins/eap_tls
330 if MONOLITHIC
331   libcharon_la_LIBADD += plugins/eap_tls/libstrongswan-eap-tls.la
332 endif
333 endif
334
335 if USE_EAP_TTLS
336   SUBDIRS += plugins/eap_ttls
337 if MONOLITHIC
338   libcharon_la_LIBADD += plugins/eap_ttls/libstrongswan-eap-ttls.la
339 endif
340 endif
341
342 if USE_EAP_PEAP
343   SUBDIRS += plugins/eap_peap
344 if MONOLITHIC
345   libcharon_la_LIBADD += plugins/eap_peap/libstrongswan-eap-peap.la
346 endif
347 endif
348
349 if USE_EAP_TNC
350   SUBDIRS += plugins/eap_tnc
351 if MONOLITHIC
352   libcharon_la_LIBADD += plugins/eap_tnc/libstrongswan-eap-tnc.la
353 endif
354 endif
355
356 if USE_TLS
357 if MONOLITHIC
358   # otherwise this library is linked to eap_tls
359   libcharon_la_LIBADD += $(top_builddir)/src/libtls/libtls.la
360 endif
361 endif
362
363 if USE_RADIUS
364 if MONOLITHIC
365   # otherwise this library is linked to eap_radius
366   libcharon_la_LIBADD += $(top_builddir)/src/libradius/libradius.la
367 endif
368 endif
369
370 if USE_TNC_IFMAP
371   SUBDIRS += plugins/tnc_ifmap
372 if MONOLITHIC
373   libcharon_la_LIBADD += plugins/tnc_ifmap/libstrongswan-tnc-ifmap.la
374 endif
375 endif
376
377 if USE_TNC_PDP
378   SUBDIRS += plugins/tnc_pdp
379 if MONOLITHIC
380   libcharon_la_LIBADD += plugins/tnc_pdp/libstrongswan-tnc-pdp.la
381 endif
382 endif
383
384 if USE_TNC_IMC
385   SUBDIRS += plugins/tnc_imc
386 if MONOLITHIC
387   libcharon_la_LIBADD += plugins/tnc_imc/libstrongswan-tnc-imc.la
388 endif
389 endif
390
391 if USE_TNC_IMV
392   SUBDIRS += plugins/tnc_imv
393 if MONOLITHIC
394   libcharon_la_LIBADD += plugins/tnc_imv/libstrongswan-tnc-imv.la
395 endif
396 endif
397
398 if USE_TNC_TNCCS
399   SUBDIRS += plugins/tnc_tnccs
400 if MONOLITHIC
401   libcharon_la_LIBADD += plugins/tnc_tnccs/libstrongswan-tnc-tnccs.la
402 endif
403 endif
404
405 if USE_TNCCS_11
406   SUBDIRS += plugins/tnccs_11
407 if MONOLITHIC
408   libcharon_la_LIBADD += plugins/tnccs_11/libstrongswan-tnccs-11.la
409 endif
410 endif
411
412 if USE_TNCCS_20
413   SUBDIRS += plugins/tnccs_20
414 if MONOLITHIC
415   libcharon_la_LIBADD += plugins/tnccs_20/libstrongswan-tnccs-20.la
416 endif
417 endif
418
419 if USE_TNCCS_DYNAMIC
420   SUBDIRS += plugins/tnccs_dynamic
421 if MONOLITHIC
422   libcharon_la_LIBADD += plugins/tnccs_dynamic/libstrongswan-tnccs-dynamic.la
423 endif
424 endif
425
426 if USE_LIBTNCCS
427 if MONOLITHIC
428   # otherwise this library is linked to the respective plugins
429   libcharon_la_LIBADD += $(top_builddir)/src/libtnccs/libtnccs.la
430 endif
431 endif
432
433 if USE_MEDSRV
434   SUBDIRS += plugins/medsrv
435 if MONOLITHIC
436   libcharon_la_LIBADD += plugins/medsrv/libstrongswan-medsrv.la
437 endif
438 endif
439
440 if USE_MEDCLI
441   SUBDIRS += plugins/medcli
442 if MONOLITHIC
443   libcharon_la_LIBADD += plugins/medcli/libstrongswan-medcli.la
444 endif
445 endif
446
447 if USE_DHCP
448   SUBDIRS += plugins/dhcp
449 if MONOLITHIC
450   libcharon_la_LIBADD += plugins/dhcp/libstrongswan-dhcp.la
451 endif
452 endif
453
454 if USE_ANDROID
455   SUBDIRS += plugins/android
456 if MONOLITHIC
457   libcharon_la_LIBADD += plugins/android/libstrongswan-android.la
458 endif
459 endif
460
461 if USE_MAEMO
462   SUBDIRS += plugins/maemo
463 if MONOLITHIC
464   libcharon_la_LIBADD += plugins/maemo/libstrongswan-maemo.la
465 endif
466 endif
467
468 if USE_HA
469   SUBDIRS += plugins/ha
470 if MONOLITHIC
471   libcharon_la_LIBADD += plugins/ha/libstrongswan-ha.la
472 endif
473 endif
474
475 if USE_WHITELIST
476   SUBDIRS += plugins/whitelist
477 if MONOLITHIC
478   libcharon_la_LIBADD += plugins/whitelist/libstrongswan-whitelist.la
479 endif
480 endif
481
482 if USE_CERTEXPIRE
483   SUBDIRS += plugins/certexpire
484 if MONOLITHIC
485   libcharon_la_LIBADD += plugins/certexpire/libstrongswan-certexpire.la
486 endif
487 endif
488
489 if USE_LED
490   SUBDIRS += plugins/led
491 if MONOLITHIC
492   libcharon_la_LIBADD += plugins/led/libstrongswan-led.la
493 endif
494 endif
495
496 if USE_DUPLICHECK
497   SUBDIRS += plugins/duplicheck
498 if MONOLITHIC
499   libcharon_la_LIBADD += plugins/duplicheck/libstrongswan-duplicheck.la
500 endif
501 endif
502
503 if USE_COUPLING
504   SUBDIRS += plugins/coupling
505 if MONOLITHIC
506   libcharon_la_LIBADD += plugins/coupling/libstrongswan-coupling.la
507 endif
508 endif
509
510 if USE_RADATTR
511   SUBDIRS += plugins/radattr
512 if MONOLITHIC
513   libcharon_la_LIBADD += plugins/radattr/libstrongswan-radattr.la
514 endif
515 endif
516
517 if USE_UCI
518   SUBDIRS += plugins/uci
519 if MONOLITHIC
520   libcharon_la_LIBADD += plugins/uci/libstrongswan-uci.la
521 endif
522 endif
523
524 if USE_ADDRBLOCK
525   SUBDIRS += plugins/addrblock
526 if MONOLITHIC
527   libcharon_la_LIBADD += plugins/uci/libstrongswan-addrblock.la
528 endif
529 endif
530
531 if USE_UNIT_TESTS
532   SUBDIRS += plugins/unit_tester
533 if MONOLITHIC
534   libcharon_la_LIBADD += plugins/unit_tester/libstrongswan-unit-tester.la
535 endif
536 endif
537
538 if USE_XAUTH_GENERIC
539   SUBDIRS += plugins/xauth_generic
540 if MONOLITHIC
541   libcharon_la_LIBADD += plugins/xauth_generic/libstrongswan-xauth-generic.la
542 endif
543 endif
544
545 if USE_XAUTH_EAP
546   SUBDIRS += plugins/xauth_eap
547 if MONOLITHIC
548   libcharon_la_LIBADD += plugins/xauth_eap/libstrongswan-xauth-eap.la
549 endif
550 endif