1 # make this relative to the location of strongswan.conf
2 strongswanconfdir = `dirname $(strongswan_conf)`
3 strongswanddir = $(strongswanconfdir)/strongswan.d
4 charonconfdir = $(strongswanddir)/charon
8 options/charon-logging.opt
11 plugins/android_log.opt \
13 plugins/attr-sql.opt \
14 plugins/certexpire.opt \
15 plugins/coupling.opt \
18 plugins/duplicheck.opt \
20 plugins/eap-aka-3ggp2.opt \
21 plugins/eap-dynamic.opt \
23 plugins/eap-peap.opt \
24 plugins/eap-radius.opt \
26 plugins/eap-simaka-sql.opt \
29 plugins/eap-ttls.opt \
30 plugins/error-notify.opt \
33 plugins/ipseckey.opt \
35 plugins/kernel-klips.opt \
36 plugins/kernel-libipsec.opt \
37 plugins/kernel-netlink.opt \
38 plugins/kernel-pfroute.opt \
39 plugins/load-tester.opt \
47 plugins/socket-default.opt \
50 plugins/systime-fix.opt \
51 plugins/tnc-ifmap.opt \
55 plugins/whitelist.opt \
56 plugins/xauth-eap.opt \
59 alloptions = $(options) $(plugins)
61 confsnippets = $(alloptions:opt=conf)
63 # we only install snippets for enabled plugins
64 plugins_install_tmp = $(charon_plugins:%=plugins/%.tmp)
65 plugins_install_src = $(charon_plugins:%=plugins/%.conf)
67 options_install_src = $(options:opt=conf)
72 BUILT_SOURCES = default.conf strongswan.conf.5.main $(confsnippets)
73 EXTRA_DIST = format-options.py strongswan.conf default.opt \
74 default.conf strongswan.conf.5.main $(alloptions) $(confsnippets)
76 CLEANFILES=$(man_MANS)
83 -e "s:\@PLUGIN_NAME\@:`basename $< .opt`:" \
84 $(srcdir)/default.opt | cat - $< | \
85 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins > $(srcdir)/$@ \
88 $(PYTHON) $(srcdir)/format-options.py -f conf -r charon.plugins $< > $(srcdir)/$@ \
92 # we need another implicit rule to generate files from the generic template only
93 # if the rules above did not catch it. this requires an intermediate step that
94 # generates a copy of the generic config template.
95 $(plugins_install_tmp):
96 @cp $(srcdir)/default.conf $(srcdir)/$@
101 -e "s:\@PLUGIN_NAME\@:`basename $< .tmp`:" \
102 $(srcdir)/$< > $(srcdir)/$@
104 strongswan.conf.5.main: $(alloptions)
106 $(PYTHON) $(srcdir)/format-options.py -f man $^ > $@
108 strongswan.conf.5: strongswan.conf.5.head strongswan.conf.5.main strongswan.conf.5.tail
112 maintainer-clean-local:
114 rm -f $(confsnippets) default.conf plugins/*.conf plugins/*.tmp
116 install-data-local: $(plugins_install_src)
117 test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)"
118 test -e "$(DESTDIR)${strongswanddir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanddir)"
119 test -e "$(DESTDIR)${charonconfdir}" || $(INSTALL) -d "$(DESTDIR)$(charonconfdir)"
120 test -e "$(DESTDIR)$(strongswanconfdir)/strongswan.conf" || $(INSTALL) -m 640 $(srcdir)/strongswan.conf $(DESTDIR)$(strongswanconfdir)/strongswan.conf || true
121 for f in $(options_install_src); do \
122 name=`basename $$f`; \
123 test -f "$(DESTDIR)$(strongswanddir)/$$name" || $(INSTALL) -m 640 -t "$(DESTDIR)$(strongswanddir)" $(srcdir)/$$f || true; \
125 for f in $(plugins_install_src); do \
126 name=`basename $$f`; \
127 test -f "$(DESTDIR)$(charonconfdir)/$$name" || $(INSTALL) -m 640 -t "$(DESTDIR)$(charonconfdir)" $(srcdir)/$$f || true; \