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