Makefile.am 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. # This Makefile.am is in the public domain
  2. AM_CPPFLAGS = -I$(top_srcdir)/src/include
  3. if MINGW
  4. WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
  5. endif
  6. if USE_COVERAGE
  7. AM_CFLAGS = --coverage -O0
  8. XLIB = -lgcov
  9. endif
  10. pkgcfgdir= $(pkgdatadir)/config.d/
  11. libexecdir= $(pkglibdir)/libexec/
  12. pkgcfg_DATA = \
  13. rps.conf
  14. bin_PROGRAMS = gnunet-rps
  15. gnunet_rps_SOURCES = \
  16. gnunet-rps.c
  17. gnunet_rps_LDADD = \
  18. libgnunetrps.la \
  19. $(top_builddir)/src/util/libgnunetutil.la \
  20. $(XLIB) $(GN_LIBINTL)
  21. lib_LTLIBRARIES = libgnunetrps.la
  22. libgnunetrps_la_SOURCES = \
  23. gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
  24. rps-test_util.h rps-test_util.c \
  25. rps-sampler_common.h rps-sampler_common.c \
  26. rps-sampler_client.h rps-sampler_client.c \
  27. rps_api.c rps.h
  28. libgnunetrps_la_LIBADD = \
  29. $(top_builddir)/src/util/libgnunetutil.la \
  30. $(GN_LIBINTL) $(XLIB)
  31. libgnunetrps_la_LDFLAGS = \
  32. $(GN_LIB_LDFLAGS) $(WINFLAGS) \
  33. -version-info 0:0:0
  34. # Fix 'created both with libtool and without' error:
  35. libgnunetrps_la_CFLAGS = $(AM_CFLAGS)
  36. libexec_PROGRAMS = \
  37. gnunet-service-rps
  38. if HAVE_TESTING
  39. noinst_PROGRAMS = \
  40. gnunet-rps-profiler
  41. endif
  42. gnunet_service_rps_SOURCES = \
  43. gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
  44. rps-sampler_common.h rps-sampler_common.c \
  45. gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c \
  46. gnunet-service-rps_custommap.h gnunet-service-rps_custommap.c \
  47. gnunet-service-rps_view.h gnunet-service-rps_view.c \
  48. gnunet-service-rps.c
  49. gnunet_service_rps_LDADD = \
  50. libgnunetrps.la \
  51. $(top_builddir)/src/util/libgnunetutil.la \
  52. $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
  53. $(top_builddir)/src/cadet/libgnunetcadet.la \
  54. $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
  55. $(top_builddir)/src/nse/libgnunetnse.la \
  56. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  57. $(top_builddir)/src/core/libgnunetcore.la \
  58. $(LIBGCRYPT_LIBS) \
  59. -lm -lgcrypt \
  60. $(GN_LIBINTL)
  61. if HAVE_TESTING
  62. check_PROGRAMS = \
  63. test_service_rps_view \
  64. test_service_rps_custommap \
  65. test_service_rps_sampler_elem \
  66. test_rps_single_req \
  67. test_rps_req_cancel \
  68. test_rps_sub \
  69. test_rps_seed_request \
  70. test_rps_seed_big \
  71. test_rps_churn
  72. if ENABLE_MALICIOUS
  73. check_PROGRAMS += \
  74. test_rps_malicious_1 \
  75. test_rps_malicious_2 \
  76. test_rps_malicious_3
  77. endif
  78. endif
  79. rps_test_src = \
  80. test_rps.c \
  81. rps-test_util.h rps-test_util.c \
  82. gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
  83. rps-sampler_common.h rps-sampler_common.c \
  84. gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c
  85. ld_rps_test_lib = \
  86. libgnunetrps.la \
  87. $(top_builddir)/src/util/libgnunetutil.la \
  88. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  89. $(top_builddir)/src/testbed/libgnunettestbed.la \
  90. -lm
  91. if ENABLE_TEST_RUN
  92. AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
  93. TESTS = $(check_PROGRAMS)
  94. endif
  95. test_service_rps_view_SOURCES = \
  96. gnunet-service-rps_view.h gnunet-service-rps_view.c \
  97. test_service_rps_view.c
  98. test_service_rps_view_LDADD = $(top_builddir)/src/util/libgnunetutil.la
  99. test_service_rps_custommap_SOURCES = \
  100. gnunet-service-rps_custommap.h gnunet-service-rps_custommap.c \
  101. test_service_rps_custommap.c
  102. test_service_rps_custommap_LDADD = \
  103. $(top_builddir)/src/util/libgnunetutil.la
  104. test_service_rps_sampler_elem_SOURCES = \
  105. gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
  106. rps-test_util.h rps-test_util.c \
  107. test_service_rps_sampler_elem.c
  108. test_service_rps_sampler_elem_LDADD = $(top_builddir)/src/util/libgnunetutil.la
  109. test_rps_single_req_SOURCES = $(rps_test_src)
  110. test_rps_single_req_LDADD = $(ld_rps_test_lib)
  111. test_rps_seed_request_SOURCES = $(rps_test_src)
  112. test_rps_seed_request_LDADD = $(ld_rps_test_lib)
  113. test_rps_req_cancel_SOURCES = $(rps_test_src)
  114. test_rps_req_cancel_LDADD = $(ld_rps_test_lib)
  115. test_rps_sub_SOURCES = $(rps_test_src)
  116. test_rps_sub_LDADD = $(ld_rps_test_lib)
  117. test_rps_seed_big_SOURCES = $(rps_test_src)
  118. test_rps_seed_big_LDADD = $(ld_rps_test_lib)
  119. test_rps_churn_SOURCES = $(rps_test_src)
  120. test_rps_churn_LDADD = $(ld_rps_test_lib)
  121. test_rps_malicious_1_SOURCES = $(rps_test_src)
  122. test_rps_malicious_1_LDADD = $(ld_rps_test_lib)
  123. test_rps_malicious_2_SOURCES = $(rps_test_src)
  124. test_rps_malicious_2_LDADD = $(ld_rps_test_lib)
  125. test_rps_malicious_3_SOURCES = $(rps_test_src)
  126. test_rps_malicious_3_LDADD = $(ld_rps_test_lib)
  127. gnunet_rps_profiler_SOURCES = \
  128. gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
  129. rps-sampler_common.h rps-sampler_common.c \
  130. gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c \
  131. rps-test_util.h rps-test_util.c \
  132. gnunet-rps-profiler.c
  133. gnunet_rps_profiler_LDADD = \
  134. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  135. libgnunetrps.la \
  136. $(top_builddir)/src/util/libgnunetutil.la \
  137. $(top_builddir)/src/testbed/libgnunettestbed.la \
  138. -lm
  139. EXTRA_DIST = \
  140. test_rps.conf