df056ad9ffe41f2a7e93dc888803019e7cf3ed4f
[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 config/auth_cfg.c config/auth_cfg.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 kernel/kernel_interface.c kernel/kernel_interface.h \
43 kernel/kernel_ipsec.c kernel/kernel_ipsec.h \
44 kernel/kernel_net.h \
45 network/packet.c network/packet.h \
46 network/receiver.c network/receiver.h \
47 network/sender.c network/sender.h \
48 network/socket_manager.c network/socket_manager.h network/socket.h \
49 processing/jobs/job.h \
50 processing/jobs/acquire_job.c processing/jobs/acquire_job.h \
51 processing/jobs/callback_job.c processing/jobs/callback_job.h \
52 processing/jobs/delete_child_sa_job.c processing/jobs/delete_child_sa_job.h \
53 processing/jobs/delete_ike_sa_job.c processing/jobs/delete_ike_sa_job.h \
54 processing/jobs/migrate_job.c processing/jobs/migrate_job.h \
55 processing/jobs/process_message_job.c processing/jobs/process_message_job.h \
56 processing/jobs/rekey_child_sa_job.c processing/jobs/rekey_child_sa_job.h \
57 processing/jobs/rekey_ike_sa_job.c processing/jobs/rekey_ike_sa_job.h \
58 processing/jobs/retransmit_job.c processing/jobs/retransmit_job.h \
59 processing/jobs/send_dpd_job.c processing/jobs/send_dpd_job.h \
60 processing/jobs/send_keepalive_job.c processing/jobs/send_keepalive_job.h \
61 processing/jobs/roam_job.c processing/jobs/roam_job.h \
62 processing/jobs/update_sa_job.c processing/jobs/update_sa_job.h \
63 processing/jobs/inactivity_job.c processing/jobs/inactivity_job.h \
64 processing/scheduler.c processing/scheduler.h \
65 processing/processor.c processing/processor.h  \
66 sa/authenticators/authenticator.c sa/authenticators/authenticator.h \
67 sa/authenticators/eap_authenticator.c sa/authenticators/eap_authenticator.h \
68 sa/authenticators/eap/eap_method.c sa/authenticators/eap/eap_method.h \
69 sa/authenticators/eap/eap_manager.c sa/authenticators/eap/eap_manager.h \
70 sa/authenticators/eap/sim_manager.c sa/authenticators/eap/sim_manager.h \
71 sa/authenticators/psk_authenticator.c sa/authenticators/psk_authenticator.h \
72 sa/authenticators/pubkey_authenticator.c sa/authenticators/pubkey_authenticator.h \
73 sa/child_sa.c sa/child_sa.h \
74 sa/ike_sa.c sa/ike_sa.h \
75 sa/ike_sa_id.c sa/ike_sa_id.h \
76 sa/ike_sa_manager.c sa/ike_sa_manager.h \
77 sa/task_manager.c sa/task_manager.h \
78 sa/keymat.c sa/keymat.h \
79 sa/trap_manager.c sa/trap_manager.h \
80 sa/tasks/child_create.c sa/tasks/child_create.h \
81 sa/tasks/child_delete.c sa/tasks/child_delete.h \
82 sa/tasks/child_rekey.c sa/tasks/child_rekey.h \
83 sa/tasks/ike_auth.c sa/tasks/ike_auth.h \
84 sa/tasks/ike_cert_pre.c sa/tasks/ike_cert_pre.h \
85 sa/tasks/ike_cert_post.c sa/tasks/ike_cert_post.h \
86 sa/tasks/ike_config.c sa/tasks/ike_config.h \
87 sa/tasks/ike_delete.c sa/tasks/ike_delete.h \
88 sa/tasks/ike_dpd.c sa/tasks/ike_dpd.h \
89 sa/tasks/ike_init.c sa/tasks/ike_init.h \
90 sa/tasks/ike_natd.c sa/tasks/ike_natd.h \
91 sa/tasks/ike_mobike.c sa/tasks/ike_mobike.h \
92 sa/tasks/ike_rekey.c sa/tasks/ike_rekey.h \
93 sa/tasks/ike_reauth.c sa/tasks/ike_reauth.h \
94 sa/tasks/ike_auth_lifetime.c sa/tasks/ike_auth_lifetime.h \
95 sa/tasks/ike_vendor.c sa/tasks/ike_vendor.h \
96 sa/tasks/task.c sa/tasks/task.h \
97 credentials/credential_manager.c credentials/credential_manager.h \
98 credentials/sets/auth_cfg_wrapper.c credentials/sets/auth_cfg_wrapper.h \
99 credentials/sets/ocsp_response_wrapper.c credentials/sets/ocsp_response_wrapper.h \
100 credentials/sets/cert_cache.c credentials/sets/cert_cache.h \
101 credentials/credential_set.h
102
103 INCLUDES = \
104         -I${linux_headers} \
105         -I$(top_srcdir)/src/libstrongswan \
106         -I$(top_srcdir)/src/libhydra \
107         -I$(top_srcdir)/src/libcharon
108
109 AM_CFLAGS = \
110         -DIPSEC_DIR=\"${ipsecdir}\" \
111         -DIPSEC_PIDDIR=\"${piddir}\"
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_CAPABILITIES
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 PLUGINS = ${libstrongswan_plugins} ${libhydra_plugins}
143
144 if USE_LOAD_TESTER
145   SUBDIRS += plugins/load_tester
146   PLUGINS += load-tester
147 if MONOLITHIC
148   libcharon_la_LIBADD += plugins/load_tester/libstrongswan-load-tester.la
149 endif
150 endif
151
152 if USE_KERNEL_PFKEY
153   SUBDIRS += plugins/kernel_pfkey
154   PLUGINS += kernel-pfkey
155 if MONOLITHIC
156   libcharon_la_LIBADD += plugins/kernel_pfkey/libstrongswan-kernel-pfkey.la
157 endif
158 endif
159
160 if USE_KERNEL_PFROUTE
161   SUBDIRS += plugins/kernel_pfroute
162   PLUGINS += kernel-pfroute
163 if MONOLITHIC
164   libcharon_la_LIBADD += plugins/kernel_pfroute/libstrongswan-kernel-pfroute.la
165 endif
166 endif
167
168 if USE_KERNEL_KLIPS
169   SUBDIRS += plugins/kernel_klips
170   PLUGINS += kernel-klips
171 if MONOLITHIC
172   libcharon_la_LIBADD += plugins/kernel_klips/libstrongswan-kernel-klips.la
173 endif
174 endif
175
176 if USE_KERNEL_NETLINK
177   SUBDIRS += plugins/kernel_netlink
178   PLUGINS += kernel-netlink
179 if MONOLITHIC
180   libcharon_la_LIBADD += plugins/kernel_netlink/libstrongswan-kernel-netlink.la
181 endif
182 endif
183
184 if USE_SOCKET_DEFAULT
185   SUBDIRS += plugins/socket_default
186   PLUGINS += socket-default
187 if MONOLITHIC
188   libcharon_la_LIBADD += plugins/socket_default/libstrongswan-socket-default.la
189 endif
190 endif
191
192 if USE_SOCKET_RAW
193   SUBDIRS += plugins/socket_raw
194   PLUGINS += socket-raw
195 if MONOLITHIC
196   libcharon_la_LIBADD += plugins/socket_raw/libstrongswan-socket-raw.la
197 endif
198 endif
199
200 if USE_SOCKET_DYNAMIC
201   SUBDIRS += plugins/socket_dynamic
202   PLUGINS += socket-dynamic
203 if MONOLITHIC
204   libcharon_la_LIBADD += plugins/socket_dynamic/libstrongswan-socket-dynamic.la
205 endif
206 endif
207
208 if USE_FARP
209   SUBDIRS += plugins/farp
210   PLUGINS += farp
211 if MONOLITHIC
212   libcharon_la_LIBADD += plugins/farp/libstrongswan-farp.la
213 endif
214 endif
215
216 if USE_STROKE
217   SUBDIRS += plugins/stroke
218   PLUGINS += stroke
219 if MONOLITHIC
220   libcharon_la_LIBADD += plugins/stroke/libstrongswan-stroke.la
221 endif
222 endif
223
224 if USE_SMP
225   SUBDIRS += plugins/smp
226   PLUGINS += smp
227 if MONOLITHIC
228   libcharon_la_LIBADD += plugins/smp/libstrongswan-smp.la
229 endif
230 endif
231
232 if USE_SQL
233   SUBDIRS += plugins/sql
234   PLUGINS += sql
235 if MONOLITHIC
236   libcharon_la_LIBADD += plugins/sql/libstrongswan-sql.la
237 endif
238 endif
239
240 if USE_UPDOWN
241   SUBDIRS += plugins/updown
242   PLUGINS += updown
243 if MONOLITHIC
244   libcharon_la_LIBADD += plugins/updown/libstrongswan-updown.la
245 endif
246 endif
247
248 if USE_EAP_IDENTITY
249   SUBDIRS += plugins/eap_identity
250   PLUGINS += eap-identity
251 if MONOLITHIC
252   libcharon_la_LIBADD += plugins/eap_identity/libstrongswan-eap-identity.la
253 endif
254 endif
255
256 if USE_EAP_SIM
257   SUBDIRS += plugins/eap_sim
258   PLUGINS += eap-sim
259 if MONOLITHIC
260   libcharon_la_LIBADD += plugins/eap_sim/libstrongswan-eap-sim.la
261 endif
262 endif
263
264 if USE_EAP_SIM_FILE
265   SUBDIRS += plugins/eap_sim_file
266   PLUGINS += eap-sim-file
267 if MONOLITHIC
268   libcharon_la_LIBADD += plugins/eap_sim_file/libstrongswan-eap-sim-file.la
269 endif
270 endif
271
272 if USE_EAP_SIMAKA_PSEUDONYM
273   SUBDIRS += plugins/eap_simaka_pseudonym
274   PLUGINS += eap-simaka-pseudonym
275 if MONOLITHIC
276   libcharon_la_LIBADD += plugins/eap_simaka_pseudonym/libstrongswan-eap-simaka-pseudonym.la
277 endif
278 endif
279
280 if USE_EAP_SIMAKA_REAUTH
281   SUBDIRS += plugins/eap_simaka_reauth
282   PLUGINS += eap-simaka-reauth
283 if MONOLITHIC
284   libcharon_la_LIBADD += plugins/eap_simaka_reauth/libstrongswan-eap-simaka-reauth.la
285 endif
286 endif
287
288 if USE_EAP_AKA
289   SUBDIRS += plugins/eap_aka
290   PLUGINS += eap-aka
291 if MONOLITHIC
292   libcharon_la_LIBADD += plugins/eap_aka/libstrongswan-eap-aka.la
293 endif
294 endif
295
296 if USE_EAP_AKA_3GPP2
297   SUBDIRS += plugins/eap_aka_3gpp2
298   PLUGINS += eap-aka-3gpp2
299 if MONOLITHIC
300   libcharon_la_LIBADD += plugins/eap_aka_3gpp2/libstrongswan-eap-aka-3gpp2.la
301 endif
302 endif
303
304 if USE_SIMAKA
305 if MONOLITHIC
306   # otherwise this library is linked to both the eap_aka and the eap_sim plugin
307   libcharon_la_LIBADD += $(top_builddir)/src/libsimaka/libsimaka.la
308 endif
309 endif
310
311 if USE_EAP_MD5
312   SUBDIRS += plugins/eap_md5
313   PLUGINS += eap-md5
314 if MONOLITHIC
315   libcharon_la_LIBADD += plugins/eap_md5/libstrongswan-eap-md5.la
316 endif
317 endif
318
319 if USE_EAP_GTC
320   SUBDIRS += plugins/eap_gtc
321   PLUGINS += eap-gtc
322 if MONOLITHIC
323   libcharon_la_LIBADD += plugins/eap_gtc/libstrongswan-eap-gtc.la
324 endif
325 endif
326
327 if USE_EAP_MSCHAPV2
328   SUBDIRS += plugins/eap_mschapv2
329   PLUGINS += eap-mschapv2
330 if MONOLITHIC
331   libcharon_la_LIBADD += plugins/eap_mschapv2/libstrongswan-eap-mschapv2.la
332 endif
333 endif
334
335 if USE_EAP_RADIUS
336   SUBDIRS += plugins/eap_radius
337   PLUGINS += eap-radius
338 if MONOLITHIC
339   libcharon_la_LIBADD += plugins/eap_radius/libstrongswan-eap-radius.la
340 endif
341 endif
342
343 if USE_MEDSRV
344   SUBDIRS += plugins/medsrv
345   PLUGINS += medsrv
346 if MONOLITHIC
347   libcharon_la_LIBADD += plugins/medsrv/libstrongswan-medsrv.la
348 endif
349 endif
350
351 if USE_MEDCLI
352   SUBDIRS += plugins/medcli
353   PLUGINS += medcli
354 if MONOLITHIC
355   libcharon_la_LIBADD += plugins/medcli/libstrongswan-medcli.la
356 endif
357 endif
358
359 if USE_NM
360   SUBDIRS += plugins/nm
361   PLUGINS += nm
362 if MONOLITHIC
363   libcharon_la_LIBADD += plugins/nm/libstrongswan-nm.la
364 endif
365 endif
366
367 if USE_DHCP
368   SUBDIRS += plugins/dhcp
369   PLUGINS += dhcp
370 if MONOLITHIC
371   libcharon_la_LIBADD += plugins/dhcp/libstrongswan-dhcp.la
372 endif
373 endif
374
375 if USE_RESOLVE
376   SUBDIRS += plugins/resolve
377   PLUGINS += resolve
378 if MONOLITHIC
379   libcharon_la_LIBADD += plugins/resolve/libstrongswan-resolve.la
380 endif
381 endif
382
383 if USE_ANDROID
384   SUBDIRS += plugins/android
385   PLUGINS += android
386 if MONOLITHIC
387   libcharon_la_LIBADD += plugins/android/libstrongswan-android.la
388 endif
389 endif
390
391 if USE_HA
392   SUBDIRS += plugins/ha
393   PLUGINS += ha
394 if MONOLITHIC
395   libcharon_la_LIBADD += plugins/ha/libstrongswan-ha.la
396 endif
397 endif
398
399 if USE_UCI
400   SUBDIRS += plugins/uci
401   PLUGINS += uci
402 if MONOLITHIC
403   libcharon_la_LIBADD += plugins/uci/libstrongswan-uci.la
404 endif
405 endif
406
407 if USE_UNIT_TESTS
408   SUBDIRS += plugins/unit_tester
409   PLUGINS += unit-tester
410 if MONOLITHIC
411   libcharon_la_LIBADD += plugins/unit_tester/libstrongswan-unit-tester.la
412 endif
413 endif
414
415 AM_CFLAGS += -DPLUGINS=\""${PLUGINS}\""
416