# this is the list of plugins that are built into libstrongswan and charon
# also these plugins are loaded by default (if not changed in strongswan.conf)
-strongswan_PLUGINS := openssl fips-prf random pubkey pkcs1 \
+strongswan_CHARON_PLUGINS := openssl fips-prf random pubkey pkcs1 \
pem xcbc hmac kernel-netlink socket-default android \
stroke eap-identity eap-mschapv2 eap-md5
+# plugins loaded by pluto
+strongswan_PLUTO_PLUGINS := openssl fips-prf random pubkey pkcs1 \
+ pem xcbc hmac kernel-netlink xauth
+
+# list of all plugins - used to enable them with the function below
+strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
+ $(strongswan_PLUTO_PLUGINS))
+
# helper macros to only add source files for plugins included in the list above
# source files are relative to the android.mk that called the macro
plugin_enabled = $(findstring $(1), $(strongswan_PLUGINS))
-DROUTING_TABLE=0 \
-DROUTING_TABLE_PRIO=220 \
-DVERSION=\"$(strongswan_VERSION)\" \
- -DPLUGINS='"$(strongswan_PLUGINS)"' \
-DPLUGINDIR=\"$(strongswan_PLUGINDIR)\" \
-DIPSEC_DIR=\"$(strongswan_DIR)\" \
-DIPSEC_PIDDIR=\"$(strongswan_PIDDIR)\" \
$(strongswan_PATH)/src/libstrongswan \
$(strongswan_PATH)/src/libtncif
-LOCAL_CFLAGS := $(strongswan_CFLAGS)
+LOCAL_CFLAGS := $(strongswan_CFLAGS) \
+ -DPLUGINS='"$(strongswan_CHARON_PLUGINS)"'
LOCAL_MODULE := libcharon
LOCAL_CFLAGS := $(strongswan_CFLAGS) \
-DPLUTO -DVENDORID -DXAUTH_VID -DCISCO_QUIRKS \
- -DTHREADS -DKERNEL26_SUPPORT -DKERNEL26_HAS_KAME_DUPLICATES
+ -DTHREADS -DKERNEL26_SUPPORT -DKERNEL26_HAS_KAME_DUPLICATES \
+ -DPLUGINS='"$(strongswan_PLUTO_PLUGINS)"'
LOCAL_MODULE := pluto