-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.am
344 lines (305 loc) · 8.05 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
bin_PROGRAMS =
check_PROGRAMS =
TESTS =
EXTRA_DIST =
CLEANFILES =
DISTCLEANFILES =
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AM_TESTS_ENVIRONMENT = top_builddir='$(top_builddir)'; \
top_srcdir='$(top_srcdir)'; \
export top_builddir top_srcdir;
TESTS_ENVIRONMENT = $(AM_TESTS_ENVIRONMENT)
AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
-I${top_srcdir}/axa
AM_CFLAGS = \
${my_CFLAGS}
AM_LDFLAGS = \
${my_LDFLAGS}
configdir = ${CONFDIR}
dist_config_DATA = etc/fields
EXTRA_DIST += \
autogen.sh \
axalib/README \
axa/README \
COPYRIGHT \
debian/axa-tools.install \
debian/changelog \
debian/control \
debian/copyright \
debian/gbp.conf \
debian/libaxa3.install \
debian/libaxa-dev.install \
debian/rules \
DoxygenLayout.xml \
fwd.man \
json-schema.yaml \
LICENSE \
radwatch.man \
README.md \
sratool/cmds.man \
sratool/README \
sratunnel/README \
srawatch.man \
watch.man
#
##
### documentation
##
#
MAN_PROCESS = $(AM_V_GEN) soelim -I. -I`dirname $<` -r $< | sed -e "s/^\.Dd.*/.Dd `date '+%B %d, %Y'`/" >$@
.man.1:
$(MAN_PROCESS)
.man.8:
$(MAN_PROCESS)
sratool/sratool.1: sratool/sratool.man \
fwd.man watch.man srawatch.man sratool/options.man sratool/cmds.man
sratool/radtool.1: sratool/radtool.man \
fwd.man watch.man radwatch.man sratool/options.man sratool/cmds.man
sratunnel/sratunnel.1: sratunnel/sratunnel.man fwd.man srawatch.man watch.man
sratunnel/radtunnel.1: sratunnel/radtunnel.man fwd.man srawatch.man watch.man
man_MANS = \
sratool/sratool.1 \
sratool/radtool.1 \
sratunnel/sratunnel.1 \
sratunnel/radtunnel.1 \
tools/axa_link_certs.8 \
tools/axa_make_cert.8 \
tools/axa_server_cert.8
DISTCLEANFILES += $(man_MANS)
#
##
### library
##
#
LIBAXA_CURRENT=3
LIBAXA_REVISION=1
LIBAXA_AGE=0
nobase_include_HEADERS = \
axa/axa.h \
axa/bits.h \
axa/client.h \
axa/client_config.h \
axa/dns_walk.h \
axa/axa_endian.h \
axa/fields.h \
axa/json.h \
axa/kickfile.h \
axa/open_nmsg_out.h \
axa/protocol.h \
axa/socket.h \
axa/strbuf.h \
axa/trie.h \
axa/version.h \
axa/wire.h \
axa/yajl_shortcuts.h \
libmy/b64_encode.h
lib_LTLIBRARIES = axa/libaxa.la
axa_libaxa_la_SOURCES = \
axa/axa.h \
axa/bits.h \
axa/client.h \
axa/client_config.h \
axa/dns_walk.h \
axa/axa_endian.h \
axa/fields.h \
axa/json.h \
axa/kickfile.h \
axa/open_nmsg_out.h \
axa/protocol.h \
axa/socket.h \
axa/strbuf.h \
axa/trie.h \
axa/version.h \
axa/wire.h \
axalib/apikey.c \
axalib/bit_funcs.c \
axalib/client.c \
axalib/client_config.c \
axalib/dns_walk.c \
axalib/domain_to_str.c \
axalib/emsg.c \
axalib/fields.c \
axalib/get_field_name.c \
axalib/hash_divisor.c \
axalib/json.c \
axalib/kickfile.c \
axalib/open_nmsg_out.c \
axalib/parse_ch.c \
axalib/socket.c \
axalib/strbuf.c \
axalib/time.c \
axalib/tls.c \
axalib/trie.c \
axalib/version.c \
axalib/wdns_res.c \
axalib/wdns_rtype.c \
axalib/whit2nmsg.c \
axalib/wire.c \
libmy/b64_encode.c libmy/b64_encode.h
axa_libaxa_la_LDFLAGS = $(AM_LDFLAGS) \
-version-info $(LIBAXA_CURRENT):$(LIBAXA_REVISION):$(LIBAXA_AGE) \
-export-symbols-regex "^(axa_[a-z].*)" \
${libssl_LIBS} \
${libcrypto_LIBS} \
${libpcap_LIBS} \
${libwdns_LIBS} \
${libnmsg_LIBS} \
${strlcpy_LIBS} \
${yajl_LIBS}
axa_libaxa_la_CFLAGS = \
${AM_CFLAGS} \
${libssl_CFLAGS} \
${libcrypto_CFLAGS} \
${libpcap_CFLAGS} \
${libwdns_CFLAGS} \
${libnmsg_CFLAGS} \
${strlcpy_CFLAGS} \
${yajl_CFLAGS}
pkgconfig_DATA = axa/libaxa.pc
#
##
### programs
##
#
bin_PROGRAMS += sratool/sratool
sratool_sratool_SOURCES = \
sratool/cmd.c \
sratool/error.c \
sratool/infile.c \
sratool/io.c \
sratool/main.c \
sratool/output.c \
sratool/server.c \
sratool/signal.c \
sratool/print.c \
sratool/time.c \
sratool/sratool.h
sratool_sratool_LDADD = \
axa/libaxa.la \
${libssl_LIBS} \
${libcrypto_LIBS} \
${libpcap_LIBS} \
${libnmsg_LIBS} \
${libz_LIBS} \
${libwdns_LIBS} \
${libedit_LIBS} \
${strlcpy_LIBS} \
${LIBM}
sratool_sratool_CFLAGS = \
${AM_CFLAGS} \
${libssl_CFLAGS} \
${libcrypto_CFLAGS} \
${libpcap_CFLAGS} \
${libnmsg_CFLAGS} \
${libz_CFLAGS} \
${libwdns_CFLAGS} \
${libedit_CFLAGS}
bin_PROGRAMS += sratool/radtool
sratool_radtool_SOURCES = ${sratool_sratool_SOURCES}
sratool_radtool_LDADD = ${sratool_sratool_LDADD}
sratool_radtool_CFLAGS = ${sratool_sratool_CFLAGS}
bin_PROGRAMS += sratunnel/sratunnel
sratunnel_sratunnel_SOURCES = \
sratunnel/forward.c \
sratunnel/main.c \
sratunnel/output.c \
sratunnel/pidfile.c \
sratunnel/print.c \
sratunnel/server.c \
sratunnel/signal.c \
sratunnel/sratunnel.h
sratunnel_sratunnel_LDADD = \
axa/libaxa.la \
${libnmsg_LIBS} \
${libssl_LIBS} \
${libcrypto_LIBS} \
${libpcap_LIBS} \
${strlcpy_LIBS} \
${LIBM}
sratunnel_sratunnel_CFLAGS = \
${AM_CFLAGS} \
${libnmsg_CFLAGS} \
${libssl_CFLAGS} \
${libcrypto_CFLAGS} \
${libpcap_CFLAGS}
bin_PROGRAMS += sratunnel/radtunnel
sratunnel_radtunnel_SOURCES = ${sratunnel_sratunnel_SOURCES}
sratunnel_radtunnel_LDADD = ${sratunnel_sratunnel_LDADD}
sratunnel_radtunnel_CFLAGS = ${sratunnel_sratunnel_CFLAGS}
#
##
### scripts
##
#
bin_SCRIPTS = \
tools/axa_link_certs \
tools/axa_make_cert \
tools/axa_server_cert
#
##
### documentation
##
#
if HAVE_DOXYGEN
stamp-html: $(DOXYGEN_INPUT) $(top_builddir)/Doxyfile $(top_srcdir)/DoxygenLayout.xml $(include_HEADERS) $(nobase_include_HEADERS)
$(AM_V_GEN) $(DOXYGEN)
@touch $@
html-local: stamp-html
doc: html-local
clean-local:
rm -rf $(top_builddir)/html $(top_builddir)/stamp-html
endif
spotless: distclean
rm -fr ar-lib aclocal.m4 autom4te.cache configure config.* Makefile.in \
autoscan.log config.h compile depcomp configure.scan \
missing install-sh ltmain.sh $(top_builddir)/html \
$(top_builddir)/stamp-html
#
##
### tests
##
#
EXTRA_DIST += tests/test-config tests/test-config-badperms
if HAVE_YAJL
TESTS += tests/test-json
check_PROGRAMS += tests/test-json
tests_test_json_SOURCES = tests/test-json.c
tests_test_json_LDADD = axa/libaxa.la ${libnmsg_LIBS} ${check_LIBS}
tests_test_json_CFLAGS = ${AM_CFLAGS} ${libnmsg_CFLAGS} ${check_CFLAGS} ${libssl_CFLAGS}
endif
TESTS += tests/test-apikey
check_PROGRAMS += tests/test-apikey
tests_test_apikey_SOURCES = tests/test-apikey.c
tests_test_apikey_LDADD = axa/libaxa.la ${libnmsg_LIBS} ${check_LIBS}
tests_test_apikey_CFLAGS = ${AM_CFLAGS} ${libnmsg_CFLAGS} ${check_CFLAGS} ${libssl_CFLAGS}
TESTS += tests/test-client_config
check_PROGRAMS += tests/test-client_config
tests_test_client_config_SOURCES = tests/test-client_config.c
tests_test_client_config_LDADD = axa/libaxa.la ${libnmsg_LIBS} ${check_LIBS} ${strlcpy_LIBS}
tests_test_client_config_CFLAGS = ${AM_CFLAGS} ${libnmsg_CFLAGS} ${check_CFLAGS} ${libssl_CFLAGS} ${strlcpy_CFLAGS}
TESTS += tests/test-stats
check_PROGRAMS += tests/test-stats
tests_test_stats_SOURCES = tests/test-stats.c
tests_test_stats_LDADD = axa/libaxa.la ${libnmsg_LIBS} ${check_LIBS} ${strlcpy_LIBS}
tests_test_stats_CFLAGS = ${AM_CFLAGS} ${libnmsg_CFLAGS} ${check_CFLAGS} ${libssl_CFLAGS} ${strlcpy_CFLAGS}
TESTS += tests/test-kill
check_PROGRAMS += tests/test-kill
tests_test_kill_SOURCES = tests/test-kill.c
tests_test_kill_LDADD = axa/libaxa.la ${libnmsg_LIBS} ${check_LIBS} ${strlcpy_LIBS}
tests_test_kill_CFLAGS = ${AM_CFLAGS} ${libnmsg_CFLAGS} ${check_CFLAGS} ${libssl_CFLAGS} ${strlcpy_CFLAGS}
TESTS += tests/test-kickfile
check_PROGRAMS += tests/test-kickfile
tests_test_kickfile_SOURCES = tests/test-kickfile.c
tests_test_kickfile_LDADD = axa/libaxa.la ${libnmsg_LIBS} ${check_LIBS} ${strlcpy_LIBS}
tests_test_kickfile_CFLAGS = ${AM_CFLAGS} ${libnmsg_CFLAGS} ${check_CFLAGS} ${libssl_CFLAGS} ${strlcpy_CFLAGS}
EXTRA_DIST += tests/tool-tests-data/001000-single-command \
tests/tool-tests-data/002210-valid-before-and-after-unrecognized-command \
tests/tool-tests-data/002000-multiple-commands \
tests/tool-tests-data/002200-valid-then-unrecognized-command \
tests/tool-tests-data/002100-unrecognized-command \
tests/tool-tests-data/001010-multiple-commands-on-single-line \
tests/tool-tests-data/with-server/001000-connect \
tests/tool-tests-data/with-server/001010-invalid-username
TESTS += tests/test-tools-without-server.sh \
tests/test-tools-with-server.sh