Makefile.am 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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/nse/libgnunetnse.la \
  30. $(top_builddir)/src/util/libgnunetutil.la \
  31. $(GN_LIBINTL) $(XLIB)
  32. libgnunetrps_la_LDFLAGS = \
  33. $(GN_LIB_LDFLAGS) $(WINFLAGS) \
  34. -version-info 0:0:0
  35. # Fix 'created both with libtool and without' error:
  36. libgnunetrps_la_CFLAGS = $(AM_CFLAGS)
  37. libexec_PROGRAMS = \
  38. gnunet-service-rps
  39. if HAVE_TESTING
  40. noinst_PROGRAMS = \
  41. gnunet-rps-profiler
  42. endif
  43. gnunet_service_rps_SOURCES = \
  44. gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
  45. rps-sampler_common.h rps-sampler_common.c \
  46. gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c \
  47. gnunet-service-rps_custommap.h gnunet-service-rps_custommap.c \
  48. gnunet-service-rps_view.h gnunet-service-rps_view.c \
  49. gnunet-service-rps.c
  50. gnunet_service_rps_LDADD = \
  51. libgnunetrps.la \
  52. $(top_builddir)/src/util/libgnunetutil.la \
  53. $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
  54. $(top_builddir)/src/cadet/libgnunetcadet.la \
  55. $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
  56. $(top_builddir)/src/nse/libgnunetnse.la \
  57. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  58. $(top_builddir)/src/core/libgnunetcore.la \
  59. $(LIBGCRYPT_LIBS) \
  60. -lm -lgcrypt \
  61. $(GN_LIBINTL)
  62. if HAVE_TESTING
  63. check_PROGRAMS = \
  64. test_service_rps_view \
  65. test_service_rps_custommap \
  66. test_service_rps_sampler_elem \
  67. test_rps_single_req \
  68. test_rps_req_cancel \
  69. test_rps_sub \
  70. test_rps_seed_request \
  71. test_rps_seed_big \
  72. test_rps_churn
  73. if ENABLE_MALICIOUS
  74. check_PROGRAMS += \
  75. test_rps_malicious_1 \
  76. test_rps_malicious_2 \
  77. test_rps_malicious_3
  78. endif
  79. endif
  80. rps_test_src = \
  81. test_rps.c \
  82. rps-test_util.h rps-test_util.c \
  83. gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
  84. rps-sampler_common.h rps-sampler_common.c \
  85. gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c
  86. ld_rps_test_lib = \
  87. libgnunetrps.la \
  88. $(top_builddir)/src/util/libgnunetutil.la \
  89. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  90. $(top_builddir)/src/testbed/libgnunettestbed.la \
  91. -lm
  92. if ENABLE_TEST_RUN
  93. AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
  94. TESTS = $(check_PROGRAMS)
  95. endif
  96. test_service_rps_view_SOURCES = \
  97. gnunet-service-rps_view.h gnunet-service-rps_view.c \
  98. test_service_rps_view.c
  99. test_service_rps_view_LDADD = $(top_builddir)/src/util/libgnunetutil.la
  100. test_service_rps_custommap_SOURCES = \
  101. gnunet-service-rps_custommap.h gnunet-service-rps_custommap.c \
  102. test_service_rps_custommap.c
  103. test_service_rps_custommap_LDADD = \
  104. $(top_builddir)/src/util/libgnunetutil.la
  105. test_service_rps_sampler_elem_SOURCES = \
  106. gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
  107. rps-test_util.h rps-test_util.c \
  108. test_service_rps_sampler_elem.c
  109. test_service_rps_sampler_elem_LDADD = $(top_builddir)/src/util/libgnunetutil.la
  110. test_rps_single_req_SOURCES = $(rps_test_src)
  111. test_rps_single_req_LDADD = $(ld_rps_test_lib)
  112. test_rps_seed_request_SOURCES = $(rps_test_src)
  113. test_rps_seed_request_LDADD = $(ld_rps_test_lib)
  114. test_rps_req_cancel_SOURCES = $(rps_test_src)
  115. test_rps_req_cancel_LDADD = $(ld_rps_test_lib)
  116. test_rps_sub_SOURCES = $(rps_test_src)
  117. test_rps_sub_LDADD = $(ld_rps_test_lib)
  118. test_rps_seed_big_SOURCES = $(rps_test_src)
  119. test_rps_seed_big_LDADD = $(ld_rps_test_lib)
  120. test_rps_churn_SOURCES = $(rps_test_src)
  121. test_rps_churn_LDADD = $(ld_rps_test_lib)
  122. test_rps_malicious_1_SOURCES = $(rps_test_src)
  123. test_rps_malicious_1_LDADD = $(ld_rps_test_lib)
  124. test_rps_malicious_2_SOURCES = $(rps_test_src)
  125. test_rps_malicious_2_LDADD = $(ld_rps_test_lib)
  126. test_rps_malicious_3_SOURCES = $(rps_test_src)
  127. test_rps_malicious_3_LDADD = $(ld_rps_test_lib)
  128. gnunet_rps_profiler_SOURCES = \
  129. gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
  130. rps-sampler_common.h rps-sampler_common.c \
  131. gnunet-service-rps_sampler.h gnunet-service-rps_sampler.c \
  132. rps-test_util.h rps-test_util.c \
  133. gnunet-rps-profiler.c
  134. gnunet_rps_profiler_LDADD = \
  135. $(top_builddir)/src/statistics/libgnunetstatistics.la \
  136. libgnunetrps.la \
  137. $(top_builddir)/src/util/libgnunetutil.la \
  138. $(top_builddir)/src/testbed/libgnunettestbed.la \
  139. -lm
  140. EXTRA_DIST = \
  141. test_rps.conf