testing: Added ha/active-passive scenario
[strongswan.git] / src / charon-tkm / Makefile.am
1 SRC = $(abs_top_srcdir)/src
2 OBJ = $(abs_top_builddir)/src
3
4 AM_CPPFLAGS = \
5         -include $(abs_top_builddir)/config.h \
6         -I$(SRC)/libstrongswan \
7         -I$(SRC)/libhydra \
8         -I$(SRC)/libcharon
9
10 LIBLD = \
11         -L$(OBJ)/libstrongswan/.libs \
12         -L$(OBJ)/libhydra/.libs \
13         -L$(OBJ)/libcharon/.libs
14 LIBPT = $(OBJ)/libstrongswan/.libs:$(OBJ)/libhydra/.libs:$(OBJ)/libcharon/.libs
15 LIBFL = -lstrongswan -lhydra -lcharon
16
17 DEFS += -DPLUGINS=\""$(PLUGINS)\"" -DIPSEC_PIDDIR=\"${piddir}\"
18
19 BUILD_OPTS = \
20         -XOBJ_DIR=$(abs_builddir)/obj \
21         -cargs $(AM_CPPFLAGS) $(DEFS) \
22         -largs $(LIBLD) $(LIBFL)
23
24 TEST_OPTS = \
25         -cargs -DBUILDDIR=\"${abs_top_builddir}\" \
26         -largs -L$(OBJ)/libstrongswan/tests/.libs -ltest
27
28 # plugins to enable
29 PLUGINS = \
30         kernel-netlink \
31         pem \
32         socket-default \
33         openssl \
34         stroke
35
36 all: build_charon
37
38 build_charon: build_charon.gpr src/charon-tkm.c
39         @$(GPRBUILD) -p $< $(BUILD_OPTS)
40
41 build_tests: build_tests.gpr
42         @$(GPRBUILD) -p $< $(BUILD_OPTS) $(TEST_OPTS)
43
44 check-tkm: build_tests
45         @LD_LIBRARY_PATH=$(LIBPT) obj/tests
46
47 check:
48         @echo "TKM tests are not run automatically because they have to be run as root" >&2
49         @echo "and require a properly configured TKM daemon to be running." >&2
50         @echo "They can be run from '$(abs_builddir)' with 'make check-tkm'" >&2
51
52 install: build_charon
53         $(INSTALL) -m 755 obj/charon-tkm $(DESTDIR)$(ipsecdir)
54
55 clean:
56         rm -rf obj
57
58 EXTRA_DIST = build_charon.gpr build_common.gpr build_tests.gpr src tests