e5d3c88ed0173d1946cfad13bc41329451e2ac20
[oweals/gnunet.git] / src / dht / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2 if MINGW
3  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols -lole32 -lshell32 -liconv -lstdc++ -lcomdlg32 -lgdi32
4 endif
5
6 plugindir = $(libdir)/gnunet
7
8 pkgcfgdir= $(pkgdatadir)/config.d/
9
10 dist_pkgcfg_DATA = \
11   dht.conf 
12
13 if HAVE_ZLIB
14  ZLIB_LNK = -lz
15 endif
16
17 if USE_COVERAGE
18   AM_CFLAGS = --coverage -O0
19   XLIB = -lgcov
20 endif
21
22 lib_LTLIBRARIES = \
23  libgnunetdht.la 
24
25 libgnunetdht_la_SOURCES = \
26   dht_api.c dht.h 
27 libgnunetdht_la_LIBADD = \
28   $(top_builddir)/src/util/libgnunetutil.la \
29   $(XLIB)
30 libgnunetdht_la_LDFLAGS = \
31   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
32   -version-info 0:0:0
33
34
35 plugin_LTLIBRARIES = \
36   libgnunet_plugin_block_dht.la 
37
38 libgnunet_plugin_block_dht_la_SOURCES = \
39   plugin_block_dht.c
40 libgnunet_plugin_block_dht_la_LIBADD = \
41   $(top_builddir)/src/hello/libgnunethello.la \
42   $(top_builddir)/src/block/libgnunetblock.la \
43   $(top_builddir)/src/util/libgnunetutil.la 
44 libgnunet_plugin_block_dht_la_LDFLAGS = \
45  $(GN_PLUGIN_LDFLAGS)
46 libgnunet_plugin_block_dht_la_DEPENDENCIES = \
47   $(top_builddir)/src/block/libgnunetblock.la 
48
49
50
51 bin_PROGRAMS = \
52  gnunet-service-dht \
53  gnunet-dht-get \
54  gnunet-dht-put
55
56 gnunet_service_dht_SOURCES = \
57  gnunet-service-dht.c gnunet-service-dht.h \
58  gnunet-service-dht_clients.c gnunet-service-dht_clients.h \
59  gnunet-service-dht_datacache.c gnunet-service-dht_datacache.h \
60  gnunet-service-dht_hello.c gnunet-service-dht_hello.h \
61  gnunet-service-dht_nse.c gnunet-service-dht_nse.h \
62  gnunet-service-dht_neighbours.c gnunet-service-dht_neighbours.h \
63  gnunet-service-dht_routing.c gnunet-service-dht_routing.h 
64 gnunet_service_dht_LDADD = \
65   $(top_builddir)/src/statistics/libgnunetstatistics.la \
66   $(top_builddir)/src/core/libgnunetcore.la \
67   $(top_builddir)/src/nse/libgnunetnse.la \
68   $(top_builddir)/src/ats/libgnunetats.la \
69   $(top_builddir)/src/transport/libgnunettransport.la \
70   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
71   $(top_builddir)/src/hello/libgnunethello.la \
72   $(top_builddir)/src/block/libgnunetblock.la \
73   $(top_builddir)/src/datacache/libgnunetdatacache.la \
74   $(top_builddir)/src/util/libgnunetutil.la \
75   -lm
76
77 gnunet_dht_get_SOURCES = \
78  gnunet-dht-get.c         
79 gnunet_dht_get_LDADD = \
80   $(top_builddir)/src/dht/libgnunetdht.la \
81   $(top_builddir)/src/core/libgnunetcore.la \
82   $(top_builddir)/src/util/libgnunetutil.la 
83 gnunet_dht_get_DEPENDENCIES = \
84   libgnunetdht.la                             
85
86 gnunet_dht_put_SOURCES = \
87  gnunet-dht-put.c         
88 gnunet_dht_put_LDADD = \
89   $(top_builddir)/src/dht/libgnunetdht.la \
90   $(top_builddir)/src/core/libgnunetcore.la \
91   $(top_builddir)/src/util/libgnunetutil.la 
92 gnunet_dht_put_DEPENDENCIES = \
93   libgnunetdht.la                             
94
95 check_PROGRAMS = \
96  test_dht_api \
97  test_dht_twopeer \
98  test_dht_twopeer_put_get \
99  test_dht_twopeer_get_put \
100  test_dht_twopeer_path_tracking \
101  test_dht_multipeer \
102  test_dht_2dtorus \
103  test_dht_monitor
104
105 if ENABLE_TEST_RUN
106 TESTS = test_dht_api $(check_SCRIPTS) \
107  test_dht_twopeer \
108  test_dht_twopeer_put_get \
109  test_dht_twopeer_get_put \
110  test_dht_twopeer_path_tracking \
111  test_dht_multipeer  \
112  test_dht_2dtorus \
113  test_dht_monitor
114 endif
115
116 test_dht_api_SOURCES = \
117  test_dht_api.c
118 test_dht_api_LDADD = \
119  $(top_builddir)/src/util/libgnunetutil.la \
120  $(top_builddir)/src/hello/libgnunethello.la \
121  $(top_builddir)/src/dht/libgnunetdht.la
122 test_dht_api_DEPENDENCIES = \
123   libgnunetdht.la                           
124
125 test_dht_twopeer_SOURCES = \
126  test_dht_twopeer.c
127 test_dht_twopeer_LDADD = \
128  $(top_builddir)/src/util/libgnunetutil.la \
129  $(top_builddir)/src/testing/libgnunettesting.la \
130  $(top_builddir)/src/dht/libgnunetdht.la    
131 test_dht_twopeer_DEPENDENCIES = \
132   libgnunetdht.la                           
133
134 test_dht_twopeer_put_get_SOURCES = \
135  test_dht_twopeer_put_get.c
136 test_dht_twopeer_put_get_LDADD = \
137  $(top_builddir)/src/util/libgnunetutil.la \
138  $(top_builddir)/src/testing/libgnunettesting.la \
139  $(top_builddir)/src/dht/libgnunetdht.la   
140
141 test_dht_twopeer_get_put_SOURCES = \
142  test_dht_twopeer_get_put.c
143 test_dht_twopeer_get_put_LDADD = \
144  $(top_builddir)/src/util/libgnunetutil.la \
145  $(top_builddir)/src/testing/libgnunettesting.la \
146  $(top_builddir)/src/dht/libgnunetdht.la   
147
148 test_dht_twopeer_path_tracking_SOURCES = \
149  test_dht_twopeer_path_tracking.c
150 test_dht_twopeer_path_tracking_LDADD = \
151  $(top_builddir)/src/util/libgnunetutil.la \
152  $(top_builddir)/src/testing/libgnunettesting.la \
153  $(top_builddir)/src/dht/libgnunetdht.la   
154
155 test_dht_multipeer_SOURCES = \
156  test_dht_multipeer.c
157 test_dht_multipeer_LDADD = \
158  $(top_builddir)/src/util/libgnunetutil.la \
159  $(top_builddir)/src/statistics/libgnunetstatistics.la \
160  $(top_builddir)/src/testing/libgnunettesting.la \
161  $(top_builddir)/src/dht/libgnunetdht.la  
162 test_dht_multipeer_DEPENDENCIES = \
163   libgnunetdht.la                           
164
165 test_dht_2dtorus_SOURCES = \
166  test_dht_2dtorus.c
167 test_dht_2dtorus_LDADD = \
168  $(top_builddir)/src/util/libgnunetutil.la \
169  $(top_builddir)/src/testing/libgnunettesting.la \
170  $(top_builddir)/src/dht/libgnunetdht.la
171 test_dht_2dtorus_DEPENDENCIES = \
172   libgnunetdht.la
173
174 test_dht_monitor_SOURCES = test_dht_monitor.c
175 test_dht_monitor_LDADD = \
176  $(top_builddir)/src/util/libgnunetutil.la \
177  $(top_builddir)/src/testing/libgnunettesting.la \
178  $(top_builddir)/src/dht/libgnunetdht.la
179 test_dht_monitor_DEPENDENCIES = \
180   libgnunetdht.la
181
182 EXTRA_DIST = \
183   $(check_SCRIPTS) \
184   test_dht_api_data.conf \
185   test_dht_api_peer1.conf \
186   test_dht_twopeer_data.conf \
187   test_dht_multipeer_data.conf \
188   test_dht_2dtorus.conf \
189   multipeer_topo.dat
190
191 check_SCRIPTS = \
192   test_dht_tools.sh