f899c97f4a81261ff1df1efff7841849553bf9c7
[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 swanctl.conf.5.main
33 EXTRA_DIST = swanctl.opt swanctl.conf swanctl.conf.5.main
34
35 .opt.conf:
36         $(AM_V_GEN) \
37         $(PYTHON) $(top_srcdir)/conf/format-options.py -f conf $< > $(srcdir)/$@
38
39 swanctl.conf.5.main: swanctl.opt
40         $(AM_V_GEN) \
41         $(PYTHON) $(top_srcdir)/conf/format-options.py -f man $< > $(srcdir)/$@
42
43 maintainer-clean-local:
44         cd $(srcdir) && rm -f swanctl.conf swanctl.conf.5.main
45
46 install-data-local: swanctl.conf
47         test -e "$(DESTDIR)$(swanctldir)" || $(INSTALL) -d "$(DESTDIR)$(swanctldir)"
48         test -e "$(DESTDIR)$(swanctldir)/swanctl.conf" || $(INSTALL) -m 640 $(srcdir)/swanctl.conf $(DESTDIR)$(swanctldir)/swanctl.conf || true