libhydra: Move kernel interface to libcharon
[strongswan.git] / src / starter / Makefile.am
1 SUBDIRS = . tests
2
3 ipsec_PROGRAMS = starter
4 starter_SOURCES = \
5 starter.c files.h \
6 args.c args.h confread.c confread.h keywords.c keywords.h cmp.c cmp.h \
7 invokecharon.c invokecharon.h starterstroke.c starterstroke.h \
8 netkey.c netkey.h klips.c klips.h
9
10 # parser is also used by tests
11 noinst_LTLIBRARIES = libstarter.la
12 libstarter_la_SOURCES = \
13 parser/parser.y parser/lexer.l parser/conf_parser.c parser/conf_parser.h
14
15 AM_CPPFLAGS = \
16         -I${linux_headers} \
17         -I$(top_srcdir)/src/libstrongswan \
18         -I$(top_srcdir)/src/libhydra \
19         -I$(top_srcdir)/src/libcharon \
20         -I$(top_srcdir)/src/starter \
21         -I$(top_srcdir)/src/stroke \
22         -DIPSEC_DIR=\"${ipsecdir}\" \
23         -DIPSEC_CONFDIR=\"${sysconfdir}\" \
24         -DIPSEC_PIDDIR=\"${piddir}\" \
25         -DIPSEC_EAPDIR=\"${eapdir}\" \
26         -DIPSEC_SCRIPT=\"${ipsec_script}\" \
27         -DDEV_RANDOM=\"${random_device}\" \
28         -DDEV_URANDOM=\"${urandom_device}\" \
29         -DPLUGINS=\""${starter_plugins}\"" \
30         -DDEBUG
31
32 AM_YFLAGS = -v -d
33
34 starter_LDADD = \
35         $(top_builddir)/src/libstrongswan/libstrongswan.la \
36         $(top_builddir)/src/libhydra/libhydra.la \
37         $(top_builddir)/src/libcharon/libcharon.la \
38         libstarter.la \
39         $(SOCKLIB) $(PTHREADLIB)
40
41 EXTRA_DIST = keywords.txt ipsec.conf Android.mk
42 MAINTAINERCLEANFILES = keywords.c
43 BUILT_SOURCES = keywords.c parser/parser.h
44
45 if USE_LOAD_WARNING
46   AM_CPPFLAGS += -DLOAD_WARNING
47 endif
48
49 if USE_SCEPCLIENT
50   AM_CPPFLAGS += -DGENERATE_SELFCERT
51 endif
52
53 keywords.c:     $(srcdir)/keywords.txt $(srcdir)/keywords.h
54                 $(AM_V_GEN) \
55                 $(GPERF) -m 10 -C -G -D -t < $(srcdir)/keywords.txt > $@
56
57 install-exec-local :
58                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d" || true
59                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/cacerts" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/cacerts" || true
60                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/ocspcerts" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/ocspcerts" || true
61                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/certs" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/certs" || true
62                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/acerts" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/acerts" || true
63                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/aacerts" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/aacerts" || true
64                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/crls" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/crls" || true
65                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/reqs" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/reqs" || true
66                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/private" || $(INSTALL) -d -m 750 "$(DESTDIR)$(sysconfdir)/ipsec.d/private" || true
67                 test -e "$(DESTDIR)$(sysconfdir)/ipsec.conf" || $(INSTALL) -m 644 $(srcdir)/ipsec.conf $(DESTDIR)$(sysconfdir)/ipsec.conf || true