Makefile.am 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. AM_CPPFLAGS = -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. plugindir = $(libdir)/gnunet
  6. pkgcfgdir= $(pkgdatadir)/config.d/
  7. libexecdir= $(pkglibdir)/libexec/
  8. pkgcfg_DATA = \
  9. dht.conf
  10. if USE_COVERAGE
  11. AM_CFLAGS = --coverage -O0
  12. XLIB = -lgcov
  13. endif
  14. lib_LTLIBRARIES = \
  15. libgnunetdht.la
  16. libgnunetdht_la_SOURCES = \
  17. dht_api.c dht.h
  18. libgnunetdht_la_LIBADD = \
  19. $(top_builddir)/src/util/libgnunetutil.la \
  20. $(XLIB) \
  21. $(LTLIBINTL)
  22. libgnunetdht_la_LDFLAGS = \
  23. $(GN_LIB_LDFLAGS) $(WINFLAGS) \
  24. -version-info 2:0:2
  25. plugin_LTLIBRARIES = \
  26. libgnunet_plugin_block_dht.la
  27. libgnunet_plugin_block_dht_la_SOURCES = \
  28. plugin_block_dht.c
  29. libgnunet_plugin_block_dht_la_LIBADD = \
  30. $(top_builddir)/src/hello/libgnunethello.la \
  31. $(top_builddir)/src/block/libgnunetblock.la \
  32. $(top_builddir)/src/util/libgnunetutil.la \
  33. $(LTLIBINTL)
  34. libgnunet_plugin_block_dht_la_LDFLAGS = \
  35. $(GN_PLUGIN_LDFLAGS)
  36. libexec_PROGRAMS = \
  37. gnunet-service-dht \
  38. gnunet-service-dht-xvine
  39. noinst_PROGRAMS = \
  40. gnunet-dht-monitor \
  41. gnunet-dht-get \
  42. gnunet-dht-put \
  43. gnunet-dht-profiler
  44. gnunet_service_dht_SOURCES = \
  45. gnunet-service-dht.c gnunet-service-dht.h \
  46. gnunet-service-dht_clients.c gnunet-service-dht_clients.h \
  47. gnunet-service-dht_datacache.c gnunet-service-dht_datacache.h \
  48. gnunet-service-dht_hello.c gnunet-service-dht_hello.h \
  49. gnunet-service-dht_nse.c gnunet-service-dht_nse.h \
  50. gnunet-service-dht_neighbours.c gnunet-service-dht_neighbours.h \
  51. gnunet-service-dht_routing.c gnunet-service-dht_routing.h
  52. gnunet_service_dht_LDADD = \
  53. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  54. $(top_builddir)/src/core/libgnunetcore.la \
  55. $(top_builddir)/src/nse/libgnunetnse.la \
  56. $(top_builddir)/src/ats/libgnunetats.la \
  57. $(top_builddir)/src/transport/libgnunettransport.la \
  58. $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
  59. $(top_builddir)/src/hello/libgnunethello.la \
  60. $(top_builddir)/src/block/libgnunetblock.la \
  61. $(top_builddir)/src/datacache/libgnunetdatacache.la \
  62. $(top_builddir)/src/util/libgnunetutil.la \
  63. -lm
  64. gnunet_service_dht_xvine_SOURCES = \
  65. gnunet-service-xdht.c gnunet-service-xdht.h \
  66. gnunet-service-xdht_clients.c gnunet-service-xdht_clients.h \
  67. gnunet-service-xdht_datacache.c gnunet-service-xdht_datacache.h \
  68. gnunet-service-xdht_hello.c gnunet-service-xdht_hello.h \
  69. gnunet-service-xdht_nse.c gnunet-service-xdht_nse.h \
  70. gnunet-service-xdht_neighbours.c gnunet-service-xdht_neighbours.h \
  71. gnunet-service-xdht_routing.c gnunet-service-xdht_routing.h
  72. gnunet_service_dht_xvine_LDADD = \
  73. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  74. $(top_builddir)/src/core/libgnunetcore.la \
  75. $(top_builddir)/src/nse/libgnunetnse.la \
  76. $(top_builddir)/src/ats/libgnunetats.la \
  77. $(top_builddir)/src/transport/libgnunettransport.la \
  78. $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
  79. $(top_builddir)/src/hello/libgnunethello.la \
  80. $(top_builddir)/src/block/libgnunetblock.la \
  81. $(top_builddir)/src/datacache/libgnunetdatacache.la \
  82. $(top_builddir)/src/util/libgnunetutil.la \
  83. -lm
  84. gnunet_dht_get_SOURCES = \
  85. gnunet-dht-get.c
  86. gnunet_dht_get_LDADD = \
  87. libgnunetdht.la \
  88. $(top_builddir)/src/core/libgnunetcore.la \
  89. $(top_builddir)/src/util/libgnunetutil.la
  90. gnunet_dht_put_SOURCES = \
  91. gnunet-dht-put.c
  92. gnunet_dht_put_LDADD = \
  93. libgnunetdht.la \
  94. $(top_builddir)/src/core/libgnunetcore.la \
  95. $(top_builddir)/src/util/libgnunetutil.la
  96. gnunet_dht_monitor_SOURCES = \
  97. gnunet-dht-monitor.c
  98. gnunet_dht_monitor_LDADD = \
  99. libgnunetdht.la \
  100. $(top_builddir)/src/core/libgnunetcore.la \
  101. $(top_builddir)/src/util/libgnunetutil.la
  102. gnunet_dht_profiler_SOURCES = \
  103. gnunet_dht_profiler.c
  104. gnunet_dht_profiler_LDADD = \
  105. libgnunetdht.la \
  106. $(top_builddir)/src/core/libgnunetcore.la \
  107. $(top_builddir)/src/util/libgnunetutil.la \
  108. $(top_builddir)/src/testbed/libgnunettestbed.la
  109. if HAVE_TESTING
  110. noinst_LIBRARIES = libgnunetdhttest.a
  111. endif
  112. libgnunetdhttest_a_SOURCES = \
  113. dht_test_lib.c dht_test_lib.h
  114. libgnunetdhttest_a_LIBADD = \
  115. $(top_builddir)/src/util/libgnunetutil.la \
  116. $(top_builddir)/src/testbed/libgnunettestbed.la \
  117. libgnunetdht.la
  118. if HAVE_TESTING
  119. check_PROGRAMS = \
  120. test_dht_api \
  121. test_dht_twopeer \
  122. test_dht_multipeer \
  123. test_dht_line \
  124. test_dht_2dtorus \
  125. test_dht_monitor
  126. endif
  127. if HAVE_EXPERIMENTAL
  128. # These tests still do not work as testbed does
  129. # not support the respective topology op
  130. NEW_TESTS = test_dht_2dtorus test_dht_multipeer
  131. endif
  132. if ENABLE_TEST_RUN
  133. AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
  134. TESTS = test_dht_api $(check_SCRIPTS) \
  135. test_dht_twopeer \
  136. test_dht_line \
  137. test_dht_monitor \
  138. $(NEW_TESTS)
  139. endif
  140. test_dht_api_SOURCES = \
  141. test_dht_api.c
  142. test_dht_api_LDADD = \
  143. $(top_builddir)/src/util/libgnunetutil.la \
  144. $(top_builddir)/src/testing/libgnunettesting.la \
  145. $(top_builddir)/src/hello/libgnunethello.la \
  146. libgnunetdht.la
  147. test_dht_twopeer_SOURCES = \
  148. test_dht_topo.c
  149. test_dht_twopeer_LDADD = \
  150. libgnunetdhttest.a \
  151. $(top_builddir)/src/util/libgnunetutil.la \
  152. libgnunetdhttest.a \
  153. $(top_builddir)/src/testbed/libgnunettestbed.la \
  154. libgnunetdht.la
  155. test_dht_2dtorus_SOURCES = \
  156. test_dht_topo.c
  157. test_dht_2dtorus_LDADD = \
  158. libgnunetdhttest.a \
  159. $(top_builddir)/src/util/libgnunetutil.la \
  160. $(top_builddir)/src/testbed/libgnunettestbed.la \
  161. libgnunetdht.la
  162. test_dht_line_SOURCES = \
  163. test_dht_topo.c
  164. test_dht_line_LDADD = \
  165. libgnunetdhttest.a \
  166. $(top_builddir)/src/util/libgnunetutil.la \
  167. $(top_builddir)/src/testbed/libgnunettestbed.la \
  168. libgnunetdht.la
  169. test_dht_multipeer_SOURCES = \
  170. test_dht_topo.c
  171. test_dht_multipeer_LDADD = \
  172. libgnunetdhttest.a \
  173. $(top_builddir)/src/util/libgnunetutil.la \
  174. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  175. $(top_builddir)/src/testbed/libgnunettestbed.la \
  176. libgnunetdht.la
  177. test_dht_monitor_SOURCES = \
  178. test_dht_monitor.c
  179. test_dht_monitor_LDADD = \
  180. libgnunetdhttest.a \
  181. $(top_builddir)/src/util/libgnunetutil.la \
  182. $(top_builddir)/src/testbed/libgnunettestbed.la \
  183. libgnunetdht.la
  184. EXTRA_DIST = \
  185. $(check_SCRIPTS) \
  186. test_dht_api_data.conf \
  187. test_dht_api_peer1.conf \
  188. test_dht_monitor.conf \
  189. test_dht_multipeer.conf \
  190. test_dht_2dtorus.conf \
  191. test_dht_line.conf \
  192. test_dht_tools.py.in \
  193. test_dht_multipeer_topology.dat
  194. if HAVE_PYTHON
  195. check_SCRIPTS = \
  196. test_dht_tools.py
  197. endif
  198. do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
  199. %.py: %.py.in Makefile
  200. $(do_subst) < $(srcdir)/$< > $@
  201. chmod +x $@
  202. test_dht_tools.py: test_dht_tools.py.in Makefile
  203. $(do_subst) < $(srcdir)/test_dht_tools.py.in > test_dht_tools.py
  204. chmod +x test_dht_tools.py