charon-tkm: Register tkm nonce generator
[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         gmp \
28         hmac \
29         kernel-netlink \
30         pem \
31         pkcs1 \
32         pkcs8 \
33         random \
34         sha1 \
35         sha2 \
36         stroke \
37         socket-default \
38         x509
39
40 all: build_charon
41
42 build_charon: build_charon.gpr src/charon-tkm.c
43         @$(GPRBUILD) -p $< $(BUILD_OPTS)
44
45 build_tests: build_tests.gpr
46         @$(GPRBUILD) -p $< $(BUILD_OPTS) -cargs @CHECK_CFLAGS@ -largs @CHECK_LIBS@
47
48 if UNITTESTS
49 check: build_tests
50         @LD_LIBRARY_PATH=$(LIBPT) obj/test_runner
51 else
52 check:
53         @echo "reconfigure with --enable-unit-tests"
54 endif
55
56 install: build_charon
57         $(INSTALL) -m 755 obj/charon-tkm $(DESTDIR)$(ipsecdir)
58
59 clean:
60         rm -rf obj
61
62 EXTRA_DIST = build_charon.gpr build_common.gpr build_tests.gpr src tests