utils: Move thread-safe strerror replacement to a separate file
[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 \
7 asn1/asn1.c asn1/asn1_parser.c asn1/oid.c bio/bio_reader.c bio/bio_writer.c \
8 collections/blocking_queue.c collections/enumerator.c collections/hashtable.c \
9 collections/array.c \
10 collections/linked_list.c crypto/crypters/crypter.c crypto/hashers/hasher.c \
11 crypto/proposal/proposal_keywords.c crypto/proposal/proposal_keywords_static.c \
12 crypto/prfs/prf.c crypto/prfs/mac_prf.c crypto/pkcs5.c \
13 crypto/rngs/rng.c crypto/prf_plus.c crypto/signers/signer.c \
14 crypto/signers/mac_signer.c crypto/crypto_factory.c crypto/crypto_tester.c \
15 crypto/diffie_hellman.c crypto/aead.c crypto/transform.c \
16 crypto/iv/iv_gen_rand.c crypto/iv/iv_gen_seq.c \
17 credentials/credential_factory.c credentials/builder.c \
18 credentials/cred_encoding.c credentials/keys/private_key.c \
19 credentials/keys/public_key.c credentials/keys/shared_key.c \
20 credentials/certificates/certificate.c credentials/certificates/crl.c \
21 credentials/certificates/ocsp_response.c \
22 credentials/containers/container.c credentials/containers/pkcs12.c \
23 credentials/ietf_attributes/ietf_attributes.c credentials/credential_manager.c \
24 credentials/sets/auth_cfg_wrapper.c credentials/sets/ocsp_response_wrapper.c \
25 credentials/sets/cert_cache.c credentials/sets/mem_cred.c \
26 credentials/sets/callback_cred.c credentials/auth_cfg.c database/database.c \
27 database/database_factory.c fetcher/fetcher.c fetcher/fetcher_manager.c eap/eap.c \
28 ipsec/ipsec_types.c \
29 networking/host.c networking/host_resolver.c networking/packet.c \
30 networking/tun_device.c networking/streams/stream.c \
31 networking/streams/stream_service.c networking/streams/stream_manager.c \
32 pen/pen.c plugins/plugin_loader.c plugins/plugin_feature.c processing/jobs/job.c \
33 processing/jobs/callback_job.c processing/processor.c processing/scheduler.c \
34 processing/watcher.c resolver/resolver_manager.c resolver/rr_set.c \
35 selectors/traffic_selector.c threading/thread.c threading/thread_value.c \
36 threading/mutex.c threading/semaphore.c threading/rwlock.c threading/spinlock.c \
37 utils/utils.c utils/chunk.c utils/debug.c utils/enum.c utils/identification.c \
38 utils/lexparser.c utils/optionsfrom.c utils/capabilities.c utils/backtrace.c \
39 utils/printf_hook/printf_hook_builtin.c utils/settings.c utils/test.c \
40 utils/utils/strerror.c
41
42 # adding the plugin source files
43
44 LOCAL_SRC_FILES += $(call add_plugin, aes)
45
46 LOCAL_SRC_FILES += $(call add_plugin, curl)
47 ifneq ($(call plugin_enabled, curl),)
48 LOCAL_C_INCLUDES += $(libcurl_PATH)
49 LOCAL_SHARED_LIBRARIES += libcurl
50 endif
51
52 LOCAL_SRC_FILES += $(call add_plugin, des)
53
54 LOCAL_SRC_FILES += $(call add_plugin, fips-prf)
55
56 LOCAL_SRC_FILES += $(call add_plugin, gmp)
57 ifneq ($(call plugin_enabled, gmp),)
58 LOCAL_C_INCLUDES += $(libgmp_PATH)
59 LOCAL_SHARED_LIBRARIES += libgmp
60 endif
61
62 LOCAL_SRC_FILES += $(call add_plugin, hmac)
63
64 LOCAL_SRC_FILES += $(call add_plugin, md4)
65
66 LOCAL_SRC_FILES += $(call add_plugin, md5)
67
68 LOCAL_SRC_FILES += $(call add_plugin, nonce)
69
70 LOCAL_SRC_FILES += $(call add_plugin, openssl)
71 ifneq ($(call plugin_enabled, openssl),)
72 LOCAL_C_INCLUDES += $(openssl_PATH)
73 LOCAL_SHARED_LIBRARIES += libcrypto
74 endif
75
76 LOCAL_SRC_FILES += $(call add_plugin, pem)
77
78 LOCAL_SRC_FILES += $(call add_plugin, pkcs1)
79
80 LOCAL_SRC_FILES += $(call add_plugin, pkcs7)
81
82 LOCAL_SRC_FILES += $(call add_plugin, pkcs8)
83
84 LOCAL_SRC_FILES += $(call add_plugin, pkcs11)
85
86 LOCAL_SRC_FILES += $(call add_plugin, pubkey)
87
88 LOCAL_SRC_FILES += $(call add_plugin, random)
89
90 LOCAL_SRC_FILES += $(call add_plugin, sha1)
91
92 LOCAL_SRC_FILES += $(call add_plugin, sha2)
93
94 LOCAL_SRC_FILES += $(call add_plugin, x509)
95
96 LOCAL_SRC_FILES += $(call add_plugin, xcbc)
97
98 # build libstrongswan ----------------------------------------------------------
99
100 LOCAL_CFLAGS := $(strongswan_CFLAGS) \
101 -include $(LOCAL_PATH)/AndroidConfigLocal.h
102
103 LOCAL_MODULE := libstrongswan
104
105 LOCAL_MODULE_TAGS := optional
106
107 LOCAL_ARM_MODE := arm
108
109 LOCAL_PRELINK_MODULE := false
110
111 LOCAL_SHARED_LIBRARIES += libdl
112
113 include $(BUILD_SHARED_LIBRARY)