]> git.ipfire.org Git - thirdparty/strongswan.git/blame - Android.mk
gitignore: Don't ignore proposal_keywords.c
[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
9227a3b3 20# list of all plugins - used to enable them with the function below
4e91ff7d 21strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS))
9227a3b3 22
3fa8d773 23include $(LOCAL_PATH)/Android.common.mk
1be32988
TB
24
25# includes
551b0202 26strongswan_PATH := $(LOCAL_PATH)
197dbf5f 27libcurl_PATH := external/strongswan-support/libcurl/include
551b0202 28libgmp_PATH := external/strongswan-support/gmp
73940eb7 29openssl_PATH := external/openssl/include
1be32988 30
eae49aff 31# some definitions
eae49aff
TB
32strongswan_DIR := "/system/bin"
33strongswan_SBINDIR := "/system/bin"
34strongswan_PIDDIR := "/data/misc/vpn"
35strongswan_PLUGINDIR := "$(strongswan_IPSEC_DIR)/ipsec"
36strongswan_CONFDIR := "/system/etc"
37strongswan_STRONGSWAN_CONF := "$(strongswan_CONFDIR)/strongswan.conf"
38
1be32988
TB
39# CFLAGS (partially from a configure run using droid-gcc)
40strongswan_CFLAGS := \
41 -Wno-format \
42 -Wno-pointer-sign \
f9622e8c 43 -Wno-pointer-arith \
1be32988
TB
44 -Wno-sign-compare \
45 -Wno-strict-aliasing \
46 -DHAVE___BOOL \
47 -DHAVE_STDBOOL_H \
48 -DHAVE_ALLOCA_H \
49 -DHAVE_ALLOCA \
50 -DHAVE_CLOCK_GETTIME \
3e4ce886 51 -DHAVE_DLADDR \
1be32988
TB
52 -DHAVE_PRCTL \
53 -DHAVE_LINUX_UDP_H \
54 -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
55 -DHAVE_IPSEC_MODE_BEET \
56 -DHAVE_IPSEC_DIR_FWD \
61c950d9 57 -DOPENSSL_NO_ENGINE \
980ca1f7 58 -DCONFIG_H_INCLUDED \
946be4d3
TB
59 -DCAPABILITIES \
60 -DCAPABILITIES_NATIVE \
1be32988 61 -DMONOLITHIC \
9866c26c 62 -DUSE_IKEV1 \
088020fb 63 -DUSE_IKEV2 \
20c99eda 64 -DUSE_BUILTIN_PRINTF \
b66a3b3d 65 -DDEBUG \
1be32988
TB
66 -DROUTING_TABLE=0 \
67 -DROUTING_TABLE_PRIO=220 \
eae49aff 68 -DVERSION=\"$(strongswan_VERSION)\" \
eae49aff
TB
69 -DPLUGINDIR=\"$(strongswan_PLUGINDIR)\" \
70 -DIPSEC_DIR=\"$(strongswan_DIR)\" \
71 -DIPSEC_PIDDIR=\"$(strongswan_PIDDIR)\" \
72 -DIPSEC_CONFDIR=\"$(strongswan_CONFDIR)\" \
73 -DSTRONGSWAN_CONF=\"$(strongswan_STRONGSWAN_CONF)\" \
1be32988
TB
74 -DDEV_RANDOM=\"/dev/random\" \
75 -DDEV_URANDOM=\"/dev/urandom\"
76
77# only for Android 2.0+
78strongswan_CFLAGS += \
79 -DHAVE_IN6ADDR_ANY
80
1cde0a51
TB
81strongswan_BUILD := \
82 charon \
83 libcharon \
1cde0a51 84 libstrongswan \
ba5b559b 85 libtncif \
19737434 86 libtnccs \
6b726b6f
TB
87 libimcv \
88 libtpmtss
1cde0a51
TB
89
90ifneq ($(strongswan_BUILD_STARTER),)
91strongswan_BUILD += \
1cde0a51
TB
92 starter \
93 stroke \
94 ipsec
95endif
96
1be32988 97include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
1cde0a51 98 $(sort $(strongswan_BUILD))))