-fix
[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 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 1:0:1
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_line \
103  test_dht_2dtorus \
104  test_dht_monitor
105
106 if ENABLE_TEST_RUN
107 TESTS = test_dht_api $(check_SCRIPTS) \
108  test_dht_twopeer \
109  test_dht_twopeer_put_get \
110  test_dht_twopeer_get_put \
111  test_dht_twopeer_path_tracking \
112  test_dht_multipeer  \
113  test_dht_line \
114  test_dht_2dtorus \
115  test_dht_monitor
116 endif
117
118 test_dht_api_SOURCES = \
119  test_dht_api.c
120 test_dht_api_LDADD = \
121  $(top_builddir)/src/util/libgnunetutil.la \
122  $(top_builddir)/src/hello/libgnunethello.la \
123  $(top_builddir)/src/dht/libgnunetdht.la
124 test_dht_api_DEPENDENCIES = \
125   libgnunetdht.la                           
126
127 test_dht_twopeer_SOURCES = \
128  test_dht_twopeer.c
129 test_dht_twopeer_LDADD = \
130  $(top_builddir)/src/util/libgnunetutil.la \
131  $(top_builddir)/src/testing/libgnunettesting.la \
132  $(top_builddir)/src/dht/libgnunetdht.la    
133 test_dht_twopeer_DEPENDENCIES = \
134   libgnunetdht.la                           
135
136 test_dht_twopeer_put_get_SOURCES = \
137  test_dht_twopeer_put_get.c
138 test_dht_twopeer_put_get_LDADD = \
139  $(top_builddir)/src/util/libgnunetutil.la \
140  $(top_builddir)/src/testing/libgnunettesting.la \
141  $(top_builddir)/src/dht/libgnunetdht.la   
142
143 test_dht_twopeer_get_put_SOURCES = \
144  test_dht_twopeer_get_put.c
145 test_dht_twopeer_get_put_LDADD = \
146  $(top_builddir)/src/util/libgnunetutil.la \
147  $(top_builddir)/src/testing/libgnunettesting.la \
148  $(top_builddir)/src/dht/libgnunetdht.la   
149
150 test_dht_twopeer_path_tracking_SOURCES = \
151  test_dht_twopeer_path_tracking.c
152 test_dht_twopeer_path_tracking_LDADD = \
153  $(top_builddir)/src/util/libgnunetutil.la \
154  $(top_builddir)/src/testing/libgnunettesting.la \
155  $(top_builddir)/src/dht/libgnunetdht.la   
156
157 test_dht_multipeer_SOURCES = \
158  test_dht_multipeer.c
159 test_dht_multipeer_LDADD = \
160  $(top_builddir)/src/util/libgnunetutil.la \
161  $(top_builddir)/src/statistics/libgnunetstatistics.la \
162  $(top_builddir)/src/testing/libgnunettesting.la \
163  $(top_builddir)/src/dht/libgnunetdht.la  
164 test_dht_multipeer_DEPENDENCIES = \
165   libgnunetdht.la                           
166
167 test_dht_2dtorus_SOURCES = \
168  test_dht_topo.c
169 test_dht_2dtorus_LDADD = \
170  $(top_builddir)/src/util/libgnunetutil.la \
171  $(top_builddir)/src/testing/libgnunettesting.la \
172  $(top_builddir)/src/dht/libgnunetdht.la
173 test_dht_2dtorus_DEPENDENCIES = \
174   libgnunetdht.la
175
176 test_dht_line_SOURCES = \
177  test_dht_topo.c
178 test_dht_line_LDADD = \
179  $(top_builddir)/src/util/libgnunetutil.la \
180  $(top_builddir)/src/testing/libgnunettesting.la \
181  $(top_builddir)/src/dht/libgnunetdht.la
182 test_dht_line_DEPENDENCIES = \
183   libgnunetdht.la
184
185 test_dht_monitor_SOURCES = test_dht_monitor.c
186 test_dht_monitor_LDADD = \
187  $(top_builddir)/src/util/libgnunetutil.la \
188  $(top_builddir)/src/testing/libgnunettesting.la \
189  $(top_builddir)/src/dht/libgnunetdht.la
190 test_dht_monitor_DEPENDENCIES = \
191   libgnunetdht.la
192
193 EXTRA_DIST = \
194   $(check_SCRIPTS) \
195   test_dht_api_data.conf \
196   test_dht_api_peer1.conf \
197   test_dht_twopeer_data.conf \
198   test_dht_multipeer_data.conf \
199   test_dht_2dtorus.conf \
200   test_dht_line.conf \
201   multipeer_topo.dat
202
203 check_SCRIPTS = \
204   test_dht_tools.sh