]> git.ipfire.org Git - thirdparty/strongswan.git/blob - Android.mk
Merge branch 'android-client-cert'
[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 # scepclient - SCEP client
11
12 # if you enable starter or scepclient (see above) uncomment the proper
13 # lines here
14 # strongswan_BUILD_STARTER := true
15 # strongswan_BUILD_SCEPCLIENT := true
16
17 # this is the list of plugins that are built into libstrongswan and charon
18 # also these plugins are loaded by default (if not changed in strongswan.conf)
19 strongswan_CHARON_PLUGINS := android-log openssl fips-prf random nonce pubkey \
20 pkcs1 pkcs8 pem xcbc hmac kernel-netlink socket-default android \
21 stroke eap-identity eap-mschapv2 eap-md5 eap-gtc
22
23 ifneq ($(strongswan_BUILD_SCEPCLIENT),)
24 # plugins loaded by scepclient
25 strongswan_SCEPCLIENT_PLUGINS := openssl curl fips-prf random pkcs1 pem
26 endif
27
28 strongswan_STARTER_PLUGINS := kernel-netlink
29
30 # list of all plugins - used to enable them with the function below
31 strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
32 $(strongswan_STARTER_PLUGINS) \
33 $(strongswan_SCEPCLIENT_PLUGINS))
34
35 include $(LOCAL_PATH)/Android.common.mk
36
37 # includes
38 strongswan_PATH := $(LOCAL_PATH)
39 libvstr_PATH := external/strongswan-support/vstr/include
40 libcurl_PATH := external/strongswan-support/libcurl/include
41 libgmp_PATH := external/strongswan-support/gmp
42 openssl_PATH := external/openssl/include
43
44 # some definitions
45 strongswan_DIR := "/system/bin"
46 strongswan_SBINDIR := "/system/bin"
47 strongswan_PIDDIR := "/data/misc/vpn"
48 strongswan_PLUGINDIR := "$(strongswan_IPSEC_DIR)/ipsec"
49 strongswan_CONFDIR := "/system/etc"
50 strongswan_STRONGSWAN_CONF := "$(strongswan_CONFDIR)/strongswan.conf"
51
52 # CFLAGS (partially from a configure run using droid-gcc)
53 strongswan_CFLAGS := \
54 -Wno-format \
55 -Wno-pointer-sign \
56 -Wno-pointer-arith \
57 -Wno-sign-compare \
58 -Wno-strict-aliasing \
59 -DHAVE___BOOL \
60 -DHAVE_STDBOOL_H \
61 -DHAVE_ALLOCA_H \
62 -DHAVE_ALLOCA \
63 -DHAVE_CLOCK_GETTIME \
64 -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \
65 -DHAVE_PRCTL \
66 -DHAVE_LINUX_UDP_H \
67 -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
68 -DHAVE_IPSEC_MODE_BEET \
69 -DHAVE_IPSEC_DIR_FWD \
70 -DOPENSSL_NO_EC \
71 -DOPENSSL_NO_ECDSA \
72 -DOPENSSL_NO_ECDH \
73 -DOPENSSL_NO_ENGINE \
74 -DCONFIG_H_INCLUDED \
75 -DCAPABILITIES \
76 -DCAPABILITIES_NATIVE \
77 -DMONOLITHIC \
78 -DUSE_IKEV1 \
79 -DUSE_IKEV2 \
80 -DUSE_VSTR \
81 -DDEBUG \
82 -DROUTING_TABLE=0 \
83 -DROUTING_TABLE_PRIO=220 \
84 -DVERSION=\"$(strongswan_VERSION)\" \
85 -DPLUGINDIR=\"$(strongswan_PLUGINDIR)\" \
86 -DIPSEC_DIR=\"$(strongswan_DIR)\" \
87 -DIPSEC_PIDDIR=\"$(strongswan_PIDDIR)\" \
88 -DIPSEC_CONFDIR=\"$(strongswan_CONFDIR)\" \
89 -DSTRONGSWAN_CONF=\"$(strongswan_STRONGSWAN_CONF)\" \
90 -DDEV_RANDOM=\"/dev/random\" \
91 -DDEV_URANDOM=\"/dev/urandom\"
92
93 # only for Android 2.0+
94 strongswan_CFLAGS += \
95 -DHAVE_IN6ADDR_ANY
96
97 strongswan_BUILD := \
98 charon \
99 libcharon \
100 libhydra \
101 libstrongswan \
102 libtncif \
103 libtnccs
104
105 ifneq ($(strongswan_BUILD_STARTER),)
106 strongswan_BUILD += \
107 starter \
108 stroke \
109 ipsec
110 endif
111
112 ifneq ($(strongswan_BUILD_SCEPCLIENT),)
113 strongswan_BUILD += \
114 scepclient
115 endif
116
117 include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
118 $(sort $(strongswan_BUILD))))