64c6371a8776188fd4bf1b66a8e02db7335581de
[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 HAVE_MYSQL = 0
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  libgnunet_plugin_dhtlog_dummy.la $(MYSQL_PLUGIN)
26
27 libgnunet_plugin_dhtlog_dummy_la_SOURCES = \
28   plugin_dhtlog_dummy.c
29 libgnunet_plugin_dhtlog_dummy_la_LIBADD = \
30   $(top_builddir)/src/util/libgnunetutil.la \
31   $(XLIB)
32 libgnunet_plugin_dhtlog_dummy_la_LDFLAGS = \
33  $(GN_PLUGIN_LDFLAGS)
34
35 libgnunetdhtlog_la_SOURCES = \
36   dhtlog.c dhtlog.h
37 libgnunetdhtlog_la_LIBADD = \
38   $(top_builddir)/src/util/libgnunetutil.la
39 libgnunetdhtlog_la_LDFLAGS = \
40   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
41   -version-info 0:0:0
42   
43 if HAVE_MYSQL
44 libgnunet_plugin_dhtlog_mysql_la_SOURCES = \
45   plugin_dhtlog_mysql.c
46 libgnunet_plugin_dhtlog_mysql_la_LIBADD = \
47   $(top_builddir)/src/util/libgnunetutil.la \
48   $(XLIB)
49 libgnunet_plugin_dhtlog_mysql_la_LDFLAGS = \
50  $(GN_PLUGIN_LDFLAGS) -lmysqlclient $(ZLIB_LNK)
51 endif 
52
53 libgnunetdht_la_SOURCES = \
54   dht_api.c dht.h
55 libgnunetdht_la_LIBADD = \
56   $(top_builddir)/src/util/libgnunetutil.la \
57   $(XLIB)
58 libgnunetdht_la_LDFLAGS = \
59   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
60   -version-info 0:0:0
61
62 bin_PROGRAMS = \
63  gnunet-service-dht \
64  gnunet-dht-get \
65  gnunet-dht-get-peer \
66  gnunet-dht-put 
67
68 noinst_PROGRAMS = \
69  gnunet-dht-driver
70
71 gnunet_service_dht_SOURCES = \
72  gnunet-service-dht.c         
73 gnunet_service_dht_LDADD = \
74   $(top_builddir)/src/statistics/libgnunetstatistics.la \
75   $(top_builddir)/src/core/libgnunetcore.la \
76   $(top_builddir)/src/transport/libgnunettransport.la \
77   $(top_builddir)/src/hello/libgnunethello.la \
78   $(top_builddir)/src/datacache/libgnunetdatacache.la \
79   $(top_builddir)/src/util/libgnunetutil.la \
80   $(top_builddir)/src/dht/libgnunetdhtlog.la
81
82 gnunet_dht_get_SOURCES = \
83  gnunet-dht-get.c         
84 gnunet_dht_get_LDADD = \
85   $(top_builddir)/src/dht/libgnunetdht.la \
86   $(top_builddir)/src/core/libgnunetcore.la \
87   $(top_builddir)/src/util/libgnunetutil.la 
88
89 gnunet_dht_get_peer_SOURCES = \
90  gnunet-dht-get-peer.c         
91 gnunet_dht_get_peer_LDADD = \
92   $(top_builddir)/src/dht/libgnunetdht.la \
93   $(top_builddir)/src/hello/libgnunethello.la \
94   $(top_builddir)/src/core/libgnunetcore.la \
95   $(top_builddir)/src/util/libgnunetutil.la 
96
97 gnunet_dht_put_SOURCES = \
98  gnunet-dht-put.c         
99 gnunet_dht_put_LDADD = \
100   $(top_builddir)/src/dht/libgnunetdht.la \
101   $(top_builddir)/src/core/libgnunetcore.la \
102   $(top_builddir)/src/util/libgnunetutil.la 
103
104 gnunet_dht_driver_SOURCES = \
105  gnunet-dht-driver.c         
106 gnunet_dht_driver_LDADD = \
107   $(top_builddir)/src/dht/libgnunetdht.la \
108   $(top_builddir)/src/dht/libgnunetdhtlog.la \
109   $(top_builddir)/src/core/libgnunetcore.la \
110   $(top_builddir)/src/testing/libgnunettesting.la \
111   $(top_builddir)/src/util/libgnunetutil.la \
112   $(top_builddir)/src/dht/libgnunetdhtlog.la
113
114 check_PROGRAMS = \
115  test_dht_api \
116  test_dht_twopeer \
117  test_dht_twopeer_put_get \
118  test_dht_multipeer \
119  test_dhtlog
120
121 TESTS = test_dht_api $(check_SCRIPTS) \
122  test_dhtlog \
123  test_dht_twopeer \
124  test_dht_twopeer_put_get
125
126 test_dht_api_SOURCES = \
127  test_dht_api.c
128 test_dht_api_LDADD = \
129  $(top_builddir)/src/util/libgnunetutil.la \
130  $(top_builddir)/src/hello/libgnunethello.la \
131  $(top_builddir)/src/dht/libgnunetdht.la
132
133 test_dht_multipeer_SOURCES = \
134  test_dht_multipeer.c
135 test_dht_multipeer_LDADD = \
136  $(top_builddir)/src/util/libgnunetutil.la \
137  $(top_builddir)/src/testing/libgnunettesting.la \
138  $(top_builddir)/src/dht/libgnunetdht.la  
139
140 test_dht_twopeer_SOURCES = \
141  test_dht_twopeer.c
142 test_dht_twopeer_LDADD = \
143  $(top_builddir)/src/util/libgnunetutil.la \
144  $(top_builddir)/src/testing/libgnunettesting.la \
145  $(top_builddir)/src/dht/libgnunetdht.la    
146
147 test_dht_twopeer_put_get_SOURCES = \
148  test_dht_twopeer_put_get.c
149 test_dht_twopeer_put_get_LDADD = \
150  $(top_builddir)/src/util/libgnunetutil.la \
151  $(top_builddir)/src/testing/libgnunettesting.la \
152  $(top_builddir)/src/dht/libgnunetdht.la   
153
154 test_dhtlog_SOURCES = \
155  test_dhtlog.c
156 test_dhtlog_LDADD = \
157  $(top_builddir)/src/util/libgnunetutil.la \
158  $(top_builddir)/src/testing/libgnunettesting.la \
159  $(top_builddir)/src/dht/libgnunetdht.la \
160  $(top_builddir)/src/dht/libgnunetdhtlog.la
161
162 EXTRA_DIST = \
163   $(check_SCRIPTS) \
164   test_dht_api_data.conf \
165   test_dht_api_peer1.conf \
166   test_dht_twopeer_data.conf \
167   test_dht_multipeer_data.conf
168
169 check_SCRIPTS = \
170   test_dht_tools.sh