Moving charon to libcharon.
[strongswan.git] / src / libcharon / Android.mk
1 LOCAL_PATH := $(call my-dir)
2 include $(CLEAR_VARS)
3
4 # copy-n-paste from Makefile.am
5 LOCAL_SRC_FILES := \
6 bus/bus.c bus/bus.h \
7 bus/listeners/listener.h \
8 bus/listeners/file_logger.c bus/listeners/file_logger.h \
9 bus/listeners/sys_logger.c bus/listeners/sys_logger.h \
10 config/backend_manager.c config/backend_manager.h config/backend.h \
11 config/child_cfg.c config/child_cfg.h \
12 config/ike_cfg.c config/ike_cfg.h \
13 config/peer_cfg.c config/peer_cfg.h \
14 config/proposal.c config/proposal.h \
15 config/auth_cfg.c config/auth_cfg.h \
16 control/controller.c control/controller.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 kernel/kernel_ipsec.c kernel/kernel_ipsec.h \
46 kernel/kernel_net.h \
47 network/packet.c network/packet.h \
48 network/receiver.c network/receiver.h \
49 network/sender.c network/sender.h \
50 network/socket_manager.c network/socket_manager.h network/socket.h \
51 processing/jobs/job.h \
52 processing/jobs/acquire_job.c processing/jobs/acquire_job.h \
53 processing/jobs/callback_job.c processing/jobs/callback_job.h \
54 processing/jobs/delete_child_sa_job.c processing/jobs/delete_child_sa_job.h \
55 processing/jobs/delete_ike_sa_job.c processing/jobs/delete_ike_sa_job.h \
56 processing/jobs/migrate_job.c processing/jobs/migrate_job.h \
57 processing/jobs/process_message_job.c processing/jobs/process_message_job.h \
58 processing/jobs/rekey_child_sa_job.c processing/jobs/rekey_child_sa_job.h \
59 processing/jobs/rekey_ike_sa_job.c processing/jobs/rekey_ike_sa_job.h \
60 processing/jobs/retransmit_job.c processing/jobs/retransmit_job.h \
61 processing/jobs/send_dpd_job.c processing/jobs/send_dpd_job.h \
62 processing/jobs/send_keepalive_job.c processing/jobs/send_keepalive_job.h \
63 processing/jobs/roam_job.c processing/jobs/roam_job.h \
64 processing/jobs/update_sa_job.c processing/jobs/update_sa_job.h \
65 processing/jobs/inactivity_job.c processing/jobs/inactivity_job.h \
66 processing/scheduler.c processing/scheduler.h \
67 processing/processor.c processing/processor.h \
68 sa/authenticators/authenticator.c sa/authenticators/authenticator.h \
69 sa/authenticators/eap_authenticator.c sa/authenticators/eap_authenticator.h \
70 sa/authenticators/eap/eap_method.c sa/authenticators/eap/eap_method.h \
71 sa/authenticators/eap/eap_manager.c sa/authenticators/eap/eap_manager.h \
72 sa/authenticators/eap/sim_manager.c sa/authenticators/eap/sim_manager.h \
73 sa/authenticators/psk_authenticator.c sa/authenticators/psk_authenticator.h \
74 sa/authenticators/pubkey_authenticator.c sa/authenticators/pubkey_authenticator.h \
75 sa/child_sa.c sa/child_sa.h \
76 sa/ike_sa.c sa/ike_sa.h \
77 sa/ike_sa_id.c sa/ike_sa_id.h \
78 sa/ike_sa_manager.c sa/ike_sa_manager.h \
79 sa/task_manager.c sa/task_manager.h \
80 sa/keymat.c sa/keymat.h \
81 sa/trap_manager.c sa/trap_manager.h \
82 sa/tasks/child_create.c sa/tasks/child_create.h \
83 sa/tasks/child_delete.c sa/tasks/child_delete.h \
84 sa/tasks/child_rekey.c sa/tasks/child_rekey.h \
85 sa/tasks/ike_auth.c sa/tasks/ike_auth.h \
86 sa/tasks/ike_cert_pre.c sa/tasks/ike_cert_pre.h \
87 sa/tasks/ike_cert_post.c sa/tasks/ike_cert_post.h \
88 sa/tasks/ike_config.c sa/tasks/ike_config.h \
89 sa/tasks/ike_delete.c sa/tasks/ike_delete.h \
90 sa/tasks/ike_dpd.c sa/tasks/ike_dpd.h \
91 sa/tasks/ike_init.c sa/tasks/ike_init.h \
92 sa/tasks/ike_natd.c sa/tasks/ike_natd.h \
93 sa/tasks/ike_mobike.c sa/tasks/ike_mobike.h \
94 sa/tasks/ike_rekey.c sa/tasks/ike_rekey.h \
95 sa/tasks/ike_reauth.c sa/tasks/ike_reauth.h \
96 sa/tasks/ike_auth_lifetime.c sa/tasks/ike_auth_lifetime.h \
97 sa/tasks/ike_vendor.c sa/tasks/ike_vendor.h \
98 sa/tasks/task.c sa/tasks/task.h \
99 credentials/credential_manager.c credentials/credential_manager.h \
100 credentials/sets/auth_cfg_wrapper.c credentials/sets/auth_cfg_wrapper.h \
101 credentials/sets/ocsp_response_wrapper.c credentials/sets/ocsp_response_wrapper.h \
102 credentials/sets/cert_cache.c credentials/sets/cert_cache.h \
103 credentials/credential_set.h
104
105 # adding the plugin source files (copy-n-paste from Makefile.am)
106
107 LOCAL_SRC_FILES += $(call add_plugin, android, \
108 android_plugin.c android_plugin.h \
109 android_handler.c android_handler.h \
110 )
111 ifneq ($(call plugin_enabled, android)),)
112 LOCAL_SHARED_LIBRARIES += libcutils
113 endif
114
115 LOCAL_SRC_FILES += $(call add_plugin, attr, \
116 attr_plugin.h attr_plugin.c \
117 attr_provider.h attr_provider.c \
118 )
119
120 LOCAL_SRC_FILES += $(call add_plugin, eap-aka, \
121 eap_aka_plugin.h eap_aka_plugin.c \
122 eap_aka_peer.h eap_aka_peer.c \
123 eap_aka_server.h eap_aka_server.c \
124 )
125
126 LOCAL_SRC_FILES += $(call add_plugin, eap-aka-3gpp2, \
127 eap_aka_3gpp2_plugin.h eap_aka_3gpp2_plugin.c \
128 eap_aka_3gpp2_card.h eap_aka_3gpp2_card.c \
129 eap_aka_3gpp2_provider.h eap_aka_3gpp2_provider.c \
130 eap_aka_3gpp2_functions.h eap_aka_3gpp2_functions.c \
131 )
132 ifneq ($(call plugin_enabled, eap-aka-3gpp2)),)
133 LOCAL_C_INCLUDES += $(libgmp_PATH)
134 LOCAL_STATIC_LIBRARIES += libgmp
135 endif
136
137 LOCAL_SRC_FILES += $(call add_plugin, eap-gtc, \
138 eap_gtc_plugin.h eap_gtc_plugin.c eap_gtc.h eap_gtc.c \
139 )
140
141 LOCAL_SRC_FILES += $(call add_plugin, eap-identity, \
142 eap_identity_plugin.h eap_identity_plugin.c eap_identity.h eap_identity.c \
143 )
144
145 LOCAL_SRC_FILES += $(call add_plugin, eap-md5, \
146 eap_md5_plugin.h eap_md5_plugin.c eap_md5.h eap_md5.c \
147 )
148
149 LOCAL_SRC_FILES += $(call add_plugin, eap-mschapv2, \
150 eap_mschapv2_plugin.h eap_mschapv2_plugin.c \
151 eap_mschapv2.h eap_mschapv2.c \
152 )
153
154 LOCAL_SRC_FILES += $(call add_plugin, eap-sim, \
155 eap_sim_plugin.h eap_sim_plugin.c \
156 eap_sim_peer.h eap_sim_peer.c \
157 eap_sim_server.h eap_sim_server.c \
158 )
159
160 LOCAL_SRC_FILES += $(call add_plugin, eap-simaka-pseudonym, \
161 eap_simaka_pseudonym_plugin.h eap_simaka_pseudonym_plugin.c \
162 eap_simaka_pseudonym_card.h eap_simaka_pseudonym_card.c \
163 eap_simaka_pseudonym_provider.h eap_simaka_pseudonym_provider.c \
164 )
165
166 LOCAL_SRC_FILES += $(call add_plugin, eap-simaka-reauth, \
167 eap_simaka_reauth_plugin.h eap_simaka_reauth_plugin.c \
168 eap_simaka_reauth_card.h eap_simaka_reauth_card.c \
169 eap_simaka_reauth_provider.h eap_simaka_reauth_provider.c \
170 )
171
172 LOCAL_SRC_FILES += $(call add_plugin, eap-sim-file, \
173 eap_sim_file_plugin.h eap_sim_file_plugin.c \
174 eap_sim_file_card.h eap_sim_file_card.c \
175 eap_sim_file_provider.h eap_sim_file_provider.c \
176 eap_sim_file_triplets.h eap_sim_file_triplets.c \
177 )
178
179 # adding libakasim if either eap-aka or eap-sim is enabled
180 ifneq ($(or $(call plugin_enabled, eap-aka), $(call plugin_enabled, eap-sim)),)
181 LOCAL_C_INCLUDES += $(LOCAL_PATH)/../libsimaka/
182 LOCAL_SRC_FILES += $(addprefix ../libsimaka/, \
183 simaka_message.h simaka_message.c \
184 simaka_crypto.h simaka_crypto.c \
185 )
186 endif
187
188 LOCAL_SRC_FILES += $(call add_plugin, kernel-netlink, \
189 kernel_netlink_plugin.h kernel_netlink_plugin.c \
190 kernel_netlink_ipsec.h kernel_netlink_ipsec.c kernel_netlink_net.h kernel_netlink_net.c \
191 kernel_netlink_shared.h kernel_netlink_shared.c \
192 )
193
194 LOCAL_SRC_FILES += $(call add_plugin, load-tester, \
195 load_tester_plugin.c load_tester_plugin.h \
196 load_tester_config.c load_tester_config.h \
197 load_tester_creds.c load_tester_creds.h \
198 load_tester_ipsec.c load_tester_ipsec.h \
199 load_tester_listener.c load_tester_listener.h \
200 load_tester_diffie_hellman.c load_tester_diffie_hellman.h \
201 )
202
203 LOCAL_SRC_FILES += $(call add_plugin, socket-default, \
204 socket_default_socket.h socket_default_socket.c \
205 socket_default_plugin.h socket_default_plugin.c \
206 )
207
208 LOCAL_SRC_FILES += $(call add_plugin, socket-dynamic, \
209 socket_dynamic_plugin.h socket_dynamic_plugin.c \
210 socket_dynamic_socket.h socket_dynamic_socket.c \
211 )
212
213 # build charon -----------------------------------------------------------------
214
215 LOCAL_C_INCLUDES += \
216 $(libvstr_PATH) \
217 $(strongswan_PATH)/src/include \
218 $(strongswan_PATH)/src/libstrongswan
219
220 LOCAL_CFLAGS := $(strongswan_CFLAGS)
221
222 # this is required to be able load the plugins
223 LOCAL_LDFLAGS := -Wl,--export-dynamic
224
225 LOCAL_MODULE := charon
226
227 LOCAL_ARM_MODE := arm
228
229 LOCAL_PRELINK_MODULE := false
230
231 LOCAL_SHARED_LIBRARIES += libstrongswan
232
233 include $(BUILD_EXECUTABLE)
234