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