3ed47fe8445f8202117a7eb8329e9c379f42949e
[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         swanctl.c swanctl.h
19
20 swanctl_LDADD = \
21         $(top_builddir)/src/libcharon/plugins/vici/libvici.la \
22         $(top_builddir)/src/libstrongswan/libstrongswan.la
23
24 swanctl.o :             $(top_builddir)/config.status
25
26 AM_CPPFLAGS = \
27         -I$(top_srcdir)/src/libstrongswan \
28         -I$(top_srcdir)/src/libcharon/plugins/vici \
29         -DSWANCTLDIR=\""${swanctldir}\"" \
30         -DPLUGINS=\""${s_plugins}\""
31
32 BUILT_SOURCES = swanctl.conf
33 EXTRA_DIST = swanctl.opt swanctl.conf
34
35 .opt.conf:
36         $(AM_V_GEN) \
37         $(PYTHON) $(top_srcdir)/conf/format-options.py -f conf $< > $(srcdir)/$@
38
39 maintainer-clean-local:
40         cd $(srcdir) && rm -f swanctl.conf
41
42 install-data-local: swanctl.conf
43         test -e "$(DESTDIR)$(swanctldir)" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)"
44         test -e "$(DESTDIR)$(swanctldir)/swanctl.conf" || $(INSTALL) -m 640 $(srcdir)/swanctl.conf $(DESTDIR)$(swanctldir)/swanctl.conf || true