]> git.ipfire.org Git - thirdparty/strongswan.git/blob - Android.mk
c8815fbff6a82ba815f6e05b7d1927a71e58ad31
[thirdparty/strongswan.git] / Android.mk
1 LOCAL_PATH := $(call my-dir)
2 include $(CLEAR_VARS)
3
4 # the executables that should be installed on the final system have to be added
5 # to PRODUCT_PACKAGES in
6 # build/target/product/core.mk
7 # possible executables are
8 # starter - allows to control and configure the daemon from the command line
9 # charon - the IKE daemon
10
11 # if you enable starter (see above) uncomment the following line
12 # strongswan_BUILD_STARTER := true
13
14 # this is the list of plugins that are built into libstrongswan and charon
15 # also these plugins are loaded by default (if not changed in strongswan.conf)
16 strongswan_CHARON_PLUGINS := android-log openssl fips-prf random nonce pubkey \
17 pkcs1 pkcs8 pem xcbc hmac kdf kernel-netlink socket-default android-dns \
18 stroke eap-identity eap-mschapv2 eap-md5 eap-gtc
19
20 strongswan_STARTER_PLUGINS := kernel-netlink
21
22 # list of all plugins - used to enable them with the function below
23 strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
24 $(strongswan_STARTER_PLUGINS))
25
26 include $(LOCAL_PATH)/Android.common.mk
27
28 # includes
29 strongswan_PATH := $(LOCAL_PATH)
30 libcurl_PATH := external/strongswan-support/libcurl/include
31 libgmp_PATH := external/strongswan-support/gmp
32 openssl_PATH := external/openssl/include
33
34 # some definitions
35 strongswan_DIR := "/system/bin"
36 strongswan_SBINDIR := "/system/bin"
37 strongswan_PIDDIR := "/data/misc/vpn"
38 strongswan_PLUGINDIR := "$(strongswan_IPSEC_DIR)/ipsec"
39 strongswan_CONFDIR := "/system/etc"
40 strongswan_STRONGSWAN_CONF := "$(strongswan_CONFDIR)/strongswan.conf"
41
42 # CFLAGS (partially from a configure run using droid-gcc)
43 strongswan_CFLAGS := \
44 -Wno-format \
45 -Wno-pointer-sign \
46 -Wno-pointer-arith \
47 -Wno-sign-compare \
48 -Wno-strict-aliasing \
49 -DHAVE___BOOL \
50 -DHAVE_STDBOOL_H \
51 -DHAVE_ALLOCA_H \
52 -DHAVE_ALLOCA \
53 -DHAVE_CLOCK_GETTIME \
54 -DHAVE_DLADDR \
55 -DHAVE_PRCTL \
56 -DHAVE_LINUX_UDP_H \
57 -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
58 -DHAVE_IPSEC_MODE_BEET \
59 -DHAVE_IPSEC_DIR_FWD \
60 -DOPENSSL_NO_ENGINE \
61 -DCONFIG_H_INCLUDED \
62 -DCAPABILITIES \
63 -DCAPABILITIES_NATIVE \
64 -DMONOLITHIC \
65 -DUSE_IKEV1 \
66 -DUSE_IKEV2 \
67 -DUSE_BUILTIN_PRINTF \
68 -DDEBUG \
69 -DROUTING_TABLE=0 \
70 -DROUTING_TABLE_PRIO=220 \
71 -DVERSION=\"$(strongswan_VERSION)\" \
72 -DPLUGINDIR=\"$(strongswan_PLUGINDIR)\" \
73 -DIPSEC_DIR=\"$(strongswan_DIR)\" \
74 -DIPSEC_PIDDIR=\"$(strongswan_PIDDIR)\" \
75 -DIPSEC_CONFDIR=\"$(strongswan_CONFDIR)\" \
76 -DSTRONGSWAN_CONF=\"$(strongswan_STRONGSWAN_CONF)\" \
77 -DDEV_RANDOM=\"/dev/random\" \
78 -DDEV_URANDOM=\"/dev/urandom\"
79
80 # only for Android 2.0+
81 strongswan_CFLAGS += \
82 -DHAVE_IN6ADDR_ANY
83
84 strongswan_BUILD := \
85 charon \
86 libcharon \
87 libstrongswan \
88 libtncif \
89 libtnccs \
90 libimcv \
91 libtpmtss
92
93 ifneq ($(strongswan_BUILD_STARTER),)
94 strongswan_BUILD += \
95 starter \
96 stroke \
97 ipsec
98 endif
99
100 include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
101 $(sort $(strongswan_BUILD))))