]> git.ipfire.org Git - thirdparty/strongswan.git/blame - Android.mk
kernel-netlink: Fallback to configured interface when HW offloading policies
[thirdparty/strongswan.git] / Android.mk
CommitLineData
1be32988
TB
1LOCAL_PATH := $(call my-dir)
2include $(CLEAR_VARS)
3
2e0b478a
TB
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
67307ad7 8# starter - allows to control and configure the daemon from the command line
fff4b74d 9# charon - the IKE daemon
1cde0a51 10
7bc491a7 11# if you enable starter (see above) uncomment the following line
2e0b478a 12# strongswan_BUILD_STARTER := true
0ad58f01 13
1be32988
TB
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)
162621ed 16strongswan_CHARON_PLUGINS := android-log openssl fips-prf random nonce pubkey \
5cc47c11 17 pkcs1 pkcs8 pem xcbc hmac kdf kernel-netlink socket-default android-dns \
ef73bb52 18 stroke eap-identity eap-mschapv2 eap-md5 eap-gtc
1be32988 19
bb3357e8
TB
20strongswan_STARTER_PLUGINS := kernel-netlink
21
9227a3b3
TB
22# list of all plugins - used to enable them with the function below
23strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
7bc491a7 24 $(strongswan_STARTER_PLUGINS))
9227a3b3 25
3fa8d773 26include $(LOCAL_PATH)/Android.common.mk
1be32988
TB
27
28# includes
551b0202 29strongswan_PATH := $(LOCAL_PATH)
197dbf5f 30libcurl_PATH := external/strongswan-support/libcurl/include
551b0202 31libgmp_PATH := external/strongswan-support/gmp
73940eb7 32openssl_PATH := external/openssl/include
1be32988 33
eae49aff 34# some definitions
eae49aff
TB
35strongswan_DIR := "/system/bin"
36strongswan_SBINDIR := "/system/bin"
37strongswan_PIDDIR := "/data/misc/vpn"
38strongswan_PLUGINDIR := "$(strongswan_IPSEC_DIR)/ipsec"
39strongswan_CONFDIR := "/system/etc"
40strongswan_STRONGSWAN_CONF := "$(strongswan_CONFDIR)/strongswan.conf"
41
1be32988
TB
42# CFLAGS (partially from a configure run using droid-gcc)
43strongswan_CFLAGS := \
44 -Wno-format \
45 -Wno-pointer-sign \
f9622e8c 46 -Wno-pointer-arith \
1be32988
TB
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 \
3e4ce886 54 -DHAVE_DLADDR \
1be32988
TB
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 \
61c950d9 60 -DOPENSSL_NO_ENGINE \
980ca1f7 61 -DCONFIG_H_INCLUDED \
946be4d3
TB
62 -DCAPABILITIES \
63 -DCAPABILITIES_NATIVE \
1be32988 64 -DMONOLITHIC \
9866c26c 65 -DUSE_IKEV1 \
088020fb 66 -DUSE_IKEV2 \
20c99eda 67 -DUSE_BUILTIN_PRINTF \
b66a3b3d 68 -DDEBUG \
1be32988
TB
69 -DROUTING_TABLE=0 \
70 -DROUTING_TABLE_PRIO=220 \
eae49aff 71 -DVERSION=\"$(strongswan_VERSION)\" \
eae49aff
TB
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)\" \
1be32988
TB
77 -DDEV_RANDOM=\"/dev/random\" \
78 -DDEV_URANDOM=\"/dev/urandom\"
79
80# only for Android 2.0+
81strongswan_CFLAGS += \
82 -DHAVE_IN6ADDR_ANY
83
1cde0a51
TB
84strongswan_BUILD := \
85 charon \
86 libcharon \
1cde0a51 87 libstrongswan \
ba5b559b 88 libtncif \
19737434 89 libtnccs \
6b726b6f
TB
90 libimcv \
91 libtpmtss
1cde0a51
TB
92
93ifneq ($(strongswan_BUILD_STARTER),)
94strongswan_BUILD += \
1cde0a51
TB
95 starter \
96 stroke \
97 ipsec
98endif
99
1be32988 100include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
1cde0a51 101 $(sort $(strongswan_BUILD))))