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