added a dispatcher class to receive HA sync messages
[strongswan.git] / Android.mk.in
index 723f9e5..cdbe2d2 100644 (file)
@@ -7,13 +7,20 @@ strongswan_PLUGINS := aes des sha1 sha2 md5 fips-prf random x509 pubkey pkcs1 \
        pem xcbc hmac gmp kernel-netlink socket-default attr android
 
 # 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))
 add_plugin = $(if $(call plugin_enabled,$(1)), \
-                               $(addprefix plugins/$(subst -,_,$(strip $(1))/),$(2)))
+               $(patsubst $(LOCAL_PATH)/%,%, \
+                 $(wildcard \
+                   $(LOCAL_PATH)/plugins/$(subst -,_,$(strip $(1)))/*.c \
+                  ) \
+                ) \
+              )
 
 # includes
-libvstr_PATH = external/strongswan-support/vstr/include
-libgmp_PATH = external/strongswan-support/gmp
+strongswan_PATH := $(LOCAL_PATH)
+libvstr_PATH := external/strongswan-support/vstr/include
+libgmp_PATH := external/strongswan-support/gmp
 
 # CFLAGS (partially from a configure run using droid-gcc)
 strongswan_CFLAGS := \
@@ -51,5 +58,6 @@ strongswan_CFLAGS += \
 
 include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
                charon \
+               libcharon \
                libstrongswan \
        ))