summaryrefslogtreecommitdiff
path: root/src/charon-tkm/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/charon-tkm/Makefile.am')
-rw-r--r--src/charon-tkm/Makefile.am54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/charon-tkm/Makefile.am b/src/charon-tkm/Makefile.am
new file mode 100644
index 000000000..457e5e44e
--- /dev/null
+++ b/src/charon-tkm/Makefile.am
@@ -0,0 +1,54 @@
+SRC = $(top_builddir)/src
+
+# includes relative to obj directory
+INCLUDES = \
+ -include $(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
+LIBFL = -lstrongswan -lhydra -lcharon
+
+DEFS += -DPLUGINS=\""$(PLUGINS)\"" -DIPSEC_PIDDIR=\"${piddir}\"
+
+BUILD_OPTS = \
+ -XOBJ_DIR=$(CURDIR)/obj \
+ -cargs $(INCLUDES) $(DEFS) \
+ -largs $(LIBLD) $(LIBFL)
+
+# plugins to enable
+PLUGINS = \
+ kernel-netlink \
+ pem \
+ socket-default \
+ openssl \
+ stroke
+
+all: build_charon
+
+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@
+
+if UNITTESTS
+check: build_tests
+ @LD_LIBRARY_PATH=$(LIBPT) obj/test_runner
+else
+check:
+ @echo "reconfigure with --enable-unit-tests"
+endif
+
+install: build_charon
+ $(INSTALL) -m 755 obj/charon-tkm $(DESTDIR)$(ipsecdir)
+
+clean:
+ rm -rf obj
+
+EXTRA_DIST = build_charon.gpr build_common.gpr build_tests.gpr src tests