-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.am
254 lines (223 loc) · 6.94 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
bin_PROGRAMS =
check_PROGRAMS =
noinst_PROGRAMS =
TESTS =
EXTRA_DIST =
CLEANFILES =
DISTCLEANFILES =
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
EXTRA_DIST += COPYRIGHT
EXTRA_DIST += LICENSE
EXTRA_DIST += README.md
AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
-I$(top_srcdir)/wdns
AM_CFLAGS = $(my_CFLAGS) \
-I$(top_builddir)/wdns
AM_LDFLAGS =
USE_LCOV=@USE_LCOV@
LCOV=@LCOV@
GENHTML=@GENHTML@
clean-coverage:
@if [ $(USE_LCOV) = yes ] ; then \
$(LCOV) --directory . --zerocounters ; \
echo "Removing coverage info files and generated $(abs_top_builddir)/coverage-html/ directory" ; \
rm -rf all.coverage report.coverage ; \
rm -rf $(abs_top_builddir)/coverage-html/ ; \
else \
echo "Code coverage not enabled at configuration time." ; \
echo "Use: ./configure --with-coverage" ; \
fi
report-coverage:
@if [ $(USE_LCOV) = yes ] ; then \
$(LCOV) --capture --directory . --output-file all.coverage ; \
$(LCOV) --remove all.coverage \
$(abs_top_srcdir)/t/\* \
/usr/include/\* \
--output report.coverage ; \
$(GENHTML) --legend -o $(abs_top_builddir)/coverage-html report.coverage ; \
echo "Generated Code Coverage report in HTML at $(abs_top_builddir)/coverage-html" ; \
else \
echo "Code coverage not enabled at configuration time." ; \
echo "Use: ./configure --with-coverage" ; \
fi
#
##
### library
##
#
LIBWDNS_CURRENT=4
LIBWDNS_REVISION=1
LIBWDNS_AGE=3
include_HEADERS = wdns/wdns.h
lib_LTLIBRARIES = wdns/libwdns.la
EXTRA_DIST += wdns/gen_rcode_to_str
EXTRA_DIST += wdns/gen_rrclass_to_str
EXTRA_DIST += wdns/gen_rrtype_to_str
DISTCLEANFILES += wdns/rrtype_to_str.c \
wdns/rcode_to_str.c \
wdns/rrclass_to_str.c
wdns/rcode_to_str.c: wdns/wdns.h wdns/gen_rcode_to_str
$(PYTHON) $(top_srcdir)/wdns/gen_rcode_to_str wdns/wdns.h wdns/rcode_to_str.c
wdns/rrclass_to_str.c: wdns/wdns.h wdns/gen_rrclass_to_str
$(PYTHON) $(top_srcdir)/wdns/gen_rrclass_to_str wdns/wdns.h wdns/rrclass_to_str.c
wdns/rrtype_to_str.c: wdns/wdns.h wdns/gen_rrtype_to_str
$(PYTHON) $(top_srcdir)/wdns/gen_rrtype_to_str wdns/wdns.h wdns/rrtype_to_str.c
wdns_libwdns_la_CPPFLAGS = \
-include $(top_builddir)/wdns/wdns-private.h
wdns_libwdns_la_LDFLAGS = $(AM_LDFLAGS) \
-version-info $(LIBWDNS_CURRENT):$(LIBWDNS_REVISION):$(LIBWDNS_AGE)
if HAVE_LD_VERSION_SCRIPT
wdns_libwdns_la_LDFLAGS += \
-Wl,--version-script=$(top_srcdir)/wdns/libwdns.sym
else
wdns_libwdns_la_LDFLAGS += \
-export-symbols-regex "^(wdns_[a-z].*)"
endif
EXTRA_DIST += wdns/libwdns.sym
wdns_libwdns_la_SOURCES = \
libmy/my_alloc.h \
libmy/vector.h \
libmy/ubuf.h \
wdns/wdns-private.h \
wdns/wdns.h \
libmy/b32_decode.c \
libmy/b32_decode.h \
libmy/b32_encode.c \
libmy/b32_encode.h \
libmy/b64_decode.c \
libmy/b64_decode.h \
libmy/b64_encode.c \
libmy/b64_encode.h \
libmy/my_format.c \
libmy/my_format.h \
libmy/fast_inet_ntop.c \
libmy/fast_inet_ntop.h \
wdns/clear.c \
wdns/compare_rr_rrset.c \
wdns/copy_uname.c \
wdns/count_labels.c \
wdns/deserialize_rrset.c \
wdns/domain_to_str.c \
wdns/downcase_name.c \
wdns/downcase_rdata.c \
wdns/downcase_rrset.c \
wdns/edns_options.c \
wdns/file_load_names.c \
wdns/insert_rr_rrset_array.c \
wdns/is_subdomain.c \
wdns/left_chop.c \
wdns/len_uname.c \
wdns/message_to_str.c \
wdns/parse_edns.c \
wdns/parse_header.c \
wdns/parse_message.c \
wdns/parse_message_rr.c \
wdns/parse_rdata.c \
wdns/print_message.c \
wdns/print_rr.c \
wdns/print_rrset.c \
wdns/print_rrset_array.c \
wdns/opcode_to_str.c \
wdns/rcode_to_str.c \
wdns/rdata_to_str.c \
wdns/rdata_to_ubuf.c \
wdns/record_descr.c \
wdns/record_descr.h \
wdns/res_to_str.c \
wdns/reverse_name.c \
wdns/rr_to_str.c \
wdns/rr_to_ubuf.c \
wdns/rrclass_to_str.c \
wdns/rrtype_to_str.c \
wdns/rrset_array_to_str.c \
wdns/rrset_array_to_ubuf.c \
wdns/rrset_to_str.c \
wdns/rrset_to_ubuf.c \
wdns/serialize_rrset.c \
wdns/sort_rrset.c \
wdns/skip_name.c \
wdns/str_to_name.c \
wdns/str_to_rdata_ubuf.c \
wdns/svcparamkeys_to_str.c \
wdns/unpack_name.c \
wdns/version.c
pkgconfig_DATA = wdns/libwdns.pc
EXTRA_DIST += wdns/libwdns.pc.in
CLEANFILES += wdns/libwdns.pc
noinst_PROGRAMS += examples/wdns-dump-file
examples_wdns_dump_file_LDADD = wdns/libwdns.la
examples_wdns_dump_file_SOURCES = \
examples/private.h \
examples/wdns-dump-file.c
if LIBPCAP
noinst_PROGRAMS += examples/wdns-dump-pcap
examples_wdns_dump_pcap_LDADD = wdns/libwdns.la -lpcap
examples_wdns_dump_pcap_SOURCES = \
examples/private.h \
examples/wdns-dump-pcap.c
endif
noinst_PROGRAMS += examples/wdns-print-version
examples_wdns_print_version_LDADD = wdns/libwdns.la
examples_wdns_print_version_SOURCES = \
examples/private.h \
examples/wdns-print-version.c
noinst_PROGRAMS += examples/wdns-test-deserialize-rrset
examples_wdns_test_deserialize_rrset_LDADD = wdns/libwdns.la
examples_wdns_test_deserialize_rrset_SOURCES = \
examples/private.h \
examples/wdns-hex-driver.c \
examples/wdns-test-deserialize-rrset.c
noinst_PROGRAMS += examples/wdns-test-downcase-rrset
examples_wdns_test_downcase_rrset_LDADD = wdns/libwdns.la
examples_wdns_test_downcase_rrset_SOURCES = \
examples/private.h \
examples/wdns-hex-driver.c \
examples/wdns-test-downcase-rrset.c
noinst_PROGRAMS += examples/wdns-test-print-message
examples_wdns_test_print_message_LDADD = wdns/libwdns.la
examples_wdns_test_print_message_SOURCES = \
examples/private.h \
examples/wdns-hex-driver.c \
examples/wdns-test-print-message.c
noinst_PROGRAMS += examples/wdns-test-serialize-rrset
examples_wdns_test_serialize_rrset_LDADD = wdns/libwdns.la
examples_wdns_test_serialize_rrset_SOURCES = \
examples/private.h \
examples/wdns-hex-driver.c \
examples/wdns-test-serialize-rrset.c
#
##
### tests
##
#
EXTRA_DIST += t/test-common.h
AM_TESTS_ENVIRONMENT = top_builddir='$(top_builddir)'; top_srcdir='$(top_srcdir)'; export top_builddir top_srcdir;
TESTS_ENVIRONMENT = $(AM_TESTS_ENVIRONMENT)
TESTS += t/test-name_to_str
check_PROGRAMS += t/test-name_to_str
t_test_name_to_str_SOURCES = t/test-name_to_str.c t/test-common.c
t_test_name_to_str_LDADD = wdns/libwdns.la
TESTS += t/test-str_to_name
check_PROGRAMS += t/test-str_to_name
t_test_str_to_name_SOURCES = t/test-str_to_name.c t/test-common.c
t_test_str_to_name_LDADD = wdns/libwdns.la
TESTS += t/test-str_to_rcode
check_PROGRAMS += t/test-str_to_rcode
t_test_str_to_rcode_SOURCES = t/test-str_to_rcode.c t/test-common.c
t_test_str_to_rcode_LDADD = wdns/libwdns.la
TESTS += t/test-str_to_rdata
check_PROGRAMS += t/test-str_to_rdata
t_test_str_to_rdata_SOURCES = t/test-str_to_rdata.c t/test-common.c
t_test_str_to_rdata_LDADD = wdns/libwdns.la
TESTS += t/test-rdata
check_PROGRAMS += t/test-rdata
t_test_rdata_SOURCES = t/test-rdata.c t/test-common.c
t_test_rdata_LDADD = wdns/libwdns.la
TESTS += t/test-str_to_rrtype
check_PROGRAMS += t/test-str_to_rrtype
t_test_str_to_rrtype_SOURCES = t/test-str_to_rrtype.c t/test-common.c
t_test_str_to_rrtype_LDADD = wdns/libwdns.la
TESTS += t/test-fast_inet_ntop
check_PROGRAMS += t/test-fast_inet_ntop
t_test_fast_inet_ntop_SOURCES = t/test-fast_inet_ntop.c t/test-common.c