Add initial TKM Diffie-Hellman implementation
[strongswan.git] / src / charon-tkm / Makefile.am
1 SRC = $(top_builddir)/src
2
3 # includes relative to obj directory
4 INCLUDES = \
5         -include $(top_builddir)/config.h \
6         -I../$(SRC)/libstrongswan \
7         -I../$(SRC)/libhydra \
8         -I../$(SRC)/libcharon
9
10 LIBLD = \
11         -L$(SRC)/libstrongswan/.libs \
12         -L$(SRC)/libhydra/.libs \
13         -L$(SRC)/libcharon/.libs
14 LIBPT = $(SRC)/libstrongswan/.libs:$(SRC)/libhydra/.libs:$(SRC)/libcharon/.libs
15 LIBFL = -lstrongswan -lhydra -lcharon
16
17 DEFS += -DPLUGINS=\""$(PLUGINS)\"" -DIPSEC_PIDDIR=\"${piddir}\"
18
19 BUILD_OPTS = \
20         -cargs $(INCLUDES) $(DEFS) \
21         -largs $(LIBLD) $(LIBFL)
22
23 # plugins to enable
24 PLUGINS = \
25         aes \
26         constraints \
27         hmac \
28         kernel-netlink \
29         pem \
30         pkcs1 \
31         pkcs8 \
32         random \
33         sha1 \
34         sha2 \
35         stroke \
36         socket-default \
37         x509
38
39 all: build_charon
40
41 build_charon: build_charon.gpr src/charon-tkm.c
42         @$(GPRBUILD) -p $< $(BUILD_OPTS)
43
44 build_tests: build_tests.gpr
45         @$(GPRBUILD) -p $< $(BUILD_OPTS) -cargs @CHECK_CFLAGS@ -largs @CHECK_LIBS@
46
47 if UNITTESTS
48 check: build_tests
49         @LD_LIBRARY_PATH=$(LIBPT) obj/test_runner
50 else
51 check:
52         @echo "reconfigure with --enable-unit-tests"
53 endif
54
55 install: build_charon
56         $(INSTALL) -m 755 obj/charon-tkm $(DESTDIR)$(ipsecdir)
57
58 clean:
59         rm -rf obj
60
61 EXTRA_DIST = build_charon.gpr build_common.gpr build_tests.gpr src tests