a5fd602465de1e90d791b08240cf0c43b15b70b4
[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 if HAVE_MHD
14 if HAVE_JSON
15 REST_PLUGIN = libgnunet_plugin_rest_peerinfo.la
16 endif
17 endif
18
19 plugindir = $(libdir)/gnunet
20
21 plugin_LTLIBRARIES = $(REST_PLUGIN)
22
23 bin_PROGRAMS = \
24  gnunet-peerinfo
25
26 libgnunet_plugin_rest_peerinfo_la_SOURCES = \
27   plugin_rest_peerinfo.c
28 libgnunet_plugin_rest_peerinfo_la_LIBADD = \
29   $(top_builddir)/src/hello/libgnunethello.la \
30   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
31   $(top_builddir)/src/transport/libgnunettransport.la \
32   $(top_builddir)/src/rest/libgnunetrest.la \
33   $(top_builddir)/src/json/libgnunetjson.la \
34   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
35   $(LTLIBINTL) -ljansson -lmicrohttpd
36 libgnunet_plugin_rest_peerinfo_la_LDFLAGS = \
37  $(GN_PLUGIN_LDFLAGS)
38
39
40 gnunet_peerinfo_SOURCES = \
41  gnunet-peerinfo.c \
42  gnunet-peerinfo_plugins.c gnunet-peerinfo_plugins.h
43
44 gnunet_peerinfo_LDADD = \
45   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
46   $(top_builddir)/src/transport/libgnunettransport.la \
47   $(top_builddir)/src/hello/libgnunethello.la \
48   $(top_builddir)/src/statistics/libgnunetstatistics.la \
49   $(top_builddir)/src/util/libgnunetutil.la
50
51 if HAVE_PYTHON
52 check_SCRIPTS = \
53  test_gnunet_peerinfo.py
54 endif
55
56 if ENABLE_TEST_RUN
57 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
58 TESTS = $(check_SCRIPTS)
59 endif
60
61 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
62
63 test_gnunet_peerinfo.py: test_gnunet_peerinfo.py.in Makefile
64         $(do_subst) < $(srcdir)/test_gnunet_peerinfo.py.in > test_gnunet_peerinfo.py
65         chmod +x test_gnunet_peerinfo.py
66
67 EXTRA_DIST = \
68   test_gnunet_peerinfo.py.in \
69   test_gnunet_peerinfo_data.conf
70
71 CLEANFILES = $(check_SCRIPTS)