884f6e2ab90ccfaf34346f24bafc9f3a9e6ad7fc
[strongswan.git] / src / starter / Makefile.am
1 ipsec_PROGRAMS = starter
2 starter_SOURCES = \
3 parser.y lexer.l ipsec-parser.h netkey.c args.h netkey.h \
4 starterwhack.c starterwhack.h starterstroke.c invokepluto.c confread.c \
5 starterstroke.h interfaces.c invokepluto.h confread.h interfaces.h args.c \
6 keywords.c files.h keywords.h cmp.c starter.c cmp.h exec.c invokecharon.c \
7 exec.h invokecharon.h loglite.c klips.c klips.h
8
9 INCLUDES = \
10 -I${linux_headers} \
11 -I$(top_srcdir)/src/libstrongswan \
12 -I$(top_srcdir)/src/libfreeswan \
13 -I$(top_srcdir)/src/libhydra \
14 -I$(top_srcdir)/src/pluto \
15 -I$(top_srcdir)/src/whack \
16 -I$(top_srcdir)/src/stroke
17
18 AM_CFLAGS = \
19 -DIPSEC_DIR=\"${ipsecdir}\" \
20 -DIPSEC_CONFDIR=\"${sysconfdir}\" \
21 -DIPSEC_PIDDIR=\"${piddir}\" \
22 -DIPSEC_EAPDIR=\"${eapdir}\" \
23 -DDEV_RANDOM=\"${random_device}\" \
24 -DDEV_URANDOM=\"${urandom_device}\" \
25 -DPLUGINS=\""${starter_plugins}\"" \
26 -DDEBUG
27
28 AM_YFLAGS = -v -d
29
30 starter_LDADD = defs.o $(top_builddir)/src/libfreeswan/libfreeswan.a $(top_builddir)/src/libstrongswan/libstrongswan.la $(top_builddir)/src/libhydra/libhydra.la $(SOCKLIB) $(PTHREADLIB)
31 EXTRA_DIST = keywords.txt ipsec.conf Android.mk
32 MAINTAINERCLEANFILES = keywords.c
33 BUILT_SOURCES = parser.h
34
35 PLUTODIR=$(top_srcdir)/src/pluto
36 SCEPCLIENTDIR=$(top_srcdir)/src/scepclient
37
38 if USE_PLUTO
39   AM_CFLAGS += -DSTART_PLUTO
40 endif
41
42 if USE_CHARON
43   AM_CFLAGS += -DSTART_CHARON
44 endif
45
46 if USE_LOAD_WARNING
47   AM_CFLAGS += -DLOAD_WARNING
48 endif
49
50 if USE_TOOLS
51   AM_CFLAGS += -DGENERATE_SELFCERT
52 endif
53
54 keywords.c:     $(srcdir)/keywords.txt $(srcdir)/keywords.h
55                 $(GPERF) -m 10 -C -G -D -t < $(srcdir)/keywords.txt > $@
56
57 defs.o:         $(PLUTODIR)/defs.c $(PLUTODIR)/defs.h
58                 $(COMPILE) -c -o $@ $(PLUTODIR)/defs.c
59
60 install-exec-local :
61                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d" || $(INSTALL) -o -d "$(DESTDIR)$(sysconfdir)/ipsec.d" || true
62                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/cacerts" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/cacerts" || true
63                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/ocspcerts" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/ocspcerts" || true
64                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/certs" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/certs" || true
65                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/acerts" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/acerts" || true
66                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/aacerts" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/aacerts" || true
67                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/crls" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/crls" || true
68                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/reqs" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/reqs" || true
69                 test -e "$(DESTDIR)${sysconfdir}/ipsec.d/private" || $(INSTALL) -d -m 750 "$(DESTDIR)$(sysconfdir)/ipsec.d/private" || true
70                 test -e "$(DESTDIR)$(sysconfdir)/ipsec.conf" || $(INSTALL) -m 644 $(srcdir)/ipsec.conf $(DESTDIR)$(sysconfdir)/ipsec.conf || true
71