-rps service: prevent division by zero
[oweals/gnunet.git] / src / regex / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 if MINGW
5   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
6 endif
7
8 if USE_COVERAGE
9   AM_CFLAGS = --coverage
10 endif
11
12 pkgcfgdir= $(pkgdatadir)/config.d/
13
14 libexecdir= $(pkglibdir)/libexec/
15
16 plugindir = $(libdir)/gnunet
17
18 pkgcfg_DATA = \
19   regex.conf
20
21 libexec_PROGRAMS = \
22   gnunet-service-regex \
23   gnunet-daemon-regexprofiler
24
25
26 gnunet_service_regex_SOURCES =  \
27  gnunet-service-regex.c
28 gnunet_service_regex_LDADD =  -lm \
29  libgnunetregex_internal.a \
30  libgnunetregexblock.la \
31  $(top_builddir)/src/dht/libgnunetdht.la \
32  $(top_builddir)/src/statistics/libgnunetstatistics.la \
33  $(top_builddir)/src/util/libgnunetutil.la \
34  $(GN_LIBINTL)
35
36 noinst_LIBRARIES = \
37   libgnunetregex_internal.a \
38   libgnunetregextest.a
39
40 lib_LTLIBRARIES = \
41   libgnunetregexblock.la \
42   libgnunetregex.la
43
44
45 libgnunetregexblock_la_SOURCES = \
46   regex_block_lib.c regex_block_lib.h
47 libgnunetregexblock_la_LIBADD = \
48   $(top_builddir)/src/util/libgnunetutil.la \
49   $(XLIB) \
50   $(LTLIBINTL)
51 libgnunetregexblock_la_LDFLAGS = \
52   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
53   -version-info 1:0:0
54
55
56 libgnunetregex_internal_a_SOURCES = \
57   regex_internal_lib.h \
58   regex_internal.h regex_internal.c \
59   regex_internal_dht.c
60 libgnunetregex_internal_a_DEPENDENCIES = \
61   libgnunetregexblock.la
62
63
64 libgnunetregex_la_SOURCES = \
65   regex_api_announce.c \
66   regex_api_search.c \
67   regex_ipc.h
68 libgnunetregex_la_LIBADD = \
69   $(top_builddir)/src/util/libgnunetutil.la
70 libgnunetregex_la_LDFLAGS = \
71   $(GN_LIB_LDFLAGS) \
72    -version-info 3:1:0
73
74
75 plugin_LTLIBRARIES = \
76  libgnunet_plugin_block_regex.la
77
78 libgnunet_plugin_block_regex_la_SOURCES = \
79  plugin_block_regex.c
80 libgnunet_plugin_block_regex_la_LIBADD = \
81  libgnunetregexblock.la \
82  $(top_builddir)/src/block/libgnunetblock.la \
83  $(top_builddir)/src/util/libgnunetutil.la
84 libgnunet_plugin_block_regex_la_LDFLAGS = \
85  $(GN_PLUGIN_LDFLAGS)
86
87 if HAVE_MYSQL
88 noinst_mysql_progs = \
89   gnunet-regex-simulation-profiler
90
91 gnunet_regex_simulation_profiler_SOURCES = \
92   gnunet-regex-simulation-profiler.c
93 gnunet_regex_simulation_profiler_LDADD = \
94   $(top_builddir)/src/util/libgnunetutil.la \
95   libgnunetregex_internal.a \
96   $(top_builddir)/src/dht/libgnunetdht.la \
97   $(top_builddir)/src/my/libgnunetmy.la \
98   $(top_builddir)/src/mysql/libgnunetmysql.la
99 endif
100
101 libgnunetregextest_a_SOURCES = \
102   regex_test_lib.c regex_test_lib.h \
103   regex_test_graph.c \
104   regex_test_random.c
105 libgnunetregextest_a_LIBADD = \
106  $(top_builddir)/src/util/libgnunetutil.la \
107  libgnunetregex_internal.a
108
109 if HAVE_TESTING
110 noinst_PROGRAMS = $(noinst_mysql_progs) \
111   perf-regex \
112   gnunet-regex-profiler
113 endif
114
115 perf_regex_SOURCES = \
116   perf-regex.c
117 perf_regex_LDADD = -lm \
118   libgnunetregex_internal.a \
119   $(top_builddir)/src/dht/libgnunetdht.la \
120   libgnunetregexblock.la \
121   libgnunetregextest.a \
122   $(top_builddir)/src/util/libgnunetutil.la
123
124 gnunet_regex_profiler_SOURCES = \
125   gnunet-regex-profiler.c
126 gnunet_regex_profiler_LDADD = -lm \
127   $(top_builddir)/src/arm/libgnunetarm.la \
128   $(top_builddir)/src/testbed/libgnunettestbed.la \
129   libgnunetregex_internal.a \
130   $(top_builddir)/src/dht/libgnunetdht.la \
131   libgnunetregexblock.la \
132   libgnunetregextest.a \
133   $(top_builddir)/src/statistics/libgnunetstatistics.la \
134   $(top_builddir)/src/util/libgnunetutil.la
135
136 gnunet_daemon_regexprofiler_SOURCES = \
137   gnunet-daemon-regexprofiler.c
138 gnunet_daemon_regexprofiler_LDADD = -lm \
139   libgnunetregex_internal.a \
140   $(top_builddir)/src/dht/libgnunetdht.la \
141   libgnunetregexblock.la \
142   libgnunetregextest.a \
143   $(top_builddir)/src/statistics/libgnunetstatistics.la \
144   $(top_builddir)/src/util/libgnunetutil.la
145
146 check_PROGRAMS = \
147   test_regex_integration \
148   test_regex_eval_api \
149   test_regex_iterate_api \
150   test_regex_proofs \
151   test_regex_graph_api \
152   test_regex_api
153
154 if ENABLE_TEST_RUN
155  AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
156  TESTS = $(check_PROGRAMS)
157 endif
158
159 test_regex_eval_api_SOURCES = \
160   test_regex_eval_api.c
161 test_regex_eval_api_LDADD = -lm \
162   libgnunetregex_internal.a \
163   $(top_builddir)/src/dht/libgnunetdht.la \
164   libgnunetregextest.a \
165   libgnunetregexblock.la \
166   $(top_builddir)/src/util/libgnunetutil.la
167
168 test_regex_integration_SOURCES = \
169   test_regex_integration.c
170 test_regex_integration_LDADD = -lm \
171   libgnunetregex.la \
172   $(top_builddir)/src/testing/libgnunettesting.la \
173   $(top_builddir)/src/tun/libgnunettun.la \
174   $(top_builddir)/src/util/libgnunetutil.la
175
176 test_regex_api_SOURCES = \
177   test_regex_api.c
178 test_regex_api_LDADD = -lm \
179   libgnunetregex.la \
180   $(top_builddir)/src/testing/libgnunettesting.la \
181   $(top_builddir)/src/util/libgnunetutil.la
182
183 test_regex_iterate_api_SOURCES = \
184   test_regex_iterate_api.c
185 test_regex_iterate_api_LDADD = -lm \
186   libgnunetregex_internal.a \
187   libgnunetregexblock.la \
188   $(top_builddir)/src/dht/libgnunetdht.la \
189   $(top_builddir)/src/util/libgnunetutil.la
190
191 test_regex_proofs_SOURCES = \
192   test_regex_proofs.c
193 test_regex_proofs_LDADD = -lm \
194   libgnunetregex_internal.a \
195   $(top_builddir)/src/dht/libgnunetdht.la \
196   libgnunetregextest.a \
197   libgnunetregexblock.la \
198   $(top_builddir)/src/util/libgnunetutil.la
199
200 test_regex_graph_api_SOURCES = \
201   test_regex_graph_api.c
202 test_regex_graph_api_LDADD = -lm \
203   libgnunetregex_internal.a \
204   $(top_builddir)/src/dht/libgnunetdht.la \
205   libgnunetregextest.a \
206   libgnunetregexblock.la \
207   $(top_builddir)/src/util/libgnunetutil.la
208
209
210 EXTRA_DIST = \
211   regex_simulation_profiler_test.conf \
212   test_regex_api_data.conf