File tree Expand file tree Collapse file tree 9 files changed +65
-0
lines changed
Expand file tree Collapse file tree 9 files changed +65
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ libtool
2727y.tab. [ch ]
2828lex.yy.c
2929* keywords.c
30+ plugin_constructors.c
3031Doxyfile
3132apidoc /
3233* ~
Original file line number Diff line number Diff line change @@ -184,6 +184,15 @@ if USE_ME
184184 sa/ikev2/tasks/ike_me.c sa/ikev2/tasks/ike_me.h
185185endif
186186
187+ if STATIC_PLUGIN_CONSTRUCTORS
188+ BUILT_SOURCES = $(srcdir ) /plugin_constructors.c
189+ CLEANFILES = $(srcdir ) /plugin_constructors.c
190+
191+ $(srcdir ) /plugin_constructors.c : $(top_srcdir ) /src/libstrongswan/plugins/plugin_constructors.py
192+ $(AM_V_GEN ) \
193+ $(PYTHON ) $(top_srcdir ) /src/libstrongswan/plugins/plugin_constructors.py ${c_plugins} > $@
194+ endif
195+
187196# build optional plugins
188197# #######################
189198
Original file line number Diff line number Diff line change @@ -117,6 +117,13 @@ struct private_daemon_t {
117117 refcount_t ref ;
118118};
119119
120+ /**
121+ * Register plugins if built statically
122+ */
123+ #ifdef STATIC_PLUGIN_CONSTRUCTORS
124+ #include "plugin_constructors.c"
125+ #endif
126+
120127/**
121128 * One and only instance of the daemon.
122129 */
Original file line number Diff line number Diff line change @@ -221,6 +221,15 @@ $(srcdir)/crypto/proposal/proposal_keywords_static.c: $(srcdir)/crypto/proposal/
221221 $(GPERF ) -N proposal_get_token_static -m 10 -C -G -c -t -D < \
222222 $(srcdir ) /crypto/proposal/proposal_keywords_static.txt > $@
223223
224+ if STATIC_PLUGIN_CONSTRUCTORS
225+ BUILT_SOURCES += $(srcdir ) /plugin_constructors.c
226+ CLEANFILES = $(srcdir ) /plugin_constructors.c
227+
228+ $(srcdir ) /plugin_constructors.c : $(srcdir ) /plugins/plugin_constructors.py
229+ $(AM_V_GEN ) \
230+ $(PYTHON ) $(srcdir ) /plugins/plugin_constructors.py ${s_plugins} > $@
231+ endif
232+
224233if MONOLITHIC
225234SUBDIRS =
226235else
Original file line number Diff line number Diff line change @@ -93,6 +93,13 @@ void library_add_namespace(char *ns)
9393 }
9494}
9595
96+ /**
97+ * Register plugins if built statically
98+ */
99+ #ifdef STATIC_PLUGIN_CONSTRUCTORS
100+ #include "plugin_constructors.c"
101+ #endif
102+
96103/**
97104 * library instance
98105 */
Original file line number Diff line number Diff line change @@ -26,6 +26,15 @@ tnc/tnccs/tnccs_manager.h tnc/tnccs/tnccs_manager.c
2626
2727EXTRA_DIST = Android.mk
2828
29+ if STATIC_PLUGIN_CONSTRUCTORS
30+ BUILT_SOURCES = $(srcdir ) /plugin_constructors.c
31+ CLEANFILES = $(srcdir ) /plugin_constructors.c
32+
33+ $(srcdir ) /plugin_constructors.c : $(top_srcdir ) /src/libstrongswan/plugins/plugin_constructors.py
34+ $(AM_V_GEN ) \
35+ $(PYTHON ) $(top_srcdir ) /src/libstrongswan/plugins/plugin_constructors.py ${t_plugins} > $@
36+ endif
37+
2938# build optional plugins
3039# #######################
3140
Original file line number Diff line number Diff line change @@ -54,6 +54,13 @@ struct private_tnc_t {
5454 refcount_t ref ;
5555};
5656
57+ /**
58+ * Register plugins if built statically
59+ */
60+ #ifdef STATIC_PLUGIN_CONSTRUCTORS
61+ #include "plugin_constructors.c"
62+ #endif
63+
5764/**
5865 * Single instance of tnc_t.
5966 */
Original file line number Diff line number Diff line change 3333SUBDIRS = .
3434endif
3535
36+ if STATIC_PLUGIN_CONSTRUCTORS
37+ BUILT_SOURCES = $(srcdir ) /plugin_constructors.c
38+ CLEANFILES = $(srcdir ) /plugin_constructors.c
39+
40+ $(srcdir ) /plugin_constructors.c : $(top_srcdir ) /src/libstrongswan/plugins/plugin_constructors.py
41+ $(AM_V_GEN ) \
42+ $(PYTHON ) $(top_srcdir ) /src/libstrongswan/plugins/plugin_constructors.py ${p_plugins} > $@
43+ endif
44+
3645if USE_TPM
3746 SUBDIRS += plugins/tpm
3847if MONOLITHIC
Original file line number Diff line number Diff line change 1717#include "tpm_tss_tss2.h"
1818#include "tpm_tss_trousers.h"
1919
20+ /**
21+ * Register plugins if built statically
22+ */
23+ #ifdef STATIC_PLUGIN_CONSTRUCTORS
24+ #include "plugin_constructors.c"
25+ #endif
26+
2027/**
2128 * Described in header.
2229 */
You can’t perform that action at this time.
0 commit comments