Android.common.mk.in 1.1 KB

123456789101112131415161718192021222324252627282930
  1. # some common definitions used by the main and the NDK-specific Android.mk
  2. # include this after strongswan_PLUGINS has been defined
  3. # helper macros to only add source files for plugins included in the list above
  4. # source files are relative to the android.mk that called the macro
  5. plugin_enabled = $(filter $(1), $(strongswan_PLUGINS))
  6. add_plugin = $(if $(call plugin_enabled,$(1)), \
  7. $(patsubst $(LOCAL_PATH)/%,%, \
  8. $(wildcard \
  9. $(subst %,$(subst -,_,$(strip $(1))), \
  10. $(LOCAL_PATH)/plugins/%/%*.c \
  11. ) \
  12. ) \
  13. ) \
  14. )
  15. add_plugin_subdirs = $(if $(call plugin_enabled,$(1)), \
  16. $(patsubst $(LOCAL_PATH)/%,%, \
  17. $(wildcard \
  18. $(subst %,$(subst -,_,$(strip $(1))), \
  19. $(addprefix $(LOCAL_PATH)/plugins/%/,$(addsuffix /*.c, \
  20. $(strip $(2)) \
  21. )) \
  22. ) \
  23. ) \
  24. ) \
  25. )
  26. # strongSwan version, replaced by top Makefile
  27. strongswan_VERSION := "@PACKAGE_VERSION@"