summaryrefslogtreecommitdiff
path: root/src/charon-tkm/Makefile.am
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2014-03-11 20:48:48 +0100
committerYves-Alexis Perez <corsac@debian.org>2014-03-11 20:48:48 +0100
commit15fb7904f4431a6e7c305fd08732458f7f885e7e (patch)
treec93b60ee813af70509f00f34e29ebec311762427 /src/charon-tkm/Makefile.am
parent5313d2d78ca150515f7f5eb39801c100690b6b29 (diff)
downloadvyos-strongswan-15fb7904f4431a6e7c305fd08732458f7f885e7e.tar.gz
vyos-strongswan-15fb7904f4431a6e7c305fd08732458f7f885e7e.zip
Imported Upstream version 5.1.2
Diffstat (limited to 'src/charon-tkm/Makefile.am')
-rw-r--r--src/charon-tkm/Makefile.am40
1 files changed, 22 insertions, 18 deletions
diff --git a/src/charon-tkm/Makefile.am b/src/charon-tkm/Makefile.am
index 0fef1f62d..d2b81a3ea 100644
--- a/src/charon-tkm/Makefile.am
+++ b/src/charon-tkm/Makefile.am
@@ -1,26 +1,30 @@
-SRC = $(top_builddir)/src
+SRC = $(abs_top_srcdir)/src
+OBJ = $(abs_top_builddir)/src
-# includes relative to obj directory
AM_CPPFLAGS = \
- -include $(top_builddir)/config.h \
- -I../$(SRC)/libstrongswan \
- -I../$(SRC)/libhydra \
- -I../$(SRC)/libcharon
+ -include $(abs_top_builddir)/config.h \
+ -I$(SRC)/libstrongswan \
+ -I$(SRC)/libhydra \
+ -I$(SRC)/libcharon
LIBLD = \
- -L$(SRC)/libstrongswan/.libs \
- -L$(SRC)/libhydra/.libs \
- -L$(SRC)/libcharon/.libs
-LIBPT = $(SRC)/libstrongswan/.libs:$(SRC)/libhydra/.libs:$(SRC)/libcharon/.libs
+ -L$(OBJ)/libstrongswan/.libs \
+ -L$(OBJ)/libhydra/.libs \
+ -L$(OBJ)/libcharon/.libs
+LIBPT = $(OBJ)/libstrongswan/.libs:$(OBJ)/libhydra/.libs:$(OBJ)/libcharon/.libs
LIBFL = -lstrongswan -lhydra -lcharon
DEFS += -DPLUGINS=\""$(PLUGINS)\"" -DIPSEC_PIDDIR=\"${piddir}\"
BUILD_OPTS = \
- -XOBJ_DIR=$(CURDIR)/obj \
+ -XOBJ_DIR=$(abs_builddir)/obj \
-cargs $(AM_CPPFLAGS) $(DEFS) \
-largs $(LIBLD) $(LIBFL)
+TEST_OPTS = \
+ -cargs -DBUILDDIR=\"${abs_top_builddir}\" \
+ -largs -L$(OBJ)/libstrongswan/tests/.libs -ltest
+
# plugins to enable
PLUGINS = \
kernel-netlink \
@@ -35,15 +39,15 @@ build_charon: build_charon.gpr src/charon-tkm.c
@$(GPRBUILD) -p $< $(BUILD_OPTS)
build_tests: build_tests.gpr
- @$(GPRBUILD) -p $< $(BUILD_OPTS) -cargs @CHECK_CFLAGS@ -largs @CHECK_LIBS@
+ @$(GPRBUILD) -p $< $(BUILD_OPTS) $(TEST_OPTS)
+
+check-tkm: build_tests
+ @LD_LIBRARY_PATH=$(LIBPT) obj/tests
-if UNITTESTS
-check: build_tests
- @LD_LIBRARY_PATH=$(LIBPT) obj/test_runner
-else
check:
- @echo "reconfigure with --enable-unit-tests"
-endif
+ @echo "TKM tests are not run automatically because they have to be run as root" >&2
+ @echo "and require a properly configured TKM daemon to be running." >&2
+ @echo "They can be run from '$(abs_builddir)' with 'make check-tkm'" >&2
install: build_charon
$(INSTALL) -m 755 obj/charon-tkm $(DESTDIR)$(ipsecdir)