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