add code coverage libs to LDADD instead of _LIBS

pull/436/head
bradh352 3 years ago
parent a14f5c55eb
commit 1d9edd256f
  1. 19
      src/tools/Makefile.am
  2. 10
      test/Makefile.am

@ -21,19 +21,18 @@ endif
include Makefile.inc
LDADD = $(top_builddir)/src/lib/libcares.la
# We're not interested in code coverage of the test apps themselves, but need
# to link with gcov if building with code coverage enabled
LDADD = $(top_builddir)/src/lib/libcares.la $(CODE_COVERAGE_LIBS)
ahost_SOURCES = ahost.c $(SAMPLESOURCES) $(SAMPLEHEADERS)
ahost_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
ahost_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS)
ahost_LIBS = $(CODE_COVERAGE_LIBS)
ahost_CFLAGS = $(AM_CFLAGS)
ahost_CPPFLAGS = $(AM_CPPFLAGS)
adig_SOURCES = adig.c $(SAMPLESOURCES) $(SAMPLEHEADERS)
adig_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
adig_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS)
adig_LIBS = $(CODE_COVERAGE_LIBS)
adig_CFLAGS = $(AM_CFLAGS)
adig_CPPFLAGS = $(AM_CPPFLAGS)
acountry_SOURCES = acountry.c $(SAMPLESOURCES) $(SAMPLEHEADERS)
acountry_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS)
acountry_CPPFLAGS = $(AM_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS)
acountry_LIBS = $(CODE_COVERAGE_LIBS)
acountry_CFLAGS = $(AM_CFLAGS)
acountry_CPPFLAGS = $(AM_CPPFLAGS)

@ -31,21 +31,19 @@ libgmock_la_CPPFLAGS = -isystem $(srcdir)/gmock-1.11.0
noinst_PROGRAMS = arestest aresfuzz aresfuzzname dnsdump
EXTRA_DIST = fuzzcheck.sh CMakeLists.txt Makefile.m32 Makefile.msvc README.md buildconf $(srcdir)/fuzzinput/* $(srcdir)/fuzznames/*
arestest_SOURCES = $(TESTSOURCES) $(TESTHEADERS)
arestest_LDADD = libgmock.la $(ARES_BLD_DIR)/src/lib/libcares.la $(PTHREAD_LIBS)
# Not interested in coverage of test code, but linking the test binary needs the coverage option
arestest_LDADD = libgmock.la $(ARES_BLD_DIR)/src/lib/libcares.la $(PTHREAD_LIBS) $(CODE_COVERAGE_LIBS)
include $(top_srcdir)/aminclude_static.am
arestest_LIBS = $(CODE_COVERAGE_LIBS)
aresfuzz_SOURCES = $(FUZZSOURCES)
aresfuzz_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la
aresfuzz_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la $(CODE_COVERAGE_LIBS)
aresfuzzname_SOURCES = $(FUZZNAMESOURCES)
aresfuzzname_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la
aresfuzzname_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la $(CODE_COVERAGE_LIBS)
dnsdump_SOURCES = $(DUMPSOURCES)
dnsdump_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la
dnsdump_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la $(CODE_COVERAGE_LIBS)
test: check

Loading…
Cancel
Save