Link libgnunetblockgroup to libgnunetblock
[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 else
63 if HAVE_LIBCURL
64 check_PROGRAMS = \
65  test_gnunet_daemon_hostlist \
66  test_gnunet_daemon_hostlist_reconnect \
67  test_gnunet_daemon_hostlist_learning
68 endif
69 endif
70
71 if HAVE_MHD
72 if ENABLE_TEST_RUN
73 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
74 TESTS = \
75  $(check_PROGRAMS)
76 endif
77 endif
78
79 test_gnunet_daemon_hostlist_SOURCES = \
80  test_gnunet_daemon_hostlist.c
81 test_gnunet_daemon_hostlist_LDADD = \
82   $(top_builddir)/src/transport/libgnunettransport.la \
83   $(top_builddir)/src/util/libgnunetutil.la
84
85 test_gnunet_daemon_hostlist_reconnect_SOURCES = \
86  test_gnunet_daemon_hostlist_reconnect.c
87 test_gnunet_daemon_hostlist_reconnect_LDADD = \
88   $(top_builddir)/src/transport/libgnunettransport.la \
89   $(top_builddir)/src/util/libgnunetutil.la
90
91 test_gnunet_daemon_hostlist_learning_SOURCES = \
92  test_gnunet_daemon_hostlist_learning.c
93 test_gnunet_daemon_hostlist_learning_LDADD = \
94   $(top_builddir)/src/transport/libgnunettransport.la \
95   $(top_builddir)/src/core/libgnunetcore.la \
96   $(top_builddir)/src/statistics/libgnunetstatistics.la \
97   $(top_builddir)/src/util/libgnunetutil.la
98
99 EXTRA_DIST = \
100   test_hostlist_defaults.conf \
101   test_gnunet_daemon_hostlist_data.conf \
102   test_gnunet_daemon_hostlist_peer1.conf \
103   test_gnunet_daemon_hostlist_peer2.conf \
104   test_learning_adv_peer.conf \
105   test_learning_learn_peer.conf \
106   test_learning_learn_peer2.conf \
107   learning_data.conf