pythonize test_dht_tools
[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   $(LTLIBINTL)
31 libgnunetdht_la_LDFLAGS = \
32   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
33   -version-info 1:0:1
34
35
36 plugin_LTLIBRARIES = \
37   libgnunet_plugin_block_dht.la 
38
39 libgnunet_plugin_block_dht_la_SOURCES = \
40   plugin_block_dht.c
41 libgnunet_plugin_block_dht_la_LIBADD = \
42   $(top_builddir)/src/hello/libgnunethello.la \
43   $(top_builddir)/src/block/libgnunetblock.la \
44   $(top_builddir)/src/util/libgnunetutil.la \
45   $(LTLIBINTL)
46 libgnunet_plugin_block_dht_la_LDFLAGS = \
47  $(GN_PLUGIN_LDFLAGS)
48 libgnunet_plugin_block_dht_la_DEPENDENCIES = \
49   $(top_builddir)/src/block/libgnunetblock.la 
50
51
52
53 bin_PROGRAMS = \
54  gnunet-service-dht \
55  gnunet-dht-monitor \
56  gnunet-dht-get \
57  gnunet-dht-put
58
59 gnunet_service_dht_SOURCES = \
60  gnunet-service-dht.c gnunet-service-dht.h \
61  gnunet-service-dht_clients.c gnunet-service-dht_clients.h \
62  gnunet-service-dht_datacache.c gnunet-service-dht_datacache.h \
63  gnunet-service-dht_hello.c gnunet-service-dht_hello.h \
64  gnunet-service-dht_nse.c gnunet-service-dht_nse.h \
65  gnunet-service-dht_neighbours.c gnunet-service-dht_neighbours.h \
66  gnunet-service-dht_routing.c gnunet-service-dht_routing.h 
67 gnunet_service_dht_LDADD = \
68   $(top_builddir)/src/statistics/libgnunetstatistics.la \
69   $(top_builddir)/src/core/libgnunetcore.la \
70   $(top_builddir)/src/nse/libgnunetnse.la \
71   $(top_builddir)/src/ats/libgnunetats.la \
72   $(top_builddir)/src/transport/libgnunettransport.la \
73   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
74   $(top_builddir)/src/hello/libgnunethello.la \
75   $(top_builddir)/src/block/libgnunetblock.la \
76   $(top_builddir)/src/datacache/libgnunetdatacache.la \
77   $(top_builddir)/src/util/libgnunetutil.la \
78   -lm
79
80 gnunet_dht_get_SOURCES = \
81  gnunet-dht-get.c         
82 gnunet_dht_get_LDADD = \
83   $(top_builddir)/src/dht/libgnunetdht.la \
84   $(top_builddir)/src/core/libgnunetcore.la \
85   $(top_builddir)/src/util/libgnunetutil.la 
86 gnunet_dht_get_DEPENDENCIES = \
87   libgnunetdht.la                             
88
89 gnunet_dht_put_SOURCES = \
90  gnunet-dht-put.c         
91 gnunet_dht_put_LDADD = \
92   $(top_builddir)/src/dht/libgnunetdht.la \
93   $(top_builddir)/src/core/libgnunetcore.la \
94   $(top_builddir)/src/util/libgnunetutil.la 
95 gnunet_dht_put_DEPENDENCIES = \
96   libgnunetdht.la                             
97
98 gnunet_dht_monitor_SOURCES = \
99  gnunet-dht-monitor.c         
100 gnunet_dht_monitor_LDADD = \
101   $(top_builddir)/src/dht/libgnunetdht.la \
102   $(top_builddir)/src/core/libgnunetcore.la \
103   $(top_builddir)/src/util/libgnunetutil.la 
104 gnunet_dht_monitor_DEPENDENCIES = \
105   libgnunetdht.la                             
106
107
108 check_PROGRAMS = \
109  test_dht_api \
110  test_dht_twopeer \
111  test_dht_twopeer_put_get \
112  test_dht_twopeer_get_put \
113  test_dht_twopeer_path_tracking \
114  test_dht_multipeer \
115  test_dht_line \
116  test_dht_2dtorus \
117  test_dht_monitor
118
119 if ENABLE_TEST_RUN
120 TESTS = test_dht_api $(check_SCRIPTS) \
121  test_dht_twopeer \
122  test_dht_twopeer_put_get \
123  test_dht_twopeer_get_put \
124  test_dht_twopeer_path_tracking \
125  test_dht_multipeer  \
126  test_dht_line \
127  test_dht_2dtorus \
128  test_dht_monitor
129 endif
130
131 test_dht_api_SOURCES = \
132  test_dht_api.c
133 test_dht_api_LDADD = \
134  $(top_builddir)/src/util/libgnunetutil.la \
135  $(top_builddir)/src/testing/libgnunettesting.la \
136  $(top_builddir)/src/hello/libgnunethello.la \
137  $(top_builddir)/src/dht/libgnunetdht.la
138 test_dht_api_DEPENDENCIES = \
139   libgnunetdht.la                           
140
141 test_dht_twopeer_SOURCES = \
142  test_dht_twopeer.c
143 test_dht_twopeer_LDADD = \
144  $(top_builddir)/src/util/libgnunetutil.la \
145  $(top_builddir)/src/testing_old/libgnunettesting_old.la \
146  $(top_builddir)/src/dht/libgnunetdht.la    
147 test_dht_twopeer_DEPENDENCIES = \
148   libgnunetdht.la                           
149
150 test_dht_twopeer_put_get_SOURCES = \
151  test_dht_twopeer_put_get.c
152 test_dht_twopeer_put_get_LDADD = \
153  $(top_builddir)/src/util/libgnunetutil.la \
154  $(top_builddir)/src/testing_old/libgnunettesting_old.la \
155  $(top_builddir)/src/dht/libgnunetdht.la   
156
157 test_dht_twopeer_get_put_SOURCES = \
158  test_dht_twopeer_get_put.c
159 test_dht_twopeer_get_put_LDADD = \
160  $(top_builddir)/src/util/libgnunetutil.la \
161  $(top_builddir)/src/testing_old/libgnunettesting_old.la \
162  $(top_builddir)/src/dht/libgnunetdht.la   
163
164 test_dht_twopeer_path_tracking_SOURCES = \
165  test_dht_twopeer_path_tracking.c
166 test_dht_twopeer_path_tracking_LDADD = \
167  $(top_builddir)/src/util/libgnunetutil.la \
168  $(top_builddir)/src/testing_old/libgnunettesting_old.la \
169  $(top_builddir)/src/dht/libgnunetdht.la   
170
171 test_dht_multipeer_SOURCES = \
172  test_dht_multipeer.c
173 test_dht_multipeer_LDADD = \
174  $(top_builddir)/src/util/libgnunetutil.la \
175  $(top_builddir)/src/statistics/libgnunetstatistics.la \
176  $(top_builddir)/src/testing_old/libgnunettesting_old.la \
177  $(top_builddir)/src/dht/libgnunetdht.la  
178 test_dht_multipeer_DEPENDENCIES = \
179   libgnunetdht.la                           
180
181 test_dht_2dtorus_SOURCES = \
182  test_dht_topo.c
183 test_dht_2dtorus_LDADD = \
184  $(top_builddir)/src/util/libgnunetutil.la \
185  $(top_builddir)/src/testing_old/libgnunettesting_old.la \
186  $(top_builddir)/src/dht/libgnunetdht.la
187 test_dht_2dtorus_DEPENDENCIES = \
188   libgnunetdht.la
189
190 test_dht_line_SOURCES = \
191  test_dht_topo.c
192 test_dht_line_LDADD = \
193  $(top_builddir)/src/util/libgnunetutil.la \
194  $(top_builddir)/src/testing_old/libgnunettesting_old.la \
195  $(top_builddir)/src/dht/libgnunetdht.la
196 test_dht_line_DEPENDENCIES = \
197   libgnunetdht.la
198
199 test_dht_monitor_SOURCES = test_dht_monitor.c
200 test_dht_monitor_LDADD = \
201  $(top_builddir)/src/util/libgnunetutil.la \
202  $(top_builddir)/src/testing_old/libgnunettesting_old.la \
203  $(top_builddir)/src/dht/libgnunetdht.la
204 test_dht_monitor_DEPENDENCIES = \
205   libgnunetdht.la
206
207 EXTRA_DIST = \
208   $(check_SCRIPTS) \
209   test_dht_api_data.conf \
210   test_dht_api_peer1.conf \
211   test_dht_twopeer_data.conf \
212   test_dht_multipeer_data.conf \
213   test_dht_2dtorus.conf \
214   test_dht_line.conf \
215   test_dht_tools.py.in \
216   multipeer_topo.dat
217
218 check_SCRIPTS = \
219   test_dht_tools.py
220
221 do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
222
223 %.py: %.py.in Makefile
224         $(do_subst) < $(srcdir)/$< > $@
225         chmod +x $@
226
227 test_dht_tools.py: test_dht_tools.py.in Makefile
228         $(do_subst) < $(srcdir)/test_dht_tools.py.in > test_dht_tools.py
229         chmod +x test_dht_tools.py