592d6ea52341d95c2378f18e8662183dc1da0cf6
[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  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 if HAVE_MYSQL
36 libgnunet_plugin_dhtlog_mysql_la_SOURCES = \
37   plugin_dhtlog_mysql.c
38 libgnunet_plugin_dhtlog_mysql_la_LIBADD = \
39   $(top_builddir)/src/util/libgnunetutil.la \
40   $(XLIB)
41 libgnunet_plugin_dhtlog_mysql_la_LDFLAGS = \
42  $(GN_PLUGIN_LDFLAGS) -lmysqlclient $(ZLIB_LNK)
43 endif 
44  
45 libgnunetdhtlog_la_SOURCES = \
46   dhtlog.c dhtlog.h
47 libgnunetdhtlog_la_LIBADD = \
48   $(top_builddir)/src/util/libgnunetutil.la
49 libgnunetdhtlog_la_LDFLAGS = \
50   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
51   -version-info 0:0:0
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
123 test_dht_api_SOURCES = \
124  test_dht_api.c
125 test_dht_api_LDADD = \
126  $(top_builddir)/src/util/libgnunetutil.la \
127  $(top_builddir)/src/hello/libgnunethello.la \
128  $(top_builddir)/src/dht/libgnunetdht.la
129
130 test_dht_multipeer_SOURCES = \
131  test_dht_multipeer.c
132 test_dht_multipeer_LDADD = \
133  $(top_builddir)/src/util/libgnunetutil.la \
134  $(top_builddir)/src/testing/libgnunettesting.la \
135  $(top_builddir)/src/dht/libgnunetdht.la  
136
137 test_dht_twopeer_SOURCES = \
138  test_dht_twopeer.c
139 test_dht_twopeer_LDADD = \
140  $(top_builddir)/src/util/libgnunetutil.la \
141  $(top_builddir)/src/testing/libgnunettesting.la \
142  $(top_builddir)/src/dht/libgnunetdht.la    
143
144 test_dht_twopeer_put_get_SOURCES = \
145  test_dht_twopeer_put_get.c
146 test_dht_twopeer_put_get_LDADD = \
147  $(top_builddir)/src/util/libgnunetutil.la \
148  $(top_builddir)/src/testing/libgnunettesting.la \
149  $(top_builddir)/src/dht/libgnunetdht.la   
150
151 #test_dhtlog_SOURCES = \
152 # test_dhtlog.c
153 #test_dhtlog_LDADD = \
154 # $(top_builddir)/src/util/libgnunetutil.la \
155 # $(top_builddir)/src/testing/libgnunettesting.la \
156 # $(top_builddir)/src/dht/libgnunetdht.la \
157 # $(top_builddir)/src/dht/libgnunetdhtlog.la
158
159 EXTRA_DIST = \
160   $(check_SCRIPTS) \
161   test_dht_api_data.conf \
162   test_dht_api_peer1.conf \
163   test_dht_twopeer_data.conf \
164   test_dht_multipeer_data.conf
165
166 check_SCRIPTS = \
167   test_dht_tools.sh