f57b786117799897ce9f25a22e2f41230d3bf71a
[oweals/gnunet.git] / src / regex / Makefile.am
1 INCLUDES = -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
23 gnunet_service_regex_SOURCES =  \
24  gnunet-service-regex.c
25 gnunet_service_regex_LDADD =  \
26  $(top_builddir)/src/regex/libgnunetregex.la \
27  $(top_builddir)/src/dht/libgnunetdht.la \
28  $(top_builddir)/src/statistics/libgnunetstatistics.la \
29  $(top_builddir)/src/util/libgnunetutil.la \
30  $(GN_LIBINTL) 
31 gnunet_service_regex_DEPENDENCIES = \
32   libgnunetregex.la
33 # todo: link files from libgnunetregex statically into gnunet_service_regex,
34 # rename API prefix to avoid collision with 'libgnunetregexnew'...
35
36 # FIXME: shouldn't the block library be in the plugin directory!?
37 lib_LTLIBRARIES = libgnunetregexblock.la \
38   libgnunetregex.la \
39   libgnunetregexnew.la
40
41
42 libgnunetregexblock_la_SOURCES = \
43   regex_block_lib.c regex_block_lib.h
44 libgnunetregexblock_la_LIBADD = \
45   $(top_builddir)/src/util/libgnunetutil.la \
46   $(XLIB) \
47   $(LTLIBINTL)
48 libgnunetregexblock_la_LDFLAGS = \
49   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
50   -version-info 1:0:0
51
52 libgnunetregex_la_SOURCES = \
53   regex_internal.h regex.c \
54   regex_graph.c regex_random.c \
55   regex_dht.c
56 libgnunetregex_la_LIBADD = -lm \
57   $(top_builddir)/src/util/libgnunetutil.la \
58   $(top_builddir)/src/dht/libgnunetdht.la \
59   $(top_builddir)/src/statistics/libgnunetstatistics.la \
60   $(top_builddir)/src/regex/libgnunetregexblock.la
61 libgnunetregex_la_DEPENDENCIES = \
62   libgnunetregexblock.la
63 libgnunetregex_la_LDFLAGS = \
64   $(GN_LIB_LDFLAGS) \
65    -version-info 2:0:1
66
67
68 libgnunetregexnew_la_SOURCES = \
69   regex_api.c regex_ipc.h
70 libgnunetregexnew_la_LIBADD = \
71   $(top_builddir)/src/util/libgnunetutil.la 
72 libgnunetregexnew_la_LDFLAGS = \
73   $(GN_LIB_LDFLAGS) \
74    -version-info 3:0:0
75
76
77 plugindir = $(libdir)/gnunet
78
79 plugin_LTLIBRARIES = \
80  libgnunet_plugin_block_regex.la
81
82 libgnunet_plugin_block_regex_la_SOURCES = \
83  plugin_block_regex.c
84 libgnunet_plugin_block_regex_la_LIBADD = \
85  $(top_builddir)/src/regex/libgnunetregexblock.la \
86  $(top_builddir)/src/block/libgnunetblock.la \
87  $(top_builddir)/src/util/libgnunetutil.la
88 libgnunet_plugin_block_regex_la_LDFLAGS = \
89  $(GN_PLUGIN_LDFLAGS)
90 libgnunet_plugin_block_regex_la_DEPENDENCIES = \
91  libgnunetregexblock.la
92
93 if HAVE_MYSQL
94 noinst_mysql_progs = \
95 gnunet-regex-simulation-profiler
96
97 gnunet_regex_simulation_profiler_SOURCES = \
98   gnunet-regex-simulation-profiler.c
99 gnunet_regex_simulation_profiler_LDADD = \
100   $(top_builddir)/src/util/libgnunetutil.la \
101   $(top_builddir)/src/regex/libgnunetregex.la \
102   $(top_builddir)/src/mysql/libgnunetmysql.la
103 gnunet_regex_simulation_profiler_DEPENDENCIES = \
104   libgnunetregex.la
105 endif
106
107 noinst_LTLIBRARIES = libgnunetregextest.la
108
109 libgnunetregextest_la_SOURCES = \
110   regex_test_lib.c regex_test_lib.h
111 libgnunetregextest_la_LIBADD = \
112  $(top_builddir)/src/util/libgnunetutil.la \
113  $(top_builddir)/src/regex/libgnunetregex.la
114 libgnunetregextest_la_DEPENDENCIES = \
115   libgnunetregex.la
116
117
118 noinst_PROGRAMS = $(noinst_mysql_progs) \
119   perf-regex \
120   gnunet-regex-profiler \
121   gnunet-daemon-regexprofiler
122
123 perf_regex_SOURCES = \
124   perf-regex.c
125 perf_regex_LDADD = \
126   $(top_builddir)/src/util/libgnunetutil.la \
127   $(top_builddir)/src/regex/libgnunetregex.la \
128   $(top_builddir)/src/regex/libgnunetregextest.la
129 perf_regex_DEPENDENCIES = \
130   libgnunetregex.la \
131   libgnunetregextest.la
132
133 gnunet_regex_profiler_SOURCES = \
134   gnunet-regex-profiler.c
135 gnunet_regex_profiler_LDADD = \
136   $(top_builddir)/src/util/libgnunetutil.la \
137   $(top_builddir)/src/arm/libgnunetarm.la \
138   $(top_builddir)/src/dht/libgnunetdht.la \
139   $(top_builddir)/src/testbed/libgnunettestbed.la \
140   $(top_builddir)/src/regex/libgnunetregex.la \
141   $(top_builddir)/src/regex/libgnunetregextest.la \
142   $(top_builddir)/src/statistics/libgnunetstatistics.la
143 gnunet_regex_profiler_DEPENDENCIES = \
144   $(top_builddir)/src/arm/libgnunetarm.la \
145   $(top_builddir)/src/dht/libgnunetdht.la \
146   libgnunetregex.la \
147   libgnunetregextest.la
148
149
150 gnunet_daemon_regexprofiler_SOURCES = \
151   gnunet-daemon-regexprofiler.c
152 gnunet_daemon_regexprofiler_LDADD = \
153   $(top_builddir)/src/util/libgnunetutil.la \
154   $(top_builddir)/src/dht/libgnunetdht.la \
155   $(top_builddir)/src/regex/libgnunetregex.la \
156   $(top_builddir)/src/regex/libgnunetregextest.la \
157   $(top_builddir)/src/statistics/libgnunetstatistics.la
158 gnunet_daemon_regexprofiler_DEPENDENCIES = \
159   $(top_builddir)/src/dht/libgnunetdht.la \
160   libgnunetregextest.la \
161   libgnunetregex.la
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_iptoregex
171
172 if ENABLE_TEST_RUN
173  TESTS = $(check_PROGRAMS)
174 endif
175
176 test_regex_eval_api_SOURCES = \
177   test_regex_eval_api.c
178 test_regex_eval_api_LDADD = \
179   $(top_builddir)/src/regex/libgnunetregex.la \
180   $(top_builddir)/src/util/libgnunetutil.la
181
182 test_regex_iterate_api_SOURCES = \
183   test_regex_iterate_api.c
184 test_regex_iterate_api_LDADD = \
185   $(top_builddir)/src/regex/libgnunetregex.la \
186   $(top_builddir)/src/util/libgnunetutil.la
187
188 test_regex_proofs_SOURCES = \
189   test_regex_proofs.c
190 test_regex_proofs_LDADD = \
191   $(top_builddir)/src/regex/libgnunetregex.la \
192   $(top_builddir)/src/util/libgnunetutil.la
193
194 test_regex_graph_api_SOURCES = \
195   test_regex_graph_api.c
196 test_regex_graph_api_LDADD = \
197   $(top_builddir)/src/regex/libgnunetregex.la \
198   $(top_builddir)/src/util/libgnunetutil.la
199
200 test_regex_iptoregex_SOURCES = \
201   test_regex_iptoregex.c
202 test_regex_iptoregex_LDADD = \
203   $(top_builddir)/src/util/libgnunetutil.la \
204   $(top_builddir)/src/regex/libgnunetregex.la
205
206
207 EXTRA_DIST = \
208   regex_simulation_profiler_test.conf