37a0224c393dd3bfb50fd44d654133d75d91ab3f
[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/redirect.c \
8         commands/install.c \
9         commands/list_sas.c \
10         commands/list_pols.c \
11         commands/list_authorities.c \
12         commands/list_conns.c \
13         commands/list_certs.c \
14         commands/list_pools.c \
15         commands/list_algs.c \
16         commands/load_all.c \
17         commands/load_authorities.h  commands/load_authorities.c \
18         commands/load_conns.c commands/load_conns.h \
19         commands/load_creds.c commands/load_creds.h \
20         commands/load_pools.c commands/load_pools.h \
21         commands/log.c \
22         commands/version.c \
23         commands/stats.c \
24         commands/reload_settings.c \
25         swanctl.c swanctl.h
26
27 swanctl_LDADD = \
28         $(top_builddir)/src/libcharon/plugins/vici/libvici.la \
29         $(top_builddir)/src/libstrongswan/libstrongswan.la \
30         $(PTHREADLIB) $(ATOMICLIB) $(DLLIB)
31
32 swanctl.o :             $(top_builddir)/config.status
33
34 AM_CPPFLAGS = \
35         -I$(top_srcdir)/src/libstrongswan \
36         -I$(top_srcdir)/src/libcharon/plugins/vici \
37         -DSWANCTLDIR=\""${swanctldir}\"" \
38         -DPLUGINS=\""${s_plugins}\""
39
40 man_MANS = \
41         swanctl.8 \
42         swanctl.conf.5
43
44 BUILT_SOURCES = swanctl.conf swanctl.conf.5.main
45 EXTRA_DIST = swanctl.opt swanctl.conf swanctl.conf.5.main
46 CLEANFILES = $(man_MANS)
47
48 .opt.conf:
49         $(AM_V_GEN) \
50         $(PYTHON) $(top_srcdir)/conf/format-options.py -n -f conf $< > $(srcdir)/$@
51
52 swanctl.conf.5.main: swanctl.opt
53         $(AM_V_GEN) \
54         cd $(srcdir) && $(PYTHON) $(abs_top_srcdir)/conf/format-options.py -n -f man swanctl.opt > $@
55
56 swanctl.conf.5: swanctl.conf.5.head swanctl.conf.5.main swanctl.conf.5.tail
57         $(AM_V_GEN) \
58         cat swanctl.conf.5.head $(srcdir)/swanctl.conf.5.main swanctl.conf.5.tail > $@
59
60 maintainer-clean-local:
61         cd $(srcdir) && rm -f swanctl.conf swanctl.conf.5.main
62
63 install-data-local: swanctl.conf
64         test -e "$(DESTDIR)$(swanctldir)" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)" || true
65         test -e "$(DESTDIR)$(swanctldir)/x509" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509" || true
66         test -e "$(DESTDIR)$(swanctldir)/x509ca" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509ca" || true
67         test -e "$(DESTDIR)$(swanctldir)/x509aa" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509aa" || true
68         test -e "$(DESTDIR)$(swanctldir)/x509ocsp" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509ocsp" || true
69         test -e "$(DESTDIR)$(swanctldir)/x509crl" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509crl" || true
70         test -e "$(DESTDIR)$(swanctldir)/x509ac" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/x509ac" || true
71         test -e "$(DESTDIR)$(swanctldir)/pubkey" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)/pubkey" || true
72         test -e "$(DESTDIR)$(swanctldir)/rsa" || $(INSTALL) -d -m 750 "$(DESTDIR)$(swanctldir)/rsa" || true
73         test -e "$(DESTDIR)$(swanctldir)/ecdsa" || $(INSTALL) -d -m 750 "$(DESTDIR)$(swanctldir)/ecdsa" || true
74         test -e "$(DESTDIR)$(swanctldir)/bliss" || $(INSTALL) -d -m 750 "$(DESTDIR)$(swanctldir)/bliss" || true
75         test -e "$(DESTDIR)$(swanctldir)/pkcs8" || $(INSTALL) -d -m 750 "$(DESTDIR)$(swanctldir)/pkcs8" || true
76         test -e "$(DESTDIR)$(swanctldir)/pkcs12" || $(INSTALL) -d -m 750 "$(DESTDIR)$(swanctldir)/pkcs12" || true
77         test -e "$(DESTDIR)$(swanctldir)/swanctl.conf" || $(INSTALL) -m 640 $(srcdir)/swanctl.conf $(DESTDIR)$(swanctldir)/swanctl.conf || true