plugin datastore mysql
[oweals/gnunet.git] / src / hostlist / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 pkgcfgdir= $(pkgdatadir)/config.d/
5
6 libexecdir= $(pkglibdir)/libexec/
7
8
9 if USE_COVERAGE
10   AM_CFLAGS = --coverage -O0
11 endif
12
13 if HAVE_MHD
14  HOSTLIST_SERVER_SOURCES = \
15    gnunet-daemon-hostlist_server.c gnunet-daemon-hostlist_server.h
16  GN_LIBMHD = -lmicrohttpd
17 endif
18
19 if HAVE_LIBGNURL
20 libexec_PROGRAMS = \
21  gnunet-daemon-hostlist
22 LIB_GNURL=@LIBGNURL@
23 CPP_GNURL=@LIBGNURL_CPPFLAGS@
24 dist_pkgcfg_DATA = \
25   hostlist.conf
26 else
27 if HAVE_LIBCURL
28 libexec_PROGRAMS = \
29  gnunet-daemon-hostlist
30 LIB_GNURL=@LIBCURL@
31 CPP_GNURL=@LIBCURL_CPPFLAGS@
32 dist_pkgcfg_DATA = \
33   hostlist.conf
34 endif
35 endif
36
37 gnunet_daemon_hostlist_SOURCES = \
38  gnunet-daemon-hostlist.c gnunet-daemon-hostlist.h \
39  gnunet-daemon-hostlist_client.c gnunet-daemon-hostlist_client.h \
40  $(HOSTLIST_SERVER_SOURCES)
41
42 gnunet_daemon_hostlist_LDADD = \
43   $(top_builddir)/src/core/libgnunetcore.la \
44   $(top_builddir)/src/hello/libgnunethello.la \
45   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
46   $(top_builddir)/src/statistics/libgnunetstatistics.la \
47   $(top_builddir)/src/transport/libgnunettransport.la \
48   $(top_builddir)/src/util/libgnunetutil.la \
49   $(GN_LIBMHD) \
50   $(LIB_GNURL) \
51   $(GN_LIBINTL)
52
53 gnunet_daemon_hostlist_CPPFLAGS = \
54  $(CPP_GNURL) \
55  $(AM_CPPFLAGS)
56
57 if HAVE_LIBGNURL
58 check_PROGRAMS = \
59  test_gnunet_daemon_hostlist \
60  test_gnunet_daemon_hostlist_reconnect \
61  test_gnunet_daemon_hostlist_learning
62
63 if HAVE_MHD
64 if ENABLE_TEST_RUN
65 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
66 TESTS = \
67  test_gnunet_daemon_hostlist \
68  test_gnunet_daemon_hostlist_reconnect \
69  test_gnunet_daemon_hostlist_learning
70 endif
71 endif
72 endif
73
74 test_gnunet_daemon_hostlist_SOURCES = \
75  test_gnunet_daemon_hostlist.c
76 test_gnunet_daemon_hostlist_LDADD = \
77   $(top_builddir)/src/transport/libgnunettransport.la \
78   $(top_builddir)/src/util/libgnunetutil.la
79
80 test_gnunet_daemon_hostlist_reconnect_SOURCES = \
81  test_gnunet_daemon_hostlist_reconnect.c
82 test_gnunet_daemon_hostlist_reconnect_LDADD = \
83   $(top_builddir)/src/transport/libgnunettransport.la \
84   $(top_builddir)/src/util/libgnunetutil.la
85
86 test_gnunet_daemon_hostlist_learning_SOURCES = \
87  test_gnunet_daemon_hostlist_learning.c
88 test_gnunet_daemon_hostlist_learning_LDADD = \
89   $(top_builddir)/src/transport/libgnunettransport.la \
90   $(top_builddir)/src/core/libgnunetcore.la \
91   $(top_builddir)/src/statistics/libgnunetstatistics.la \
92   $(top_builddir)/src/util/libgnunetutil.la
93
94 EXTRA_DIST = \
95   test_hostlist_defaults.conf \
96   test_gnunet_daemon_hostlist_data.conf \
97   test_gnunet_daemon_hostlist_peer1.conf \
98   test_gnunet_daemon_hostlist_peer2.conf \
99   test_learning_adv_peer.conf \
100   test_learning_learn_peer.conf \
101   test_learning_learn_peer2.conf \
102   learning_data.conf