@@ -18,7 +18,10 @@ AM_CFLAGS = \
1818 $(libprotobuf_c_CFLAGS ) \
1919 $(libwdns_CFLAGS ) \
2020 $(libzmq_CFLAGS ) \
21- $(json_c_CFLAGS )
21+ $(librdkafka_CFLAGS ) \
22+ $(json_c_CFLAGS ) \
23+ $(libmicrohttpd_CFLAGS ) \
24+ $(libprom_CFLAGS )
2225AM_LDFLAGS =
2326
2427EXTRA_DIST += ChangeLog
@@ -51,6 +54,7 @@ EXTRA_DIST += \
5154 tests/test-layout-fltmod_plugin.c \
5255 tests/test-nmsg_output_set_rate.c \
5356 tests/test-parse.c \
57+ tests/test-private.c \
5458 tests/test-io.c \
5559 tests/test-misc.c \
5660 tests/udp-checksum-tests/test.sh.in \
@@ -121,26 +125,25 @@ nobase_nodist_include_HEADERS = \
121125
122126lib_LTLIBRARIES = nmsg/libnmsg.la
123127
124- VERSION_INFO = 9:1:1
128+ VERSION_INFO = 10:0:2
125129
126130nmsg_libnmsg_la_LDFLAGS = \
127131 $(AM_LDFLAGS ) \
128132 -version-info $(VERSION_INFO ) \
129133 -export-symbols-regex "^(nmsg_[a-z].*)"
130- nmsg_libnmsg_la_LIBADD = \
134+ LIBNMSG_LIB_DEPS = \
131135 $(libpcap_LIBS ) \
132136 $(libprotobuf_c_LIBS ) \
133137 $(libzmq_LIBS ) \
138+ $(librdkafka_LIBS ) \
134139 $(json_c_LIBS )
135- nmsg_libnmsg_la_SOURCES = \
136- libmy/crc32c.c libmy/crc32c.h libmy/crc32c-slicing.c libmy/crc32c-sse42.c \
137- libmy/list.h \
138- libmy/my_time.h \
139- libmy/my_rate.c libmy/my_rate.h \
140- libmy/tree.h \
141- libmy/b64_decode.c libmy/b64_decode.h \
142- libmy/b64_encode.c libmy/b64_encode.h \
143- libmy/fast_inet_ntop.c libmy/fast_inet_ntop.h \
140+ nmsg_libnmsg_la_LIBADD = $(LIBNMSG_LIB_DEPS )
141+ LIBNMSG_LIB_MODULES = \
142+ libmy/crc32c.c libmy/crc32c-slicing.c libmy/crc32c-sse42.c \
143+ libmy/my_rate.c \
144+ libmy/b64_decode.c \
145+ libmy/b64_encode.c \
146+ libmy/fast_inet_ntop.c \
144147 nmsg/alias.c \
145148 nmsg/asprintf.c \
146149 nmsg/brate.c \
@@ -161,37 +164,50 @@ nmsg_libnmsg_la_SOURCES = \
161164 nmsg/io.c \
162165 nmsg/ipdg.c \
163166 nmsg/ipreasm.c \
164- nmsg/ipreasm.h \
165167 nmsg/msgmodset.c \
166168 nmsg/nmsg.c \
167- nmsg/nmsg_json.h \
168- nmsg/nmsg_port_net.h \
169169 nmsg/output.c \
170170 nmsg/output_json.c \
171171 nmsg/output_nmsg.c \
172172 nmsg/output_pres.c \
173173 nmsg/payload.c \
174174 nmsg/pcap_input.c \
175- nmsg/private.h \
176175 nmsg/random.c \
177176 nmsg/rate.c \
178177 nmsg/res.c \
179178 nmsg/sock.c \
180179 nmsg/strbuf.c \
181180 nmsg/timespec.c \
182- nmsg/version.c nmsg/version.h \
181+ nmsg/version.c \
183182 nmsg/zmqio.c \
183+ nmsg/kafkaio.c \
184184 nmsg/zbuf.c \
185185 nmsg/msgmod/lookup.c \
186186 nmsg/msgmod/message.c \
187187 nmsg/msgmod/msgmod.c \
188188 nmsg/msgmod/transparent.c \
189- nmsg/msgmod/transparent.h \
190189 nmsg/msgmod/transparent_json.c \
191190 nmsg/msgmod/transparent_message.c \
192191 nmsg/msgmod/transparent_module.c \
193192 nmsg/msgmod/transparent_payload.c \
194193 nmsg/msgmod/transparent_pres.c
194+ nmsg_libnmsg_la_SOURCES = \
195+ libmy/crc32c.h \
196+ libmy/list.h \
197+ libmy/my_time.h \
198+ libmy/my_rate.h \
199+ libmy/tree.h \
200+ libmy/b64_decode.h \
201+ libmy/b64_encode.h \
202+ libmy/fast_inet_ntop.h \
203+ nmsg/ipreasm.h \
204+ nmsg/nmsg_json.h \
205+ nmsg/nmsg_port_net.h \
206+ nmsg/private.h \
207+ nmsg/version.h \
208+ nmsg/kafkaio.h \
209+ nmsg/msgmod/transparent.h \
210+ $(LIBNMSG_LIB_MODULES )
195211nodist_nmsg_libnmsg_la_SOURCES = \
196212 nmsg/nmsg.pb-c.c \
197213 nmsg/nmsg.pb-c.h
@@ -330,7 +346,10 @@ bin_PROGRAMS += src/nmsgtool
330346src_nmsgtool_LDADD = \
331347 nmsg/libnmsg.la \
332348 $(libpcap_LIBS ) \
333- $(libzmq_LIBS )
349+ $(libzmq_LIBS ) \
350+ $(librdkafka_LIBS ) \
351+ $(libmicrohttpd_LIBS ) \
352+ $(libprom_LIBS )
334353src_nmsgtool_SOURCES = \
335354 libmy/argv.c \
336355 libmy/argv.h \
@@ -346,6 +365,10 @@ src_nmsgtool_SOURCES = \
346365 src/rwfile.c \
347366 src/unescape.c
348367
368+ if USE_DT_PROM
369+ src_nmsgtool_SOURCES += src/dt_prom.c \
370+ src/dt_prom.h
371+ endif
349372#
350373# #
351374# ## Tests
@@ -428,10 +451,20 @@ check_PROGRAMS += tests/test-parse
428451tests_test_parse_LDADD = nmsg/libnmsg.la
429452tests_test_parse_SOURCES = tests/test-parse.c
430453
454+ TESTS += tests/test-private
455+ check_PROGRAMS += tests/test-private
456+ tests_test_private_LDFLAGS = -rdynamic
457+ PRIVATE_TEST_MODULES = $(LIBNMSG_LIB_MODULES:.c=.o )
458+ tests_test_private_LDADD = \
459+ $(PRIVATE_TEST_MODULES ) \
460+ nmsg/nmsg.pb-c.o \
461+ $(LIBNMSG_LIB_DEPS )
462+ tests_test_private_SOURCES = tests/test-private.c
463+
431464TESTS += tests/test-io
432465check_PROGRAMS += tests/test-io
433466tests_test_io_CPPFLAGS = -DSRCDIR="\"$(abs_srcdir ) \"" $(AM_CPPFLAGS )
434- tests_test_io_LDADD = nmsg/libnmsg.la $(libzmq_LIBS )
467+ tests_test_io_LDADD = nmsg/libnmsg.la $(libzmq_LIBS ) $( librdkafka_LIBS )
435468tests_test_io_SOURCES = tests/test-io.c
436469
437470TESTS += tests/test-misc
@@ -473,14 +506,10 @@ examples_nmsg_callback_SOURCES = examples/nmsg_callback.c
473506examples_print_srcip_LDADD = nmsg/libnmsg.la
474507examples_print_srcip_SOURCES = examples/print_srcip.c
475508
476- examples_nmsg_dnsqr2pcap_LDADD = \
477- nmsg/libnmsg.la \
478- $(libpcap_LIBS )
509+ examples_nmsg_dnsqr2pcap_LDADD = nmsg/libnmsg.la $(libpcap_LIBS )
479510examples_nmsg_dnsqr2pcap_SOURCES = examples/nmsg-dnsqr2pcap.c
480511
481- examples_nmsg_packet2pcap_LDADD = \
482- nmsg/libnmsg.la \
483- $(libpcap_LIBS )
512+ examples_nmsg_packet2pcap_LDADD = nmsg/libnmsg.la $(libpcap_LIBS )
484513examples_nmsg_packet2pcap_SOURCES = examples/nmsg-packet2pcap.c
485514
486515examples_print_version_LDADD = nmsg/libnmsg.la
0 commit comments