check library location as done in configure.ac
[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) $(MYSQL_LDFLAGS) -lmysqlclient $(ZLIB_LNK)
51 libgnunet_plugin_dhtlog_mysql_la_CPPFLAGS = \
52  $(MYSQL_CPPFLAGS) 
53 endif 
54
55 libgnunetdht_la_SOURCES = \
56   dht_api.c dht.h
57 libgnunetdht_la_LIBADD = \
58   $(top_builddir)/src/util/libgnunetutil.la \
59   $(XLIB)
60 libgnunetdht_la_LDFLAGS = \
61   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
62   -version-info 0:0:0
63
64 bin_PROGRAMS = \
65  gnunet-service-dht \
66  gnunet-dht-get \
67  gnunet-dht-get-peer \
68  gnunet-dht-put 
69
70 noinst_PROGRAMS = \
71  gnunet-dht-driver
72
73 gnunet_service_dht_SOURCES = \
74  gnunet-service-dht.c         
75 gnunet_service_dht_LDADD = \
76   $(top_builddir)/src/statistics/libgnunetstatistics.la \
77   $(top_builddir)/src/core/libgnunetcore.la \
78   $(top_builddir)/src/transport/libgnunettransport.la \
79   $(top_builddir)/src/hello/libgnunethello.la \
80   $(top_builddir)/src/datacache/libgnunetdatacache.la \
81   $(top_builddir)/src/util/libgnunetutil.la \
82   $(top_builddir)/src/dht/libgnunetdhtlog.la
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
91 gnunet_dht_get_peer_SOURCES = \
92  gnunet-dht-get-peer.c         
93 gnunet_dht_get_peer_LDADD = \
94   $(top_builddir)/src/dht/libgnunetdht.la \
95   $(top_builddir)/src/hello/libgnunethello.la \
96   $(top_builddir)/src/core/libgnunetcore.la \
97   $(top_builddir)/src/util/libgnunetutil.la 
98
99 gnunet_dht_put_SOURCES = \
100  gnunet-dht-put.c         
101 gnunet_dht_put_LDADD = \
102   $(top_builddir)/src/dht/libgnunetdht.la \
103   $(top_builddir)/src/core/libgnunetcore.la \
104   $(top_builddir)/src/util/libgnunetutil.la 
105
106 gnunet_dht_driver_SOURCES = \
107  gnunet-dht-driver.c         
108 gnunet_dht_driver_LDADD = \
109   $(top_builddir)/src/dht/libgnunetdht.la \
110   $(top_builddir)/src/dht/libgnunetdhtlog.la \
111   $(top_builddir)/src/core/libgnunetcore.la \
112   $(top_builddir)/src/testing/libgnunettesting.la \
113   $(top_builddir)/src/util/libgnunetutil.la \
114   $(top_builddir)/src/dht/libgnunetdhtlog.la
115
116 check_PROGRAMS = \
117  test_dht_api \
118  test_dht_twopeer \
119  test_dht_twopeer_put_get \
120  test_dht_multipeer \
121  test_dhtlog
122
123 TESTS = test_dht_api $(check_SCRIPTS) \
124  test_dhtlog \
125  test_dht_twopeer \
126  test_dht_twopeer_put_get
127
128 test_dht_api_SOURCES = \
129  test_dht_api.c
130 test_dht_api_LDADD = \
131  $(top_builddir)/src/util/libgnunetutil.la \
132  $(top_builddir)/src/hello/libgnunethello.la \
133  $(top_builddir)/src/dht/libgnunetdht.la
134
135 test_dht_multipeer_SOURCES = \
136  test_dht_multipeer.c
137 test_dht_multipeer_LDADD = \
138  $(top_builddir)/src/util/libgnunetutil.la \
139  $(top_builddir)/src/testing/libgnunettesting.la \
140  $(top_builddir)/src/dht/libgnunetdht.la  
141
142 test_dht_twopeer_SOURCES = \
143  test_dht_twopeer.c
144 test_dht_twopeer_LDADD = \
145  $(top_builddir)/src/util/libgnunetutil.la \
146  $(top_builddir)/src/testing/libgnunettesting.la \
147  $(top_builddir)/src/dht/libgnunetdht.la    
148
149 test_dht_twopeer_put_get_SOURCES = \
150  test_dht_twopeer_put_get.c
151 test_dht_twopeer_put_get_LDADD = \
152  $(top_builddir)/src/util/libgnunetutil.la \
153  $(top_builddir)/src/testing/libgnunettesting.la \
154  $(top_builddir)/src/dht/libgnunetdht.la   
155
156 test_dhtlog_SOURCES = \
157  test_dhtlog.c
158 test_dhtlog_LDADD = \
159  $(top_builddir)/src/util/libgnunetutil.la \
160  $(top_builddir)/src/testing/libgnunettesting.la \
161  $(top_builddir)/src/dht/libgnunetdht.la \
162  $(top_builddir)/src/dht/libgnunetdhtlog.la
163
164 EXTRA_DIST = \
165   $(check_SCRIPTS) \
166   test_dht_api_data.conf \
167   test_dht_api_peer1.conf \
168   test_dht_twopeer_data.conf \
169   test_dht_multipeer_data.conf
170
171 check_SCRIPTS = \
172   test_dht_tools.sh