android: Added function to include source files from plugin subdirectories
authorTobias Brunner <tobias@strongswan.org>
Thu, 11 Oct 2012 09:06:35 +0000 (11:06 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 8 Jul 2013 16:49:25 +0000 (18:49 +0200)
Android.common.mk.in

index 1bc8a83..9f8849d 100644 (file)
@@ -13,6 +13,17 @@ add_plugin = $(if $(call plugin_enabled,$(1)), \
                   ) \
                 ) \
               )
+add_plugin_subdirs = $(if $(call plugin_enabled,$(1)), \
+               $(patsubst $(LOCAL_PATH)/%,%, \
+                 $(wildcard \
+                   $(subst %,$(subst -,_,$(strip $(1))), \
+                     $(addprefix $(LOCAL_PATH)/plugins/%/,$(addsuffix /*.c, \
+                       $(strip $(2)) \
+                      )) \
+                    ) \
+                  ) \
+                ) \
+              )
 
 # strongSwan version, replaced by top Makefile
 strongswan_VERSION := "@PACKAGE_VERSION@"