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