de892070123eed4d6904bf66d3288ef4da507444
[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_MYSQL
9  MYSQL_PLUGIN = libgnunet_plugin_dhtlog_mysql.la
10 endif
11
12 if HAVE_ZLIB
13  ZLIB_LNK = -lz
14 endif
15
16 if USE_COVERAGE
17   AM_CFLAGS = --coverage -O0
18   XLIB = -lgcov
19 endif
20
21 lib_LTLIBRARIES = libgnunetdht.la \
22  libgnunetdhtlog.la
23
24 plugin_LTLIBRARIES = \
25  $(MYSQL_PLUGIN) \
26  libgnunet_plugin_dhtlog_dummy.la \
27  libgnunet_plugin_dhtlog_mysql_dump.la \
28  libgnunet_plugin_dhtlog_mysql_dump_load.la  
29
30
31 libgnunet_plugin_dhtlog_mysql_la_SOURCES = \
32   plugin_dhtlog_mysql.c
33 libgnunet_plugin_dhtlog_mysql_la_LIBADD = \
34   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lz -lsqlite3
35 libgnunet_plugin_dhtlog_mysql_la_LDFLAGS = \
36  $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient
37 libgnunet_plugin_dhtlog_mysql_la_CPFLAGS = \
38  $(MYSQL_CPPFLAGS)
39
40 libgnunet_plugin_dhtlog_dummy_la_SOURCES = \
41   plugin_dhtlog_dummy.c
42 libgnunet_plugin_dhtlog_dummy_la_LIBADD = \
43   $(top_builddir)/src/util/libgnunetutil.la \
44   $(XLIB)
45 libgnunet_plugin_dhtlog_dummy_la_LDFLAGS = \
46  $(GN_PLUGIN_LDFLAGS)
47
48 libgnunet_plugin_dhtlog_mysql_dump_la_SOURCES = \
49   plugin_dhtlog_mysql_dump.c
50 libgnunet_plugin_dhtlog_mysql_dump_la_LIBADD = \
51   $(top_builddir)/src/util/libgnunetutil.la \
52   $(XLIB)
53 libgnunet_plugin_dhtlog_mysql_dump_la_LDFLAGS = \
54  $(GN_PLUGIN_LDFLAGS)
55
56 libgnunet_plugin_dhtlog_mysql_dump_load_la_SOURCES = \
57   plugin_dhtlog_mysql_dump_load.c
58 libgnunet_plugin_dhtlog_mysql_dump_load_la_LIBADD = \
59   $(top_builddir)/src/util/libgnunetutil.la \
60   $(XLIB)
61 libgnunet_plugin_dhtlog_mysql_dump_load_la_LDFLAGS = \
62  $(GN_PLUGIN_LDFLAGS)
63
64 libgnunetdhtlog_la_SOURCES = \
65   dhtlog.c dhtlog.h
66 libgnunetdhtlog_la_LIBADD = \
67   $(top_builddir)/src/util/libgnunetutil.la
68 libgnunetdhtlog_la_LDFLAGS = \
69   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
70   -version-info 0:0:0
71
72 libgnunetdht_la_SOURCES = \
73   dht_api.c dht.h \
74   dht_api_get_put.c \
75   dht_api_find_peer.c 
76 libgnunetdht_la_LIBADD = \
77   $(top_builddir)/src/util/libgnunetutil.la \
78   $(XLIB)
79 libgnunetdht_la_LDFLAGS = \
80   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
81   -version-info 0:0:0
82
83 bin_PROGRAMS = $(STUD_PROGS) \
84  gnunet-service-dht \
85  gnunet-dht-get \
86  gnunet-dht-get-peer \
87  gnunet-dht-put 
88
89 if HAVE_MALICIOUS
90 noinst_PROGRAMS = \
91  gnunet-dht-driver 
92 endif
93
94 gnunet_service_dht_SOURCES = \
95  gnunet-service-dht.c         
96 gnunet_service_dht_LDADD = \
97   $(top_builddir)/src/statistics/libgnunetstatistics.la \
98   $(top_builddir)/src/core/libgnunetcore.la \
99   $(top_builddir)/src/transport/libgnunettransport.la \
100   $(top_builddir)/src/hello/libgnunethello.la \
101   $(top_builddir)/src/block/libgnunetblock.la \
102   $(top_builddir)/src/datacache/libgnunetdatacache.la \
103   $(top_builddir)/src/util/libgnunetutil.la \
104   $(top_builddir)/src/dht/libgnunetdhtlog.la -lm
105
106 gnunet_dht_get_SOURCES = \
107  gnunet-dht-get.c         
108 gnunet_dht_get_LDADD = \
109   $(top_builddir)/src/dht/libgnunetdht.la \
110   $(top_builddir)/src/core/libgnunetcore.la \
111   $(top_builddir)/src/util/libgnunetutil.la 
112
113 gnunet_dht_get_peer_SOURCES = \
114  gnunet-dht-get-peer.c         
115 gnunet_dht_get_peer_LDADD = \
116   $(top_builddir)/src/dht/libgnunetdht.la \
117   $(top_builddir)/src/hello/libgnunethello.la \
118   $(top_builddir)/src/core/libgnunetcore.la \
119   $(top_builddir)/src/util/libgnunetutil.la 
120
121 gnunet_dht_put_SOURCES = \
122  gnunet-dht-put.c         
123 gnunet_dht_put_LDADD = \
124   $(top_builddir)/src/dht/libgnunetdht.la \
125   $(top_builddir)/src/core/libgnunetcore.la \
126   $(top_builddir)/src/util/libgnunetutil.la 
127
128 gnunet_dht_driver_SOURCES = \
129  gnunet-dht-driver.c         
130 gnunet_dht_driver_LDADD = \
131   $(top_builddir)/src/dht/libgnunetdht.la \
132   $(top_builddir)/src/dht/libgnunetdhtlog.la \
133   $(top_builddir)/src/core/libgnunetcore.la \
134   $(top_builddir)/src/testing/libgnunettesting.la \
135   $(top_builddir)/src/util/libgnunetutil.la \
136   $(top_builddir)/src/dht/libgnunetdhtlog.la
137
138 check_PROGRAMS = $(STUD_TESTS) \
139  test_dht_api \
140  test_dht_twopeer \
141  test_dht_twopeer_put_get \
142  test_dht_multipeer \
143  test_dhtlog 
144 # test_hash_operations
145
146 if !DISABLE_TEST_RUN
147 TESTS = test_dht_api $(check_SCRIPTS) \
148  test_dht_twopeer \
149  test_dht_twopeer_put_get
150 endif
151
152 test_dht_api_SOURCES = \
153  test_dht_api.c
154 test_dht_api_LDADD = \
155  $(top_builddir)/src/util/libgnunetutil.la \
156  $(top_builddir)/src/hello/libgnunethello.la \
157  $(top_builddir)/src/dht/libgnunetdht.la
158
159 test_dht_multipeer_SOURCES = \
160  test_dht_multipeer.c
161 test_dht_multipeer_LDADD = \
162  $(top_builddir)/src/util/libgnunetutil.la \
163  $(top_builddir)/src/testing/libgnunettesting.la \
164  $(top_builddir)/src/dht/libgnunetdht.la  
165  
166 #test_hash_operations_SOURCES = \
167 # test_hash_operations.c
168 #test_hash_operations_LDADD = \
169 # $(top_builddir)/src/util/libgnunetutil.la \
170 # $(top_builddir)/src/testing/libgnunettesting.la \
171 # $(top_builddir)/src/dht/libgnunetdht.la 
172
173 test_dht_twopeer_SOURCES = \
174  test_dht_twopeer.c
175 test_dht_twopeer_LDADD = \
176  $(top_builddir)/src/util/libgnunetutil.la \
177  $(top_builddir)/src/testing/libgnunettesting.la \
178  $(top_builddir)/src/dht/libgnunetdht.la    
179
180 test_dht_twopeer_put_get_SOURCES = \
181  test_dht_twopeer_put_get.c
182 test_dht_twopeer_put_get_LDADD = \
183  $(top_builddir)/src/util/libgnunetutil.la \
184  $(top_builddir)/src/testing/libgnunettesting.la \
185  $(top_builddir)/src/dht/libgnunetdht.la   
186
187 test_dhtlog_SOURCES = \
188  test_dhtlog.c
189 test_dhtlog_LDADD = \
190  $(top_builddir)/src/util/libgnunetutil.la \
191  $(top_builddir)/src/testing/libgnunettesting.la \
192  $(top_builddir)/src/dht/libgnunetdht.la \
193  $(top_builddir)/src/dht/libgnunetdhtlog.la
194
195 EXTRA_DIST = \
196   $(check_SCRIPTS) \
197   test_dht_api_data.conf \
198   test_dht_api_peer1.conf \
199   test_dht_twopeer_data.conf \
200   test_dht_multipeer_data.conf
201
202 check_SCRIPTS = \
203   test_dht_tools.sh