fix #3275 with solution from https://gnunet.org/bugs/view.php?id=3275#c8029
[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:0: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  libgnunetregexblock.la
87
88 if HAVE_MYSQL
89 noinst_mysql_progs = \
90   gnunet-regex-simulation-profiler
91
92 gnunet_regex_simulation_profiler_SOURCES = \
93   gnunet-regex-simulation-profiler.c
94 gnunet_regex_simulation_profiler_LDADD = \
95   $(top_builddir)/src/util/libgnunetutil.la \
96   $(top_builddir)/src/regex/libgnunetregex_internal.a \
97   $(top_builddir)/src/dht/libgnunetdht.la \
98   $(top_builddir)/src/mysql/libgnunetmysql.la
99 gnunet_regex_simulation_profiler_DEPENDENCIES = \
100   libgnunetregex_internal.a
101 endif
102
103 libgnunetregextest_a_SOURCES = \
104   regex_test_lib.c regex_test_lib.h \
105   regex_test_graph.c \
106   regex_test_random.c 
107 libgnunetregextest_a_LIBADD = \
108  $(top_builddir)/src/util/libgnunetutil.la \
109  $(top_builddir)/src/regex/libgnunetregex_internal.a
110 libgnunetregextest_a_DEPENDENCIES = \
111   libgnunetregex_internal.a
112
113 if HAVE_TESTING
114 noinst_PROGRAMS = $(noinst_mysql_progs) \
115   perf-regex \
116   gnunet-regex-profiler
117 endif
118
119 perf_regex_SOURCES = \
120   perf-regex.c
121 perf_regex_LDADD = -lm \
122   $(top_builddir)/src/regex/libgnunetregex_internal.a \
123   $(top_builddir)/src/dht/libgnunetdht.la \
124   $(top_builddir)/src/regex/libgnunetregexblock.la \
125   $(top_builddir)/src/regex/libgnunetregextest.a \
126   $(top_builddir)/src/util/libgnunetutil.la 
127 perf_regex_DEPENDENCIES = \
128   libgnunetregex_internal.a \
129   libgnunetregextest.a
130
131 gnunet_regex_profiler_SOURCES = \
132   gnunet-regex-profiler.c
133 gnunet_regex_profiler_LDADD = -lm \
134   $(top_builddir)/src/arm/libgnunetarm.la \
135   $(top_builddir)/src/testbed/libgnunettestbed.la \
136   $(top_builddir)/src/regex/libgnunetregex_internal.a \
137   $(top_builddir)/src/dht/libgnunetdht.la \
138   $(top_builddir)/src/regex/libgnunetregexblock.la \
139   $(top_builddir)/src/regex/libgnunetregextest.a \
140   $(top_builddir)/src/statistics/libgnunetstatistics.la \
141   $(top_builddir)/src/util/libgnunetutil.la 
142 gnunet_regex_profiler_DEPENDENCIES = \
143   $(top_builddir)/src/arm/libgnunetarm.la \
144   $(top_builddir)/src/dht/libgnunetdht.la \
145   libgnunetregex_internal.a \
146   libgnunetregextest.a
147
148
149 gnunet_daemon_regexprofiler_SOURCES = \
150   gnunet-daemon-regexprofiler.c
151 gnunet_daemon_regexprofiler_LDADD = -lm \
152   $(top_builddir)/src/regex/libgnunetregex_internal.a \
153   $(top_builddir)/src/dht/libgnunetdht.la \
154   $(top_builddir)/src/regex/libgnunetregexblock.la \
155   $(top_builddir)/src/regex/libgnunetregextest.a \
156   $(top_builddir)/src/statistics/libgnunetstatistics.la \
157   $(top_builddir)/src/util/libgnunetutil.la 
158 gnunet_daemon_regexprofiler_DEPENDENCIES = \
159   $(top_builddir)/src/dht/libgnunetdht.la \
160   libgnunetregextest.a \
161   libgnunetregex_internal.a
162
163
164
165 check_PROGRAMS = \
166   test_regex_eval_api \
167   test_regex_iterate_api \
168   test_regex_proofs \
169   test_regex_graph_api \
170   test_regex_api
171
172 if ENABLE_TEST_RUN
173  TESTS_ENVIRONMENT=export GNUNET_PREFIX=@prefix@;export PATH=@prefix@/bin:$$PATH;
174  TESTS = $(check_PROGRAMS)
175 endif
176
177 test_regex_eval_api_SOURCES = \
178   test_regex_eval_api.c
179 test_regex_eval_api_LDADD = -lm \
180   $(top_builddir)/src/regex/libgnunetregex_internal.a \
181   $(top_builddir)/src/dht/libgnunetdht.la \
182   $(top_builddir)/src/regex/libgnunetregextest.a \
183   $(top_builddir)/src/regex/libgnunetregexblock.la \
184   $(top_builddir)/src/util/libgnunetutil.la
185
186 test_regex_api_SOURCES = \
187   test_regex_api.c
188 test_regex_api_LDADD = -lm \
189   $(top_builddir)/src/regex/libgnunetregex.la \
190   $(top_builddir)/src/testing/libgnunettesting.la \
191   $(top_builddir)/src/util/libgnunetutil.la
192
193 test_regex_iterate_api_SOURCES = \
194   test_regex_iterate_api.c
195 test_regex_iterate_api_LDADD = -lm \
196   $(top_builddir)/src/regex/libgnunetregex_internal.a \
197   $(top_builddir)/src/regex/libgnunetregexblock.la \
198   $(top_builddir)/src/dht/libgnunetdht.la \
199   $(top_builddir)/src/util/libgnunetutil.la
200
201 test_regex_proofs_SOURCES = \
202   test_regex_proofs.c
203 test_regex_proofs_LDADD = -lm \
204   $(top_builddir)/src/regex/libgnunetregex_internal.a \
205   $(top_builddir)/src/dht/libgnunetdht.la \
206   $(top_builddir)/src/regex/libgnunetregextest.a \
207   $(top_builddir)/src/regex/libgnunetregexblock.la \
208   $(top_builddir)/src/util/libgnunetutil.la
209
210 test_regex_graph_api_SOURCES = \
211   test_regex_graph_api.c
212 test_regex_graph_api_LDADD = -lm \
213   $(top_builddir)/src/regex/libgnunetregex_internal.a \
214   $(top_builddir)/src/dht/libgnunetdht.la \
215   $(top_builddir)/src/regex/libgnunetregextest.a \
216   $(top_builddir)/src/regex/libgnunetregexblock.la \
217   $(top_builddir)/src/util/libgnunetutil.la
218
219
220 EXTRA_DIST = \
221   regex_simulation_profiler_test.conf \
222   test_regex_api_data.conf