Android.mk of libstrongswan updated
[strongswan.git] / src / libstrongswan / 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 library.c library.h \
7 chunk.c chunk.h \
8 debug.c debug.h \
9 enum.c enum.h \
10 settings.h settings.c \
11 printf_hook.c printf_hook.h \
12 asn1/asn1.c asn1/asn1.h \
13 asn1/asn1_parser.c asn1/asn1_parser.h \
14 asn1/oid.c asn1/oid.h \
15 bio/bio_reader.h bio/bio_reader.c bio/bio_writer.h bio/bio_writer.c \
16 crypto/crypters/crypter.c crypto/crypters/crypter.h \
17 crypto/hashers/hasher.h crypto/hashers/hasher.c \
18 crypto/mac.h \
19 crypto/pkcs7.c crypto/pkcs7.h \
20 crypto/pkcs9.c crypto/pkcs9.h \
21 crypto/proposal/proposal_keywords.c crypto/proposal/proposal_keywords.h \
22 crypto/prfs/prf.c crypto/prfs/prf.h \
23 crypto/prfs/mac_prf.h crypto/prfs/mac_prf.c \
24 crypto/rngs/rng.c crypto/rngs/rng.h \
25 crypto/nonce_gen.h \
26 crypto/prf_plus.h crypto/prf_plus.c \
27 crypto/signers/signer.c crypto/signers/signer.h \
28 crypto/signers/mac_signer.h crypto/signers/mac_signer.c \
29 crypto/crypto_factory.c crypto/crypto_factory.h \
30 crypto/crypto_tester.c crypto/crypto_tester.h \
31 crypto/diffie_hellman.c crypto/diffie_hellman.h \
32 crypto/aead.c crypto/aead.h \
33 crypto/transform.c crypto/transform.h \
34 credentials/credential_factory.c credentials/credential_factory.h \
35 credentials/builder.c credentials/builder.h \
36 credentials/cred_encoding.c credentials/cred_encoding.h \
37 credentials/keys/private_key.c credentials/keys/private_key.h \
38 credentials/keys/public_key.c credentials/keys/public_key.h \
39 credentials/keys/shared_key.c credentials/keys/shared_key.h \
40 credentials/certificates/certificate.c credentials/certificates/certificate.h \
41 credentials/certificates/x509.h credentials/certificates/ac.h \
42 credentials/certificates/crl.h credentials/certificates/crl.c \
43 credentials/certificates/pkcs10.h \
44 credentials/certificates/ocsp_request.h \
45 credentials/certificates/ocsp_response.h credentials/certificates/ocsp_response.c \
46 credentials/certificates/pgp_certificate.h \
47 credentials/ietf_attributes/ietf_attributes.c credentials/ietf_attributes/ietf_attributes.h \
48 credentials/credential_manager.c credentials/credential_manager.h \
49 credentials/sets/auth_cfg_wrapper.c credentials/sets/auth_cfg_wrapper.h \
50 credentials/sets/ocsp_response_wrapper.c credentials/sets/ocsp_response_wrapper.h \
51 credentials/sets/cert_cache.c credentials/sets/cert_cache.h \
52 credentials/sets/mem_cred.c credentials/sets/mem_cred.h \
53 credentials/sets/callback_cred.c credentials/sets/callback_cred.h \
54 credentials/auth_cfg.c credentials/auth_cfg.h credentials/credential_set.h \
55 credentials/cert_validator.h database/database.h database/database.c \
56 database/database_factory.h database/database_factory.c \
57 fetcher/fetcher.h fetcher/fetcher.c fetcher/fetcher_manager.h fetcher/fetcher_manager.c \
58 eap/eap.h eap/eap.c \
59 pen/pen.h pen/pen.c \
60 plugins/plugin_loader.c plugins/plugin_loader.h plugins/plugin.h \
61 plugins/plugin_feature.c plugins/plugin_feature.h \
62 processing/jobs/job.h processing/jobs/job.c \
63 processing/jobs/callback_job.c processing/jobs/callback_job.h \
64 processing/processor.c processing/processor.h \
65 processing/scheduler.c processing/scheduler.h \
66 selectors/traffic_selector.c selectors/traffic_selector.h \
67 threading/thread.h threading/thread.c \
68 threading/thread_value.h threading/thread_value.c \
69 threading/mutex.h threading/mutex.c threading/condvar.h \
70 threading/semaphore.h threading/semaphore.c \
71 threading/spinlock.h threading/spinlock.c \
72 threading/rwlock.h threading/rwlock.c \
73 threading/lock_profiler.h \
74 utils.h utils.c \
75 utils/host.c utils/host.h \
76 utils/identification.c utils/identification.h \
77 utils/lexparser.c utils/lexparser.h \
78 utils/linked_list.c utils/linked_list.h \
79 utils/hashtable.c utils/hashtable.h \
80 utils/enumerator.c utils/enumerator.h \
81 utils/optionsfrom.c utils/optionsfrom.h \
82 utils/capabilities.c utils/capabilities.h \
83 utils/backtrace.c utils/backtrace.h
84
85 # adding the plugin source files
86
87 LOCAL_SRC_FILES += $(call add_plugin, aes)
88
89 LOCAL_SRC_FILES += $(call add_plugin, curl)
90 ifneq ($(call plugin_enabled, curl),)
91 LOCAL_C_INCLUDES += $(libcurl_PATH)
92 LOCAL_SHARED_LIBRARIES += libcurl
93 endif
94
95 LOCAL_SRC_FILES += $(call add_plugin, des)
96
97 LOCAL_SRC_FILES += $(call add_plugin, fips-prf)
98
99 LOCAL_SRC_FILES += $(call add_plugin, gmp)
100 ifneq ($(call plugin_enabled, gmp),)
101 LOCAL_C_INCLUDES += $(libgmp_PATH)
102 LOCAL_SHARED_LIBRARIES += libgmp
103 endif
104
105 LOCAL_SRC_FILES += $(call add_plugin, hmac)
106
107 LOCAL_SRC_FILES += $(call add_plugin, md4)
108
109 LOCAL_SRC_FILES += $(call add_plugin, md5)
110
111 LOCAL_SRC_FILES += $(call add_plugin, nonce)
112
113 LOCAL_SRC_FILES += $(call add_plugin, openssl)
114 ifneq ($(call plugin_enabled, openssl),)
115 LOCAL_C_INCLUDES += external/openssl/include
116 LOCAL_SHARED_LIBRARIES += libcrypto
117 endif
118
119 LOCAL_SRC_FILES += $(call add_plugin, pem)
120
121 LOCAL_SRC_FILES += $(call add_plugin, pkcs1)
122
123 LOCAL_SRC_FILES += $(call add_plugin, pkcs11)
124
125 LOCAL_SRC_FILES += $(call add_plugin, pubkey)
126
127 LOCAL_SRC_FILES += $(call add_plugin, random)
128
129 LOCAL_SRC_FILES += $(call add_plugin, sha1)
130
131 LOCAL_SRC_FILES += $(call add_plugin, sha2)
132
133 LOCAL_SRC_FILES += $(call add_plugin, x509)
134
135 LOCAL_SRC_FILES += $(call add_plugin, xcbc)
136
137 # build libstrongswan ----------------------------------------------------------
138
139 LOCAL_C_INCLUDES += \
140 $(libvstr_PATH)
141
142 LOCAL_CFLAGS := $(strongswan_CFLAGS) \
143 -include $(LOCAL_PATH)/AndroidConfigLocal.h
144
145 LOCAL_MODULE := libstrongswan
146
147 LOCAL_MODULE_TAGS := optional
148
149 LOCAL_ARM_MODE := arm
150
151 LOCAL_PRELINK_MODULE := false
152
153 LOCAL_SHARED_LIBRARIES += libdl libvstr
154
155 include $(BUILD_SHARED_LIBRARY)
156