update changelog, make build
[oweals/gnunet.git] / src / peerinfo / 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 plugindir = $(libdir)/gnunet
9
10 pkgcfg_DATA = \
11   peerinfo.conf
12
13 if MINGW
14  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols -lole32 -lshell32 -liconv -lstdc++ -lcomdlg32 -lgdi32
15 endif
16
17 if USE_COVERAGE
18   AM_CFLAGS = --coverage -O0
19   XLIB = -lgcov
20 endif
21
22 if HAVE_MHD
23 if HAVE_JSON
24 REST_PLUGIN = libgnunet_plugin_rest_peerinfo.la
25 endif
26 endif
27
28 lib_LTLIBRARIES = libgnunetpeerinfo.la
29
30 plugin_LTLIBRARIES = $(REST_PLUGIN)
31
32 libgnunet_plugin_rest_peerinfo_la_SOURCES = \
33   plugin_rest_peerinfo.c
34 libgnunet_plugin_rest_peerinfo_la_LIBADD = \
35   $(top_builddir)/src/hello/libgnunethello.la \
36   libgnunetpeerinfo.la \
37   $(top_builddir)/src/rest/libgnunetrest.la \
38   $(top_builddir)/src/json/libgnunetjson.la \
39   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
40   $(LTLIBINTL) -ljansson -lmicrohttpd
41 libgnunet_plugin_rest_peerinfo_la_LDFLAGS = \
42  $(GN_PLUGIN_LDFLAGS)
43
44
45 libgnunetpeerinfo_la_SOURCES = \
46   peerinfo_api.c peerinfo.h \
47   peerinfo_api_notify.c
48 libgnunetpeerinfo_la_LIBADD = \
49   $(top_builddir)/src/hello/libgnunethello.la \
50   $(top_builddir)/src/util/libgnunetutil.la \
51   $(XLIB) \
52   $(LTLIBINTL)
53 libgnunetpeerinfo_la_LDFLAGS = \
54   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
55   -version-info 0:0:0
56
57
58 libexec_PROGRAMS = \
59  gnunet-service-peerinfo
60
61 gnunet_service_peerinfo_SOURCES = \
62   gnunet-service-peerinfo.c
63 gnunet_service_peerinfo_LDADD = \
64   $(top_builddir)/src/hello/libgnunethello.la \
65   $(top_builddir)/src/statistics/libgnunetstatistics.la \
66   $(top_builddir)/src/util/libgnunetutil.la
67
68 if HAVE_BENCHMARKS
69  PEERINFO_BENCHMARKS = \
70  perf_peerinfo_api
71 endif
72
73 if HAVE_TESTING
74 check_PROGRAMS = \
75  test_peerinfo_shipped_hellos \
76  test_peerinfo_api \
77  test_peerinfo_api_friend_only \
78  test_peerinfo_api_notify_friend_only \
79  $(PEERINFO_BENCHMARKS)
80 endif
81
82
83 if ENABLE_TEST_RUN
84 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
85 TESTS = $(check_PROGRAMS)
86 endif
87
88 test_peerinfo_shipped_hellos_SOURCES = \
89  test_peerinfo_shipped_hellos.c
90 test_peerinfo_shipped_hellos_LDADD = \
91  $(top_builddir)/src/hello/libgnunethello.la \
92  libgnunetpeerinfo.la \
93  $(top_builddir)/src/testing/libgnunettesting.la \
94  $(top_builddir)/src/util/libgnunetutil.la
95
96 test_peerinfo_api_SOURCES = \
97  test_peerinfo_api.c
98 test_peerinfo_api_LDADD = \
99  $(top_builddir)/src/hello/libgnunethello.la \
100  libgnunetpeerinfo.la \
101  $(top_builddir)/src/testing/libgnunettesting.la \
102  $(top_builddir)/src/util/libgnunetutil.la
103
104 test_peerinfo_api_friend_only_SOURCES = \
105  test_peerinfo_api_friend_only.c
106 test_peerinfo_api_friend_only_LDADD = \
107  $(top_builddir)/src/hello/libgnunethello.la \
108  libgnunetpeerinfo.la \
109  $(top_builddir)/src/testing/libgnunettesting.la \
110  $(top_builddir)/src/util/libgnunetutil.la
111
112 test_peerinfo_api_notify_friend_only_SOURCES = \
113  test_peerinfo_api_notify_friend_only.c
114 test_peerinfo_api_notify_friend_only_LDADD = \
115  $(top_builddir)/src/hello/libgnunethello.la \
116  libgnunetpeerinfo.la \
117  $(top_builddir)/src/testing/libgnunettesting.la \
118  $(top_builddir)/src/util/libgnunetutil.la
119
120 perf_peerinfo_api_SOURCES = \
121  perf_peerinfo_api.c
122 perf_peerinfo_api_LDADD = \
123  $(top_builddir)/src/hello/libgnunethello.la \
124  libgnunetpeerinfo.la \
125  $(top_builddir)/src/testing/libgnunettesting.la \
126  $(top_builddir)/src/util/libgnunetutil.la
127
128 EXTRA_DIST = \
129   test_peerinfo_api_data.conf