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