]> git.ipfire.org Git - thirdparty/strongswan.git/blob - Android.mk.in
Added a whitelist command line utility to control whitelist plugin
[thirdparty/strongswan.git] / Android.mk.in
1 LOCAL_PATH := $(call my-dir)
2 include $(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)
6 strongswan_PLUGINS := openssl fips-prf random pubkey pkcs1 \
7 pem xcbc hmac kernel-netlink socket-default android \
8 eap-identity eap-mschapv2 eap-md5
9
10 # helper macros to only add source files for plugins included in the list above
11 # source files are relative to the android.mk that called the macro
12 plugin_enabled = $(findstring $(1), $(strongswan_PLUGINS))
13 add_plugin = $(if $(call plugin_enabled,$(1)), \
14 $(patsubst $(LOCAL_PATH)/%,%, \
15 $(wildcard \
16 $(subst %,$(subst -,_,$(strip $(1))), \
17 $(LOCAL_PATH)/plugins/%/%*.c \
18 ) \
19 ) \
20 ) \
21 )
22
23 # includes
24 strongswan_PATH := $(LOCAL_PATH)
25 libvstr_PATH := external/strongswan-support/vstr/include
26 libgmp_PATH := external/strongswan-support/gmp
27
28 # CFLAGS (partially from a configure run using droid-gcc)
29 strongswan_CFLAGS := \
30 -Wno-format \
31 -Wno-pointer-sign \
32 -Wno-pointer-arith \
33 -Wno-sign-compare \
34 -Wno-strict-aliasing \
35 -DHAVE___BOOL \
36 -DHAVE_STDBOOL_H \
37 -DHAVE_ALLOCA_H \
38 -DHAVE_ALLOCA \
39 -DHAVE_CLOCK_GETTIME \
40 -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC \
41 -DHAVE_PRCTL \
42 -DHAVE_LINUX_UDP_H \
43 -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY \
44 -DHAVE_IPSEC_MODE_BEET \
45 -DHAVE_IPSEC_DIR_FWD \
46 -DOPENSSL_NO_EC \
47 -DOPENSSL_NO_ECDSA \
48 -DOPENSSL_NO_ECDH \
49 -DOPENSSL_NO_ENGINE \
50 -DCAPABILITIES \
51 -DCAPABILITIES_NATIVE \
52 -DMONOLITHIC \
53 -DUSE_VSTR \
54 -DROUTING_TABLE=0 \
55 -DROUTING_TABLE_PRIO=220 \
56 -DVERSION=\"@PACKAGE_VERSION@\" \
57 -DPLUGINS='"$(strongswan_PLUGINS)"' \
58 -DIPSEC_DIR=\"/system/bin\" \
59 -DIPSEC_PIDDIR=\"/data/misc/vpn\" \
60 -DSTRONGSWAN_CONF=\"/system/etc/strongswan.conf\" \
61 -DDEV_RANDOM=\"/dev/random\" \
62 -DDEV_URANDOM=\"/dev/urandom\"
63
64 # only for Android 2.0+
65 strongswan_CFLAGS += \
66 -DHAVE_IN6ADDR_ANY
67
68 include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
69 charon \
70 libcharon \
71 libhydra \
72 libstrongswan \
73 ))