ab8a42b3d86a53218685aaf287608af25b2cc5d7
[strongswan.git] / src / charon / Makefile.am
1 ipsec_PROGRAMS = charon
2
3 charon_SOURCES = \
4 bus/bus.c bus/bus.h \
5 bus/listeners/file_logger.c bus/listeners/file_logger.h \
6 bus/listeners/sys_logger.c bus/listeners/sys_logger.h \
7 config/backends/backend.h config/backends/writeable_backend.h \
8 config/backend_manager.c config/backend_manager.h \
9 config/child_cfg.c config/child_cfg.h \
10 config/credentials/local_credential_store.c config/credentials/local_credential_store.h \
11 config/ike_cfg.c config/ike_cfg.h \
12 config/peer_cfg.c config/peer_cfg.h \
13 config/proposal.c config/proposal.h \
14 config/traffic_selector.c config/traffic_selector.h \
15 control/interfaces/interface.h \
16 control/interface_manager.c control/interface_manager.h \
17 daemon.c daemon.h \
18 encoding/generator.c encoding/generator.h \
19 encoding/message.c encoding/message.h \
20 encoding/parser.c encoding/parser.h \
21 encoding/payloads/auth_payload.c encoding/payloads/auth_payload.h \
22 encoding/payloads/cert_payload.c encoding/payloads/cert_payload.h \
23 encoding/payloads/certreq_payload.c encoding/payloads/certreq_payload.h \
24 encoding/payloads/configuration_attribute.c encoding/payloads/configuration_attribute.h \
25 encoding/payloads/cp_payload.c encoding/payloads/cp_payload.h \
26 encoding/payloads/delete_payload.c encoding/payloads/delete_payload.h \
27 encoding/payloads/eap_payload.c encoding/payloads/eap_payload.h \
28 encoding/payloads/encodings.c encoding/payloads/encodings.h \
29 encoding/payloads/encryption_payload.c encoding/payloads/encryption_payload.h \
30 encoding/payloads/id_payload.c encoding/payloads/id_payload.h \
31 encoding/payloads/ike_header.c encoding/payloads/ike_header.h \
32 encoding/payloads/ke_payload.c  encoding/payloads/ke_payload.h \
33 encoding/payloads/nonce_payload.c encoding/payloads/nonce_payload.h \
34 encoding/payloads/notify_payload.c encoding/payloads/notify_payload.h \
35 encoding/payloads/payload.c encoding/payloads/payload.h \
36 encoding/payloads/proposal_substructure.c encoding/payloads/proposal_substructure.h \
37 encoding/payloads/sa_payload.c encoding/payloads/sa_payload.h \
38 encoding/payloads/traffic_selector_substructure.c encoding/payloads/traffic_selector_substructure.h \
39 encoding/payloads/transform_attribute.c encoding/payloads/transform_attribute.h \
40 encoding/payloads/transform_substructure.c encoding/payloads/transform_substructure.h \
41 encoding/payloads/ts_payload.c encoding/payloads/ts_payload.h \
42 encoding/payloads/unknown_payload.c encoding/payloads/unknown_payload.h \
43 encoding/payloads/vendor_id_payload.c encoding/payloads/vendor_id_payload.h \
44 kernel/kernel_interface.c kernel/kernel_interface.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.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/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/scheduler.c processing/scheduler.h \
62 processing/processor.c processing/processor.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/psk_authenticator.c sa/authenticators/psk_authenticator.h \
67 sa/authenticators/rsa_authenticator.c sa/authenticators/rsa_authenticator.h \
68 sa/child_sa.c sa/child_sa.h \
69 sa/ike_sa.c sa/ike_sa.h \
70 sa/ike_sa_id.c sa/ike_sa_id.h \
71 sa/ike_sa_manager.c sa/ike_sa_manager.h \
72 sa/task_manager.c sa/task_manager.h \
73 sa/tasks/child_create.c sa/tasks/child_create.h \
74 sa/tasks/child_delete.c sa/tasks/child_delete.h \
75 sa/tasks/child_rekey.c sa/tasks/child_rekey.h \
76 sa/tasks/ike_auth.c sa/tasks/ike_auth.h \
77 sa/tasks/ike_cert.c sa/tasks/ike_cert.h \
78 sa/tasks/ike_config.c sa/tasks/ike_config.h \
79 sa/tasks/ike_delete.c sa/tasks/ike_delete.h \
80 sa/tasks/ike_dpd.c sa/tasks/ike_dpd.h \
81 sa/tasks/ike_init.c sa/tasks/ike_init.h \
82 sa/tasks/ike_natd.c sa/tasks/ike_natd.h \
83 sa/tasks/ike_mobike.c sa/tasks/ike_mobike.h \
84 sa/tasks/ike_rekey.c sa/tasks/ike_rekey.h \
85 sa/tasks/ike_reauth.c sa/tasks/ike_reauth.h \
86 sa/tasks/ike_auth_lifetime.c sa/tasks/ike_auth_lifetime.h \
87 sa/tasks/task.c sa/tasks/task.h
88
89 # Use RAW socket if pluto gets built
90 if USE_PLUTO
91   charon_SOURCES += network/socket-raw.c
92 else
93   charon_SOURCES += network/socket.c
94 endif
95
96 if USE_P2P
97   charon_SOURCES += encoding/payloads/endpoint_notify.c encoding/payloads/endpoint_notify.h \
98     processing/jobs/initiate_mediation_job.c processing/jobs/initiate_mediation_job.h \
99     processing/jobs/mediation_job.c processing/jobs/mediation_job.h \
100     sa/connect_manager.c sa/connect_manager.h \
101     sa/mediation_manager.c sa/mediation_manager.h \
102     sa/tasks/ike_p2p.c sa/tasks/ike_p2p.h
103 endif
104
105 INCLUDES = -I${linuxdir} -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/charon -I$(top_srcdir)/src/stroke
106 AM_CFLAGS = -rdynamic -DIPSEC_CONFDIR=\"${confdir}\" -DIPSEC_DIR=\"${ipsecdir}\" -DIPSEC_PIDDIR=\"${piddir}\" \
107         -DIPSEC_EAPDIR=\"${eapdir}\" -DIPSEC_BACKENDDIR=\"${backenddir}\" -DIPSEC_INTERFACEDIR=\"${interfacedir}\"
108 charon_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la -lgmp -lpthread -lm -ldl
109
110 if USE_LIBCURL
111   charon_LDADD += -lcurl
112 endif
113
114
115 # build EAP plugins
116 ###################
117 eap_LTLIBRARIES =
118
119 if USE_EAP_IDENTITY
120   eap_LTLIBRARIES += libcharon-eapidentity.la
121   libcharon_eapidentity_la_SOURCES = sa/authenticators/eap/eap_identity.h sa/authenticators/eap/eap_identity.c
122   libcharon_eapidentity_la_LDFLAGS = -module
123 endif
124
125 if USE_EAP_SIM
126   eap_LTLIBRARIES += libcharon-eapsim.la
127   libcharon_eapsim_la_SOURCES = sa/authenticators/eap/eap_sim.h sa/authenticators/eap/eap_sim.c
128   libcharon_eapsim_la_LDFLAGS = -module
129 endif
130
131 # build backends
132 ################
133 backend_LTLIBRARIES =
134
135 if USE_STROKE
136   backend_LTLIBRARIES += libcharon-local.la
137   libcharon_local_la_SOURCES = config/backends/local_backend.h config/backends/local_backend.c
138   libcharon_local_la_LDFLAGS = -module
139 endif
140
141 if USE_LIBSQLITE
142   backend_LTLIBRARIES += libcharon-sqlite.la
143   libcharon_sqlite_la_SOURCES = config/backends/sqlite_backend.h config/backends/sqlite_backend.c
144   libcharon_sqlite_la_LIBADD = -lsqlite3
145   libcharon_sqlite_la_LDFLAGS = -module
146 endif
147
148 # build control interfaces
149 ##########################
150 interface_LTLIBRARIES =
151
152 if USE_STROKE
153   interface_LTLIBRARIES += libcharon-stroke.la
154   libcharon_stroke_la_SOURCES = control/interfaces/stroke_interface.h control/interfaces/stroke_interface.c
155   libcharon_stroke_la_LDFLAGS = -module
156 endif
157
158 if USE_LIBDBUS
159   interface_LTLIBRARIES += libcharon-dbus.la
160   libcharon_dbus_la_SOURCES = control/interfaces/dbus_interface.h control/interfaces/dbus_interface.c
161   libcharon_dbus_la_LDFLAGS = -module
162   libcharon_dbus_la_LIBADD = ${dbus_LIBS}
163   INCLUDES += ${dbus_CFLAGS}
164 endif
165
166 if USE_LIBXML
167   interface_LTLIBRARIES += libcharon-xml.la
168   libcharon_xml_la_SOURCES = control/interfaces/xml_interface.h control/interfaces/xml_interface.c
169   libcharon_xml_la_LDFLAGS = -module
170   libcharon_xml_la_LIBADD = ${xml_LIBS}
171   INCLUDES += ${xml_CFLAGS}
172 endif
173