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