swanctl: Add a --load-all command, performing --load-{creds,pools,conns}
[strongswan.git] / src / swanctl / Makefile.am
1 sbin_PROGRAMS = swanctl
2
3 swanctl_SOURCES = \
4         command.c command.h \
5         commands/initiate.c \
6         commands/terminate.c \
7         commands/install.c \
8         commands/list_sas.c \
9         commands/list_pols.c \
10         commands/list_conns.c \
11         commands/list_certs.c \
12         commands/list_pools.c \
13         commands/load_all.c \
14         commands/load_conns.c commands/load_conns.h \
15         commands/load_creds.c commands/load_creds.h \
16         commands/load_pools.c commands/load_pools.h \
17         commands/log.c \
18         commands/version.c \
19         commands/stats.c \
20         commands/reload_settings.c \
21         swanctl.c swanctl.h
22
23 swanctl_LDADD = \
24         $(top_builddir)/src/libcharon/plugins/vici/libvici.la \
25         $(top_builddir)/src/libstrongswan/libstrongswan.la
26
27 swanctl.o :             $(top_builddir)/config.status
28
29 AM_CPPFLAGS = \
30         -I$(top_srcdir)/src/libstrongswan \
31         -I$(top_srcdir)/src/libcharon/plugins/vici \
32         -DSWANCTLDIR=\""${swanctldir}\"" \
33         -DPLUGINS=\""${s_plugins}\""
34
35 man_MANS = \
36         swanctl.8 \
37         swanctl.conf.5
38
39 BUILT_SOURCES = swanctl.conf swanctl.conf.5.main
40 EXTRA_DIST = swanctl.opt swanctl.conf swanctl.conf.5.main
41 CLEANFILES = $(man_MANS)
42
43 .opt.conf:
44         $(AM_V_GEN) \
45         $(PYTHON) $(top_srcdir)/conf/format-options.py -n -f conf $< > $(srcdir)/$@
46
47 swanctl.conf.5.main: swanctl.opt
48         $(AM_V_GEN) \
49         $(PYTHON) $(top_srcdir)/conf/format-options.py -n -f man $< > $(srcdir)/$@
50
51 swanctl.conf.5: swanctl.conf.5.head swanctl.conf.5.main swanctl.conf.5.tail
52         $(AM_V_GEN) \
53         cat swanctl.conf.5.head $(srcdir)/swanctl.conf.5.main swanctl.conf.5.tail > $@
54
55 maintainer-clean-local:
56         cd $(srcdir) && rm -f swanctl.conf swanctl.conf.5.main
57
58 install-data-local: swanctl.conf
59         test -e "$(DESTDIR)$(swanctldir)" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)"
60         test -e "$(DESTDIR)$(swanctldir)/x509" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509" || true
61         test -e "$(DESTDIR)$(swanctldir)/x509ca" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509ca" || true
62         test -e "$(DESTDIR)$(swanctldir)/x509aa" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509aa" || true
63         test -e "$(DESTDIR)$(swanctldir)/x509crl" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509crl" || true
64         test -e "$(DESTDIR)$(swanctldir)/x509ac" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509ac" || true
65         test -e "$(DESTDIR)$(swanctldir)/rsa" || $(INSTALL) -d -m 750 "$(DESTDIR)$(swanctldir)/rsa" || true
66         test -e "$(DESTDIR)$(swanctldir)/ecdsa" || $(INSTALL) -d -m 750 "$(DESTDIR)$(swanctldir)/ecdsa" || true
67         test -e "$(DESTDIR)$(swanctldir)/pkcs8" || $(INSTALL) -d -m 750 "$(DESTDIR)$(swanctldir)/pkcs8" || true
68         test -e "$(DESTDIR)$(swanctldir)/swanctl.conf" || $(INSTALL) -m 640 $(srcdir)/swanctl.conf $(DESTDIR)$(swanctldir)/swanctl.conf || true