swanctl: Add a --stats command to print daemon infos and statistics
[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_conns.c \
14         commands/load_creds.c \
15         commands/load_pools.c \
16         commands/log.c \
17         commands/version.c \
18         commands/stats.c \
19         swanctl.c swanctl.h
20
21 swanctl_LDADD = \
22         $(top_builddir)/src/libcharon/plugins/vici/libvici.la \
23         $(top_builddir)/src/libstrongswan/libstrongswan.la
24
25 swanctl.o :             $(top_builddir)/config.status
26
27 AM_CPPFLAGS = \
28         -I$(top_srcdir)/src/libstrongswan \
29         -I$(top_srcdir)/src/libcharon/plugins/vici \
30         -DSWANCTLDIR=\""${swanctldir}\"" \
31         -DPLUGINS=\""${s_plugins}\""
32
33 man_MANS = \
34         swanctl.8 \
35         swanctl.conf.5
36
37 BUILT_SOURCES = swanctl.conf swanctl.conf.5.main
38 EXTRA_DIST = swanctl.opt swanctl.conf swanctl.conf.5.main
39 CLEANFILES = $(man_MANS)
40
41 .opt.conf:
42         $(AM_V_GEN) \
43         $(PYTHON) $(top_srcdir)/conf/format-options.py -n -f conf $< > $(srcdir)/$@
44
45 swanctl.conf.5.main: swanctl.opt
46         $(AM_V_GEN) \
47         $(PYTHON) $(top_srcdir)/conf/format-options.py -n -f man $< > $(srcdir)/$@
48
49 swanctl.conf.5: swanctl.conf.5.head swanctl.conf.5.main swanctl.conf.5.tail
50         $(AM_V_GEN) \
51         cat swanctl.conf.5.head $(srcdir)/swanctl.conf.5.main swanctl.conf.5.tail > $@
52
53 maintainer-clean-local:
54         cd $(srcdir) && rm -f swanctl.conf swanctl.conf.5.main
55
56 install-data-local: swanctl.conf
57         test -e "$(DESTDIR)$(swanctldir)" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)"
58         test -e "$(DESTDIR)$(swanctldir)/x509" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509" || true
59         test -e "$(DESTDIR)$(swanctldir)/x509ca" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509ca" || true
60         test -e "$(DESTDIR)$(swanctldir)/x509aa" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509aa" || true
61         test -e "$(DESTDIR)$(swanctldir)/x509crl" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509crl" || true
62         test -e "$(DESTDIR)$(swanctldir)/x509ac" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509ac" || true
63         test -e "$(DESTDIR)$(swanctldir)/rsa" || $(INSTALL) -d -m 750 "$(DESTDIR)$(swanctldir)/rsa" || true
64         test -e "$(DESTDIR)$(swanctldir)/ecdsa" || $(INSTALL) -d -m 750 "$(DESTDIR)$(swanctldir)/ecdsa" || true
65         test -e "$(DESTDIR)$(swanctldir)/pkcs8" || $(INSTALL) -d -m 750 "$(DESTDIR)$(swanctldir)/pkcs8" || true
66         test -e "$(DESTDIR)$(swanctldir)/swanctl.conf" || $(INSTALL) -m 640 $(srcdir)/swanctl.conf $(DESTDIR)$(swanctldir)/swanctl.conf || true