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