]> git.ipfire.org Git - thirdparty/strongswan.git/blame - Android.mk.in
Android does not support 'struct in6_pktinfo'.
[thirdparty/strongswan.git] / Android.mk.in
CommitLineData
1be32988
TB
1LOCAL_PATH := $(call my-dir)
2include $(CLEAR_VARS)
3
4# this is the list of plugins that are built into libstrongswan and charon
5# also these plugins are loaded by default (if not changed in strongswan.conf)
9227a3b3 6strongswan_CHARON_PLUGINS := openssl fips-prf random pubkey pkcs1 \
c177076b 7 pem xcbc hmac kernel-netlink socket-default android \
635724f6 8 stroke eap-identity eap-mschapv2 eap-md5
1be32988 9
9227a3b3
TB
10# plugins loaded by pluto
11strongswan_PLUTO_PLUGINS := openssl fips-prf random pubkey pkcs1 \
12 pem xcbc hmac kernel-netlink xauth
13
14# list of all plugins - used to enable them with the function below
15strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
16 $(strongswan_PLUTO_PLUGINS))
17
1be32988 18# helper macros to only add source files for plugins included in the list above
0f5a0439 19# source files are relative to the android.mk that called the macro
1be32988
TB
20plugin_enabled = $(findstring $(1), $(strongswan_PLUGINS))
21add_plugin = $(if $(call plugin_enabled,$(1)), \
0f5a0439
TB
22 $(patsubst $(LOCAL_PATH)/%,%, \
23 $(wildcard \
e3dd6b14
TB
24 $(subst %,$(subst -,_,$(strip $(1))), \
25 $(LOCAL_PATH)/plugins/%/%*.c \
26 ) \
0f5a0439
TB
27 ) \
28 ) \
29 )
1be32988
TB
30
31# includes
551b0202
TB
32strongswan_PATH := $(LOCAL_PATH)
33libvstr_PATH := external/strongswan-support/vstr/include
34libgmp_PATH := external/strongswan-support/gmp
1be32988 35
eae49aff
TB
36# some definitions
37strongswan_VERSION := "@PACKAGE_VERSION@"
38strongswan_DIR := "/system/bin"
39strongswan_SBINDIR := "/system/bin"
40strongswan_PIDDIR := "/data/misc/vpn"
41strongswan_PLUGINDIR := "$(strongswan_IPSEC_DIR)/ipsec"
42strongswan_CONFDIR := "/system/etc"
43strongswan_STRONGSWAN_CONF := "$(strongswan_CONFDIR)/strongswan.conf"
44
1be32988
TB
45# CFLAGS (partially from a configure run using droid-gcc)
46strongswan_CFLAGS := \
47 -Wno-format \
48 -Wno-pointer-sign \
f9622e8c 49 -Wno-pointer-arith \
1be32988
TB
50 -Wno-sign-compare \
51 -Wno-strict-aliasing \
52 -DHAVE___BOOL \
53 -DHAVE_STDBOOL_H \
54 -DHAVE_ALLOCA_H \
55 -DHAVE_ALLOCA \
56 -DHAVE_CLOCK_GETTIME \
57 -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \
58 -DHAVE_PRCTL \
59 -DHAVE_LINUX_UDP_H \
60 -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
61 -DHAVE_IPSEC_MODE_BEET \
62 -DHAVE_IPSEC_DIR_FWD \
61c950d9
TB
63 -DOPENSSL_NO_EC \
64 -DOPENSSL_NO_ECDSA \
65 -DOPENSSL_NO_ECDH \
66 -DOPENSSL_NO_ENGINE \
946be4d3
TB
67 -DCAPABILITIES \
68 -DCAPABILITIES_NATIVE \
1be32988
TB
69 -DMONOLITHIC \
70 -DUSE_VSTR \
b66a3b3d 71 -DDEBUG \
1be32988
TB
72 -DROUTING_TABLE=0 \
73 -DROUTING_TABLE_PRIO=220 \
eae49aff 74 -DVERSION=\"$(strongswan_VERSION)\" \
eae49aff
TB
75 -DPLUGINDIR=\"$(strongswan_PLUGINDIR)\" \
76 -DIPSEC_DIR=\"$(strongswan_DIR)\" \
77 -DIPSEC_PIDDIR=\"$(strongswan_PIDDIR)\" \
78 -DIPSEC_CONFDIR=\"$(strongswan_CONFDIR)\" \
79 -DSTRONGSWAN_CONF=\"$(strongswan_STRONGSWAN_CONF)\" \
1be32988
TB
80 -DDEV_RANDOM=\"/dev/random\" \
81 -DDEV_URANDOM=\"/dev/urandom\"
82
83# only for Android 2.0+
84strongswan_CFLAGS += \
85 -DHAVE_IN6ADDR_ANY
86
87include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
88 charon \
52c72573 89 libcharon \
6edbe165 90 libhydra \
1be32988 91 libstrongswan \
aeb6590b 92 libtncif \
dcd9970d 93 libfreeswan \
4490804f 94 pluto \
b3b1419e 95 stroke \
504c524c 96 whack \
b66a3b3d 97 starter \
e9f23d62 98 ipsec \
1be32988 99 ))