Add plugin constructor registration for all libraries that provide plugins
[strongswan.git] / src / libstrongswan / Makefile.am
index 69abfbe..b4d8452 100644 (file)
@@ -221,6 +221,15 @@ $(srcdir)/crypto/proposal/proposal_keywords_static.c:      $(srcdir)/crypto/proposal/
                $(GPERF) -N proposal_get_token_static -m 10 -C -G -c -t -D < \
                                                                                                $(srcdir)/crypto/proposal/proposal_keywords_static.txt > $@
 
+if STATIC_PLUGIN_CONSTRUCTORS
+BUILT_SOURCES += $(srcdir)/plugin_constructors.c
+CLEANFILES = $(srcdir)/plugin_constructors.c
+
+$(srcdir)/plugin_constructors.c: $(srcdir)/plugins/plugin_constructors.py
+               $(AM_V_GEN) \
+               $(PYTHON) $(srcdir)/plugins/plugin_constructors.py ${s_plugins} > $@
+endif
+
 if MONOLITHIC
 SUBDIRS =
 else