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