9fc67c7b30116291673c82399a4f6471a930c9f5
[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 sa/authenticators/authenticator.c sa/authenticators/authenticator.h \
64 sa/authenticators/eap_authenticator.c sa/authenticators/eap_authenticator.h \
65 sa/authenticators/eap/eap_method.c sa/authenticators/eap/eap_method.h \
66 sa/authenticators/eap/eap_manager.c sa/authenticators/eap/eap_manager.h \
67 sa/authenticators/eap/sim_manager.c sa/authenticators/eap/sim_manager.h \
68 sa/authenticators/psk_authenticator.c sa/authenticators/psk_authenticator.h \
69 sa/authenticators/pubkey_authenticator.c sa/authenticators/pubkey_authenticator.h \
70 sa/child_sa.c sa/child_sa.h \
71 sa/ike_sa.c sa/ike_sa.h \
72 sa/ike_sa_id.c sa/ike_sa_id.h \
73 sa/ike_sa_manager.c sa/ike_sa_manager.h \
74 sa/task_manager.c sa/task_manager.h \
75 sa/keymat.c sa/keymat.h \
76 sa/trap_manager.c sa/trap_manager.h \
77 sa/tasks/child_create.c sa/tasks/child_create.h \
78 sa/tasks/child_delete.c sa/tasks/child_delete.h \
79 sa/tasks/child_rekey.c sa/tasks/child_rekey.h \
80 sa/tasks/ike_auth.c sa/tasks/ike_auth.h \
81 sa/tasks/ike_cert_pre.c sa/tasks/ike_cert_pre.h \
82 sa/tasks/ike_cert_post.c sa/tasks/ike_cert_post.h \
83 sa/tasks/ike_config.c sa/tasks/ike_config.h \
84 sa/tasks/ike_delete.c sa/tasks/ike_delete.h \
85 sa/tasks/ike_dpd.c sa/tasks/ike_dpd.h \
86 sa/tasks/ike_init.c sa/tasks/ike_init.h \
87 sa/tasks/ike_natd.c sa/tasks/ike_natd.h \
88 sa/tasks/ike_mobike.c sa/tasks/ike_mobike.h \
89 sa/tasks/ike_rekey.c sa/tasks/ike_rekey.h \
90 sa/tasks/ike_reauth.c sa/tasks/ike_reauth.h \
91 sa/tasks/ike_auth_lifetime.c sa/tasks/ike_auth_lifetime.h \
92 sa/tasks/ike_vendor.c sa/tasks/ike_vendor.h \
93 sa/tasks/task.c sa/tasks/task.h
94
95 daemon.lo :             $(top_builddir)/config.status
96
97 INCLUDES = \
98         -I${linux_headers} \
99         -I$(top_srcdir)/src/libstrongswan \
100         -I$(top_srcdir)/src/libhydra \
101         -I$(top_srcdir)/src/libcharon
102
103 AM_CFLAGS = \
104         -DIPSEC_DIR=\"${ipsecdir}\" \
105         -DIPSEC_PIDDIR=\"${piddir}\" \
106         -DPLUGINS=\""${libcharon_plugins}\""
107
108 libcharon_la_LIBADD = -lm $(PTHREADLIB) $(DLLIB) $(SOCKLIB)
109
110 EXTRA_DIST = Android.mk
111
112 # compile options
113 #################
114
115 if USE_ME
116   libcharon_la_SOURCES += encoding/payloads/endpoint_notify.c encoding/payloads/endpoint_notify.h \
117     processing/jobs/initiate_mediation_job.c processing/jobs/initiate_mediation_job.h \
118     processing/jobs/mediation_job.c processing/jobs/mediation_job.h \
119     sa/connect_manager.c sa/connect_manager.h \
120     sa/mediation_manager.c sa/mediation_manager.h \
121     sa/tasks/ike_me.c sa/tasks/ike_me.h
122 endif
123
124 if USE_LIBCAP
125   libcharon_la_LIBADD += -lcap
126 endif
127
128 # build optional plugins
129 ########################
130
131 if MONOLITHIC
132 SUBDIRS =
133 else
134 SUBDIRS = .
135 endif
136
137 if USE_LOAD_TESTER
138   SUBDIRS += plugins/load_tester
139 if MONOLITHIC
140   libcharon_la_LIBADD += plugins/load_tester/libstrongswan-load-tester.la
141 endif
142 endif
143
144 if USE_KERNEL_PFKEY
145   SUBDIRS += plugins/kernel_pfkey
146 if MONOLITHIC
147   libcharon_la_LIBADD += plugins/kernel_pfkey/libstrongswan-kernel-pfkey.la
148 endif
149 endif
150
151 if USE_KERNEL_PFROUTE
152   SUBDIRS += plugins/kernel_pfroute
153 if MONOLITHIC
154   libcharon_la_LIBADD += plugins/kernel_pfroute/libstrongswan-kernel-pfroute.la
155 endif
156 endif
157
158 if USE_KERNEL_KLIPS
159   SUBDIRS += plugins/kernel_klips
160 if MONOLITHIC
161   libcharon_la_LIBADD += plugins/kernel_klips/libstrongswan-kernel-klips.la
162 endif
163 endif
164
165 if USE_KERNEL_NETLINK
166   SUBDIRS += plugins/kernel_netlink
167 if MONOLITHIC
168   libcharon_la_LIBADD += plugins/kernel_netlink/libstrongswan-kernel-netlink.la
169 endif
170 endif
171
172 if USE_SOCKET_DEFAULT
173   SUBDIRS += plugins/socket_default
174 if MONOLITHIC
175   libcharon_la_LIBADD += plugins/socket_default/libstrongswan-socket-default.la
176 endif
177 endif
178
179 if USE_SOCKET_RAW
180   SUBDIRS += plugins/socket_raw
181 if MONOLITHIC
182   libcharon_la_LIBADD += plugins/socket_raw/libstrongswan-socket-raw.la
183 endif
184 endif
185
186 if USE_SOCKET_DYNAMIC
187   SUBDIRS += plugins/socket_dynamic
188 if MONOLITHIC
189   libcharon_la_LIBADD += plugins/socket_dynamic/libstrongswan-socket-dynamic.la
190 endif
191 endif
192
193 if USE_FARP
194   SUBDIRS += plugins/farp
195 if MONOLITHIC
196   libcharon_la_LIBADD += plugins/farp/libstrongswan-farp.la
197 endif
198 endif
199
200 if USE_STROKE
201   SUBDIRS += plugins/stroke
202 if MONOLITHIC
203   libcharon_la_LIBADD += plugins/stroke/libstrongswan-stroke.la
204 endif
205 endif
206
207 if USE_SMP
208   SUBDIRS += plugins/smp
209 if MONOLITHIC
210   libcharon_la_LIBADD += plugins/smp/libstrongswan-smp.la
211 endif
212 endif
213
214 if USE_SQL
215   SUBDIRS += plugins/sql
216 if MONOLITHIC
217   libcharon_la_LIBADD += plugins/sql/libstrongswan-sql.la
218 endif
219 endif
220
221 if USE_UPDOWN
222   SUBDIRS += plugins/updown
223 if MONOLITHIC
224   libcharon_la_LIBADD += plugins/updown/libstrongswan-updown.la
225 endif
226 endif
227
228 if USE_EAP_IDENTITY
229   SUBDIRS += plugins/eap_identity
230 if MONOLITHIC
231   libcharon_la_LIBADD += plugins/eap_identity/libstrongswan-eap-identity.la
232 endif
233 endif
234
235 if USE_EAP_SIM
236   SUBDIRS += plugins/eap_sim
237 if MONOLITHIC
238   libcharon_la_LIBADD += plugins/eap_sim/libstrongswan-eap-sim.la
239 endif
240 endif
241
242 if USE_EAP_SIM_FILE
243   SUBDIRS += plugins/eap_sim_file
244 if MONOLITHIC
245   libcharon_la_LIBADD += plugins/eap_sim_file/libstrongswan-eap-sim-file.la
246 endif
247 endif
248
249 if USE_EAP_SIMAKA_SQL
250   SUBDIRS += plugins/eap_simaka_sql
251 if MONOLITHIC
252   libcharon_la_LIBADD += plugins/eap_simaka_sql/libstrongswan-eap-simaka-sql.la
253 endif
254 endif
255
256 if USE_EAP_SIMAKA_PSEUDONYM
257   SUBDIRS += plugins/eap_simaka_pseudonym
258 if MONOLITHIC
259   libcharon_la_LIBADD += plugins/eap_simaka_pseudonym/libstrongswan-eap-simaka-pseudonym.la
260 endif
261 endif
262
263 if USE_EAP_SIMAKA_REAUTH
264   SUBDIRS += plugins/eap_simaka_reauth
265 if MONOLITHIC
266   libcharon_la_LIBADD += plugins/eap_simaka_reauth/libstrongswan-eap-simaka-reauth.la
267 endif
268 endif
269
270 if USE_EAP_AKA
271   SUBDIRS += plugins/eap_aka
272 if MONOLITHIC
273   libcharon_la_LIBADD += plugins/eap_aka/libstrongswan-eap-aka.la
274 endif
275 endif
276
277 if USE_EAP_AKA_3GPP2
278   SUBDIRS += plugins/eap_aka_3gpp2
279 if MONOLITHIC
280   libcharon_la_LIBADD += plugins/eap_aka_3gpp2/libstrongswan-eap-aka-3gpp2.la
281 endif
282 endif
283
284 if USE_SIMAKA
285 if MONOLITHIC
286   # otherwise this library is linked to both the eap_aka and the eap_sim plugin
287   libcharon_la_LIBADD += $(top_builddir)/src/libsimaka/libsimaka.la
288 endif
289 endif
290
291 if USE_EAP_MD5
292   SUBDIRS += plugins/eap_md5
293 if MONOLITHIC
294   libcharon_la_LIBADD += plugins/eap_md5/libstrongswan-eap-md5.la
295 endif
296 endif
297
298 if USE_EAP_GTC
299   SUBDIRS += plugins/eap_gtc
300 if MONOLITHIC
301   libcharon_la_LIBADD += plugins/eap_gtc/libstrongswan-eap-gtc.la
302 endif
303 endif
304
305 if USE_EAP_MSCHAPV2
306   SUBDIRS += plugins/eap_mschapv2
307 if MONOLITHIC
308   libcharon_la_LIBADD += plugins/eap_mschapv2/libstrongswan-eap-mschapv2.la
309 endif
310 endif
311
312 if USE_EAP_RADIUS
313   SUBDIRS += plugins/eap_radius
314 if MONOLITHIC
315   libcharon_la_LIBADD += plugins/eap_radius/libstrongswan-eap-radius.la
316 endif
317 endif
318
319 if USE_EAP_TLS
320   SUBDIRS += plugins/eap_tls
321 if MONOLITHIC
322   libcharon_la_LIBADD += plugins/eap_tls/libstrongswan-eap-tls.la
323 endif
324 endif
325
326 if USE_EAP_TTLS
327   SUBDIRS += plugins/eap_ttls
328 if MONOLITHIC
329   libcharon_la_LIBADD += plugins/eap_ttls/libstrongswan-eap-ttls.la
330 endif
331 endif
332
333 if USE_EAP_TNC
334   SUBDIRS += plugins/eap_tnc
335 if MONOLITHIC
336   libcharon_la_LIBADD += plugins/eap_tnc/libstrongswan-eap-tnc.la
337 endif
338 endif
339
340 if USE_TLS
341 if MONOLITHIC
342   # otherwise this library is linked to eap_tls
343   libcharon_la_LIBADD += $(top_builddir)/src/libtls/libtls.la
344 endif
345 endif
346
347 if USE_MEDSRV
348   SUBDIRS += plugins/medsrv
349 if MONOLITHIC
350   libcharon_la_LIBADD += plugins/medsrv/libstrongswan-medsrv.la
351 endif
352 endif
353
354 if USE_MEDCLI
355   SUBDIRS += plugins/medcli
356 if MONOLITHIC
357   libcharon_la_LIBADD += plugins/medcli/libstrongswan-medcli.la
358 endif
359 endif
360
361 if USE_NM
362   SUBDIRS += plugins/nm
363 if MONOLITHIC
364   libcharon_la_LIBADD += plugins/nm/libstrongswan-nm.la
365 endif
366 endif
367
368 if USE_DHCP
369   SUBDIRS += plugins/dhcp
370 if MONOLITHIC
371   libcharon_la_LIBADD += plugins/dhcp/libstrongswan-dhcp.la
372 endif
373 endif
374
375 if USE_ANDROID
376   SUBDIRS += plugins/android
377 if MONOLITHIC
378   libcharon_la_LIBADD += plugins/android/libstrongswan-android.la
379 endif
380 endif
381
382 if USE_HA
383   SUBDIRS += plugins/ha
384 if MONOLITHIC
385   libcharon_la_LIBADD += plugins/ha/libstrongswan-ha.la
386 endif
387 endif
388
389 if USE_UCI
390   SUBDIRS += plugins/uci
391 if MONOLITHIC
392   libcharon_la_LIBADD += plugins/uci/libstrongswan-uci.la
393 endif
394 endif
395
396 if USE_ADDRBLOCK
397   SUBDIRS += plugins/addrblock
398 if MONOLITHIC
399   libcharon_la_LIBADD += plugins/uci/libstrongswan-addrblock.la
400 endif
401 endif
402
403 if USE_UNIT_TESTS
404   SUBDIRS += plugins/unit_tester
405 if MONOLITHIC
406   libcharon_la_LIBADD += plugins/unit_tester/libstrongswan-unit-tester.la
407 endif
408 endif
409