Add plugin constructor registration for all libraries that provide plugins
[strongswan.git] / src / libtpmtss / Makefile.am
index c7ac39a..5f3a97a 100644 (file)
@@ -33,6 +33,15 @@ else
 SUBDIRS = .
 endif
 
 SUBDIRS = .
 endif
 
+if STATIC_PLUGIN_CONSTRUCTORS
+BUILT_SOURCES = $(srcdir)/plugin_constructors.c
+CLEANFILES = $(srcdir)/plugin_constructors.c
+
+$(srcdir)/plugin_constructors.c: $(top_srcdir)/src/libstrongswan/plugins/plugin_constructors.py
+               $(AM_V_GEN) \
+               $(PYTHON) $(top_srcdir)/src/libstrongswan/plugins/plugin_constructors.py ${p_plugins} > $@
+endif
+
 if USE_TPM
   SUBDIRS += plugins/tpm
 if MONOLITHIC
 if USE_TPM
   SUBDIRS += plugins/tpm
 if MONOLITHIC