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