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