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