| 1 |
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in |
| 2 |
BUILT_SOURCES = |
| 3 |
CLEANFILES = *.gcda *.gcno *.gcov |
| 4 |
EXTRA_DIST = |
| 5 |
|
| 6 |
SUBDIRS = test |
| 7 |
|
| 8 |
AM_CFLAGS = $(tinyframe_CFLAGS) \ |
| 9 |
$(protobuf_c_CFLAGS) |
| 10 |
|
| 11 |
lib_LTLIBRARIES = libdnswire.la |
| 12 |
|
| 13 |
libdnswire_la_SOURCES = decoder.c dnstap.c dnswire.c encoder.c reader.c \ |
| 14 |
writer.c trace.c |
| 15 |
nodist_libdnswire_la_SOURCES = dnstap.pb-c.c |
| 16 |
BUILT_SOURCES += dnswire/dnstap.pb-c.h |
| 17 |
nobase_include_HEADERS = dnswire/decoder.h dnswire/dnstap.h \ |
| 18 |
dnswire/dnswire.h dnswire/encoder.h dnswire/reader.h dnswire/writer.h |
| 19 |
nobase_nodist_include_HEADERS = dnswire/version.h dnswire/dnstap.pb-c.h \ |
| 20 |
dnswire/dnstap-macros.h dnswire/trace.h |
| 21 |
libdnswire_la_LDFLAGS = -version-info $(DNSWIRE_LIBRARY_VERSION) \ |
| 22 |
$(protobuf_c_LIBS) \ |
| 23 |
$(tinyframe_LIBS) |
| 24 |
|
| 25 |
CLEANFILES += $(nodist_libdnswire_la_SOURCES) |
| 26 |
EXTRA_DIST += dnstap.pb/dnstap.proto dnstap.pb/LICENSE dnstap.pb/README.md |
| 27 |
|
| 28 |
dnswire/dnstap.pb-c.h: dnstap.pb-c.c |
| 29 |
mkdir -p dnswire/ |
| 30 |
cp dnstap.pb-c.h dnswire/ |
| 31 |
|
| 32 |
dnstap.pb-c.c: dnstap.pb/dnstap.proto |
| 33 |
$(AM_V_GEN)@PROTOC_C@ "--c_out=." -I$(srcdir)/dnstap.pb "$(srcdir)/dnstap.pb/dnstap.proto" |
| 34 |
|
| 35 |
BUILT_SOURCES += dnswire/dnstap-macros.h |
| 36 |
EXTRA_DIST += gen-macros.sh dnstap.fields |
| 37 |
|
| 38 |
dnswire/dnstap-macros.h: dnstap.fields gen-macros.sh |
| 39 |
$(AM_V_GEN)"$(srcdir)/gen-macros.sh" "$(srcdir)/dnstap.fields" >dnswire/dnstap-macros.h |
| 40 |
|
| 41 |
CLEANFILES += $(BUILT_SOURCES) |
| 42 |
|
| 43 |
if ENABLE_GCOV |
| 44 |
gcov-local: |
| 45 |
for src in $(libdnswire_la_SOURCES); do \ |
| 46 |
gcov -l -r -s "$(srcdir)" "$$src"; \ |
| 47 |
done |
| 48 |
endif |