notes
[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/block/libgnunetblockgroup.la \
84  $(top_builddir)/src/util/libgnunetutil.la
85 libgnunet_plugin_block_regex_la_LDFLAGS = \
86  $(GN_PLUGIN_LDFLAGS)
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   libgnunetregex_internal.a \
97   $(top_builddir)/src/dht/libgnunetdht.la \
98   $(top_builddir)/src/my/libgnunetmy.la \
99   $(top_builddir)/src/mysql/libgnunetmysql.la
100 endif
101
102 libgnunetregextest_a_SOURCES = \
103   regex_test_lib.c regex_test_lib.h \
104   regex_test_graph.c \
105   regex_test_random.c
106 libgnunetregextest_a_LIBADD = \
107  $(top_builddir)/src/util/libgnunetutil.la \
108  libgnunetregex_internal.a
109
110 if HAVE_TESTING
111 noinst_PROGRAMS = $(noinst_mysql_progs) \
112   perf-regex \
113   gnunet-regex-profiler
114 endif
115
116 perf_regex_SOURCES = \
117   perf-regex.c
118 perf_regex_LDADD = -lm \
119   libgnunetregex_internal.a \
120   $(top_builddir)/src/dht/libgnunetdht.la \
121   libgnunetregexblock.la \
122   libgnunetregextest.a \
123   $(top_builddir)/src/util/libgnunetutil.la
124
125 gnunet_regex_profiler_SOURCES = \
126   gnunet-regex-profiler.c
127 gnunet_regex_profiler_LDADD = -lm \
128   $(top_builddir)/src/arm/libgnunetarm.la \
129   $(top_builddir)/src/testbed/libgnunettestbed.la \
130   libgnunetregex_internal.a \
131   $(top_builddir)/src/dht/libgnunetdht.la \
132   libgnunetregexblock.la \
133   libgnunetregextest.a \
134   $(top_builddir)/src/statistics/libgnunetstatistics.la \
135   $(top_builddir)/src/util/libgnunetutil.la
136
137 gnunet_daemon_regexprofiler_SOURCES = \
138   gnunet-daemon-regexprofiler.c
139 gnunet_daemon_regexprofiler_LDADD = -lm \
140   libgnunetregex_internal.a \
141   $(top_builddir)/src/dht/libgnunetdht.la \
142   libgnunetregexblock.la \
143   libgnunetregextest.a \
144   $(top_builddir)/src/statistics/libgnunetstatistics.la \
145   $(top_builddir)/src/util/libgnunetutil.la
146
147 check_PROGRAMS = \
148   test_regex_integration \
149   test_regex_eval_api \
150   test_regex_iterate_api \
151   test_regex_proofs \
152   test_regex_graph_api \
153   test_regex_api
154
155 if ENABLE_TEST_RUN
156  AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
157  TESTS = $(check_PROGRAMS)
158 endif
159
160 test_regex_eval_api_SOURCES = \
161   test_regex_eval_api.c
162 test_regex_eval_api_LDADD = -lm \
163   libgnunetregex_internal.a \
164   $(top_builddir)/src/dht/libgnunetdht.la \
165   libgnunetregextest.a \
166   libgnunetregexblock.la \
167   $(top_builddir)/src/util/libgnunetutil.la
168
169 test_regex_integration_SOURCES = \
170   test_regex_integration.c
171 test_regex_integration_LDADD = -lm \
172   libgnunetregex.la \
173   $(top_builddir)/src/testing/libgnunettesting.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