6a8ce280ac43220ca0ef5151b86093798856dc43
[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 if HAVE_ZLIB
9  ZLIB_LNK = -lz
10 endif
11
12 if USE_COVERAGE
13   AM_CFLAGS = --coverage -O0
14   XLIB = -lgcov
15 endif
16
17 lib_LTLIBRARIES = \
18  libgnunetdht.la 
19
20
21 libgnunetdht_la_SOURCES = \
22   dht_api.c dht.h 
23 libgnunetdht_la_LIBADD = \
24   $(top_builddir)/src/util/libgnunetutil.la \
25   $(XLIB)
26 libgnunetdht_la_LDFLAGS = \
27   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
28   -version-info 0:0:0
29
30 bin_PROGRAMS = \
31  gnunet-service-dht \
32  gnunet-dht-get \
33  gnunet-dht-put
34
35 gnunet_service_dht_SOURCES = \
36  gnunet-service-dht.c gnunet-service-dht.h \
37  gnunet-service-dht_clients.c gnunet-service-dht_clients.h \
38  gnunet-service-dht_datacache.c gnunet-service-dht_datacache.h \
39  gnunet-service-dht_hello.c gnunet-service-dht_hello.h \
40  gnunet-service-dht_nse.c gnunet-service-dht_nse.h \
41  gnunet-service-dht_neighbours.c gnunet-service-dht_neighbours.h \
42  gnunet-service-dht_routing.c gnunet-service-dht_routing.h 
43 gnunet_service_dht_LDADD = \
44   $(top_builddir)/src/statistics/libgnunetstatistics.la \
45   $(top_builddir)/src/core/libgnunetcore.la \
46   $(top_builddir)/src/nse/libgnunetnse.la \
47   $(top_builddir)/src/ats/libgnunetats.la \
48   $(top_builddir)/src/transport/libgnunettransport.la \
49   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
50   $(top_builddir)/src/hello/libgnunethello.la \
51   $(top_builddir)/src/block/libgnunetblock.la \
52   $(top_builddir)/src/datacache/libgnunetdatacache.la \
53   $(top_builddir)/src/util/libgnunetutil.la \
54   -lm
55
56 gnunet_dht_get_SOURCES = \
57  gnunet-dht-get.c         
58 gnunet_dht_get_LDADD = \
59   $(top_builddir)/src/dht/libgnunetdht.la \
60   $(top_builddir)/src/core/libgnunetcore.la \
61   $(top_builddir)/src/util/libgnunetutil.la 
62 gnunet_dht_get_DEPENDENCIES = \
63   libgnunetdht.la                             
64
65 gnunet_dht_put_SOURCES = \
66  gnunet-dht-put.c         
67 gnunet_dht_put_LDADD = \
68   $(top_builddir)/src/dht/libgnunetdht.la \
69   $(top_builddir)/src/core/libgnunetcore.la \
70   $(top_builddir)/src/util/libgnunetutil.la 
71 gnunet_dht_put_DEPENDENCIES = \
72   libgnunetdht.la                             
73
74 check_PROGRAMS = \
75  test_dht_api \
76  test_dht_twopeer \
77  test_dht_twopeer_put_get \
78  test_dht_twopeer_get_put \
79  test_dht_twopeer_path_tracking \
80  test_dht_multipeer \
81  test_dht_2dtorus \
82  test_dht_2dtorus_far
83
84 if ENABLE_TEST_RUN
85 TESTS = test_dht_api $(check_SCRIPTS) \
86  test_dht_twopeer \
87  test_dht_twopeer_put_get \
88  test_dht_twopeer_get_put \
89  test_dht_twopeer_path_tracking \
90  test_dht_multipeer  \
91  test_dht_2dtorus \
92  test_dht_2dtorus_far
93 endif
94
95 test_dht_api_SOURCES = \
96  test_dht_api.c
97 test_dht_api_LDADD = \
98  $(top_builddir)/src/util/libgnunetutil.la \
99  $(top_builddir)/src/hello/libgnunethello.la \
100  $(top_builddir)/src/dht/libgnunetdht.la
101 test_dht_api_DEPENDENCIES = \
102   libgnunetdht.la                           
103
104 test_dht_twopeer_SOURCES = \
105  test_dht_twopeer.c
106 test_dht_twopeer_LDADD = \
107  $(top_builddir)/src/util/libgnunetutil.la \
108  $(top_builddir)/src/testing/libgnunettesting.la \
109  $(top_builddir)/src/dht/libgnunetdht.la    
110 test_dht_twopeer_DEPENDENCIES = \
111   libgnunetdht.la                           
112
113 test_dht_twopeer_put_get_SOURCES = \
114  test_dht_twopeer_put_get.c
115 test_dht_twopeer_put_get_LDADD = \
116  $(top_builddir)/src/util/libgnunetutil.la \
117  $(top_builddir)/src/testing/libgnunettesting.la \
118  $(top_builddir)/src/dht/libgnunetdht.la   
119
120 test_dht_twopeer_get_put_SOURCES = \
121  test_dht_twopeer_get_put.c
122 test_dht_twopeer_get_put_LDADD = \
123  $(top_builddir)/src/util/libgnunetutil.la \
124  $(top_builddir)/src/testing/libgnunettesting.la \
125  $(top_builddir)/src/dht/libgnunetdht.la   
126
127 test_dht_twopeer_path_tracking_SOURCES = \
128  test_dht_twopeer_path_tracking.c
129 test_dht_twopeer_path_tracking_LDADD = \
130  $(top_builddir)/src/util/libgnunetutil.la \
131  $(top_builddir)/src/testing/libgnunettesting.la \
132  $(top_builddir)/src/dht/libgnunetdht.la   
133
134 test_dht_multipeer_SOURCES = \
135  test_dht_multipeer.c
136 test_dht_multipeer_LDADD = \
137  $(top_builddir)/src/util/libgnunetutil.la \
138  $(top_builddir)/src/statistics/libgnunetstatistics.la \
139  $(top_builddir)/src/testing/libgnunettesting.la \
140  $(top_builddir)/src/dht/libgnunetdht.la  
141 test_dht_multipeer_DEPENDENCIES = \
142   libgnunetdht.la                           
143
144 test_dht_2dtorus_SOURCES = \
145  test_dht_2dtorus.c
146 test_dht_2dtorus_LDADD = \
147  $(top_builddir)/src/util/libgnunetutil.la \
148  $(top_builddir)/src/testing/libgnunettesting.la \
149  $(top_builddir)/src/dht/libgnunetdht.la
150 test_dht_2dtorus_DEPENDENCIES = \
151   libgnunetdht.la
152
153 test_dht_2dtorus_far_SOURCES = \
154  test_dht_2dtorus.c
155 test_dht_2dtorus_far_LDADD = \
156  $(top_builddir)/src/util/libgnunetutil.la \
157  $(top_builddir)/src/testing/libgnunettesting.la \
158  $(top_builddir)/src/dht/libgnunetdht.la
159 test_dht_2dtorus_far_DEPENDENCIES = \
160   libgnunetdht.la
161
162
163 EXTRA_DIST = \
164   $(check_SCRIPTS) \
165   test_dht_api_data.conf \
166   test_dht_api_peer1.conf \
167   test_dht_twopeer_data.conf \
168   test_dht_multipeer_data.conf \
169   test_dht_2dtorus.conf \
170   multipeer_topo.dat
171
172 check_SCRIPTS = \
173   test_dht_tools.sh