fix build order: peerinfo logic depending on transport must be in peerinfo-tool
[oweals/gnunet.git] / src / peerinfo-tool / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 if MINGW
5  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols -lole32 -lshell32 -liconv -lstdc++ -lcomdlg32 -lgdi32
6 endif
7
8 if USE_COVERAGE
9   AM_CFLAGS = --coverage -O0
10   XLIB = -lgcov
11 endif
12
13 plugindir = $(libdir)/gnunet
14
15 bin_PROGRAMS = \
16  gnunet-peerinfo
17
18 gnunet_peerinfo_SOURCES = \
19  gnunet-peerinfo.c \
20  gnunet-peerinfo_plugins.c gnunet-peerinfo_plugins.h
21
22 gnunet_peerinfo_LDADD = \
23   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
24   $(top_builddir)/src/transport/libgnunettransport.la \
25   $(top_builddir)/src/hello/libgnunethello.la \
26   $(top_builddir)/src/statistics/libgnunetstatistics.la \
27   $(top_builddir)/src/util/libgnunetutil.la
28
29 if HAVE_MHD
30 if HAVE_JSON
31 plugin_LTLIBRARIES = \
32   libgnunet_plugin_rest_peerinfo.la
33 endif
34 endif
35
36
37 libgnunet_plugin_rest_peerinfo_la_SOURCES = \
38   plugin_rest_peerinfo.c
39 libgnunet_plugin_rest_peerinfo_la_LIBADD = \
40   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
41   $(top_builddir)/src/transport/libgnunettransport.la \
42   $(top_builddir)/src/rest/libgnunetrest.la \
43   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
44   $(LTLIBINTL) -ljansson -lmicrohttpd
45 libgnunet_plugin_rest_peerinfo_la_LDFLAGS = \
46  $(GN_PLUGIN_LDFLAGS)
47
48
49
50 if HAVE_PYTHON
51 check_SCRIPTS = \
52  test_gnunet_peerinfo.py
53 endif
54
55 if ENABLE_TEST_RUN
56 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
57 TESTS = $(check_SCRIPTS)
58 endif
59
60 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
61
62 test_gnunet_peerinfo.py: test_gnunet_peerinfo.py.in Makefile
63         $(do_subst) < $(srcdir)/test_gnunet_peerinfo.py.in > test_gnunet_peerinfo.py
64         chmod +x test_gnunet_peerinfo.py
65
66 EXTRA_DIST = \
67   test_gnunet_peerinfo.py.in \
68   test_gnunet_peerinfo_data.conf
69
70 CLEANFILES = $(check_SCRIPTS)