Merge branch 'master' of ssh://gnunet.org/gnunet
[oweals/gnunet.git] / src / consensus / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 pkgcfgdir= $(pkgdatadir)/config.d/
5
6 libexecdir= $(pkglibdir)/libexec/
7
8 plugindir = $(libdir)/gnunet
9
10 pkgcfg_DATA = \
11   consensus.conf
12
13 if MINGW
14  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
15 endif
16
17 if USE_COVERAGE
18   AM_CFLAGS = -fprofile-arcs -ftest-coverage
19 endif
20
21 bin_PROGRAMS = \
22  gnunet-consensus-profiler
23
24 libexec_PROGRAMS = \
25  gnunet-service-consensus
26
27 if ENABLE_MALICIOUS
28 libexec_PROGRAMS += \
29  gnunet-service-evil-consensus
30 endif
31
32 lib_LTLIBRARIES = \
33   libgnunetconsensus.la
34
35 gnunet_consensus_profiler_SOURCES = \
36  gnunet-consensus-profiler.c
37 gnunet_consensus_profiler_LDADD = \
38   $(top_builddir)/src/util/libgnunetutil.la \
39   libgnunetconsensus.la \
40   $(top_builddir)/src/testbed/libgnunettestbed.la \
41   $(GN_LIBINTL)
42
43 gnunet_service_consensus_SOURCES = \
44  gnunet-service-consensus.c
45 gnunet_service_consensus_LDADD = \
46   $(top_builddir)/src/util/libgnunetutil.la \
47   $(top_builddir)/src/core/libgnunetcore.la \
48   $(top_builddir)/src/set/libgnunetset.la \
49   $(top_builddir)/src/statistics/libgnunetstatistics.la \
50   $(GN_LIBINTL)
51
52 gnunet_service_evil_consensus_SOURCES = \
53  gnunet-service-consensus.c \
54  consensus_protocol.h
55 gnunet_service_evil_consensus_LDADD = \
56   $(top_builddir)/src/util/libgnunetutil.la \
57   $(top_builddir)/src/core/libgnunetcore.la \
58   $(top_builddir)/src/set/libgnunetset.la \
59   $(top_builddir)/src/statistics/libgnunetstatistics.la \
60   $(GN_LIBINTL)
61 gnunet_service_evil_consensus_CFLAGS = -DEVIL
62
63 libgnunetconsensus_la_SOURCES = \
64   consensus_api.c \
65   consensus.h
66 libgnunetconsensus_la_LIBADD = \
67   $(top_builddir)/src/util/libgnunetutil.la \
68   $(LTLIBINTL)
69 libgnunetconsensus_la_LDFLAGS = \
70   $(GN_LIB_LDFLAGS)
71
72
73 plugin_LTLIBRARIES = \
74   libgnunet_plugin_block_consensus.la
75
76 libgnunet_plugin_block_consensus_la_SOURCES = \
77   plugin_block_consensus.c
78 libgnunet_plugin_block_consensus_la_LIBADD = \
79   $(top_builddir)/src/block/libgnunetblock.la \
80   $(top_builddir)/src/block/libgnunetblockgroup.la \
81   $(top_builddir)/src/util/libgnunetutil.la \
82   $(LTLIBINTL)
83 libgnunet_plugin_block_consensus_la_LDFLAGS = \
84  $(GN_PLUGIN_LDFLAGS)
85
86
87
88 if HAVE_TESTING
89 check_PROGRAMS = \
90  test_consensus_api
91
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 endif
97
98 test_consensus_api_SOURCES = \
99  test_consensus_api.c
100 test_consensus_api_LDADD = \
101   $(top_builddir)/src/util/libgnunetutil.la \
102   $(top_builddir)/src/testing/libgnunettesting.la \
103   libgnunetconsensus.la
104
105 EXTRA_DIST = \
106   test_consensus.conf