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