aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-04-13 13:57:38 +0200
committerChristian Grothoff <christian@grothoff.org>2015-04-13 13:57:38 +0200
commit93bc450db36ebb41bfcc1c0d7edf5cfedbcf0741 (patch)
tree8924deecb33faf881d72b8a8ce72dd930e4cbfc8 /src
parent2310a3f4747edf100b4c96737426239c893a04a9 (diff)
enable code coverage configure option
Diffstat (limited to 'src')
-rw-r--r--src/mint-lib/Makefile.am7
-rw-r--r--src/mint-tools/Makefile.am13
-rw-r--r--src/mintdb/Makefile.am13
-rw-r--r--src/pq/Makefile.am7
-rw-r--r--src/util/Makefile.am14
5 files changed, 40 insertions, 14 deletions
diff --git a/src/mint-lib/Makefile.am b/src/mint-lib/Makefile.am
index f91ca32c1..e6e25b046 100644
--- a/src/mint-lib/Makefile.am
+++ b/src/mint-lib/Makefile.am
@@ -1,6 +1,11 @@
# This Makefile.am is in the public domain
AM_CPPFLAGS = -I$(top_srcdir)/src/include
+if USE_COVERAGE
+ AM_CFLAGS = --coverage -O0
+ XLIB = -lgcov
+endif
+
lib_LTLIBRARIES = \
libtalermint.la
@@ -14,7 +19,7 @@ libtalermint_la_SOURCES = \
libtalermint_la_LIBADD = \
-lgnunetutil \
-ljansson \
- -lcurl
+ -lcurl $(XLIB)
check_PROGRAMS = \
test_mint_api
diff --git a/src/mint-tools/Makefile.am b/src/mint-tools/Makefile.am
index 5230f0b62..a61ab6a93 100644
--- a/src/mint-tools/Makefile.am
+++ b/src/mint-tools/Makefile.am
@@ -1,6 +1,11 @@
# This Makefile.am is in the public domain
AM_CPPFLAGS = -I$(top_srcdir)/src/include
+if USE_COVERAGE
+ AM_CFLAGS = --coverage -O0
+ XLIB = -lgcov
+endif
+
bin_PROGRAMS = \
taler-mint-keyup \
taler-mint-keycheck \
@@ -15,7 +20,7 @@ taler_mint_keyup_LDADD = \
$(top_builddir)/src/util/libtalerutil.la \
$(top_builddir)/src/pq/libtalerpq.la \
$(top_builddir)/src/mintdb/libtalermintdb.la \
- -lgnunetutil
+ -lgnunetutil $(XLIB)
taler_mint_keyup_LDFLAGS = $(POSTGRESQL_LDFLAGS)
@@ -26,7 +31,7 @@ taler_mint_keycheck_LDADD = \
$(LIBGCRYPT_LIBS) \
$(top_builddir)/src/util/libtalerutil.la \
$(top_builddir)/src/mintdb/libtalermintdb.la \
- -lgnunetutil
+ -lgnunetutil $(XLIB)
taler_mint_keycheck_LDFLAGS = $(POSTGRESQL_LDFLAGS)
taler_mint_reservemod_SOURCES = \
@@ -37,7 +42,7 @@ taler_mint_reservemod_LDADD = \
$(top_builddir)/src/pq/libtalerpq.la \
$(top_builddir)/src/mintdb/libtalermintdb.la \
-lpq \
- -lgnunetutil
+ -lgnunetutil $(XLIB)
taler_mint_reservemod_LDFLAGS = \
$(POSTGRESQL_LDFLAGS)
taler_mint_reservemod_CPPFLAGS = \
@@ -53,7 +58,7 @@ taler_mint_dbinit_LDADD = \
$(top_builddir)/src/pq/libtalerpq.la \
$(top_builddir)/src/mintdb/libtalermintdb.la \
-lpq \
- -lgnunetutil
+ -lgnunetutil $(XLIB)
taler_mint_dbinit_LDFLAGS = \
$(POSTGRESQL_LDFLAGS)
taler_mint_dbinit_CPPFLAGS = \
diff --git a/src/mintdb/Makefile.am b/src/mintdb/Makefile.am
index be62d96fe..6b0aaa8cb 100644
--- a/src/mintdb/Makefile.am
+++ b/src/mintdb/Makefile.am
@@ -1,6 +1,11 @@
# This Makefile.am is in the public domain
AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/pq/ $(POSTGRESQL_CPPFLAGS)
+if USE_COVERAGE
+ AM_CFLAGS = --coverage -O0
+ XLIB = -lgcov
+endif
+
plugindir = $(libdir)/taler
if HAVE_POSTGRESQL
@@ -19,7 +24,7 @@ libtaler_plugin_mintdb_postgres_la_LIBADD = \
libtaler_plugin_mintdb_postgres_la_LDFLAGS = \
$(TALER_PLUGIN_LDFLAGS) \
-lpq \
- -lgnunetutil
+ -lgnunetutil $(XLIB)
lib_LTLIBRARIES = \
libtalermintdb.la
@@ -30,7 +35,7 @@ libtalermintdb_la_SOURCES = \
libtalermintdb_la_LIBADD = \
$(top_builddir)/src/util/libtalerutil.la \
- -lgnunetutil
+ -lgnunetutil $(XLIB)
libtalermintdb_la_LDFLAGS = \
$(POSTGRESQL_LDFLAGS) \
@@ -51,7 +56,7 @@ test_mintdb_deposits_LDADD = \
$(top_srcdir)/src/pq/libtalerpq.la \
-lgnunetutil \
-ljansson \
- -lpq
+ -lpq
test_mintdb_keyio_SOURCES = \
test_mintdb_keyio.c
@@ -59,7 +64,7 @@ test_mintdb_keyio_LDADD = \
libtalermintdb.la \
$(top_srcdir)/src/util/libtalerutil.la \
$(top_srcdir)/src/pq/libtalerpq.la \
- -lgnunetutil
+ -lgnunetutil
test_mintdb_postgres_SOURCES = \
test_mintdb.c
diff --git a/src/pq/Makefile.am b/src/pq/Makefile.am
index db9d4aa23..341baa53c 100644
--- a/src/pq/Makefile.am
+++ b/src/pq/Makefile.am
@@ -1,6 +1,11 @@
# This Makefile.am is in the public domain
AM_CPPFLAGS = -I$(top_srcdir)/src/include $(LIBGCRYPT_CFLAGS) $(POSTGRESQL_CPPFLAGS)
+if USE_COVERAGE
+ AM_CFLAGS = --coverage -O0
+ XLIB = -lgcov
+endif
+
talerincludedir = $(includedir)/taler
lib_LTLIBRARIES = \
@@ -11,7 +16,7 @@ libtalerpq_la_SOURCES = \
libtalerpq_la_LIBADD = \
-lgnunetutil \
- -lpq
+ -lpq $(XLIB)
libtalerpq_la_LDFLAGS = \
$(POSTGRESQL_LDFLAGS) \
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index e57e1c5d2..2a5cdefef 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -1,6 +1,11 @@
# This Makefile.am is in the public domain
AM_CPPFLAGS = -I$(top_srcdir)/src/include $(LIBGCRYPT_CFLAGS) $(POSTGRESQL_CPPFLAGS)
+if USE_COVERAGE
+ AM_CFLAGS = --coverage -O0
+ XLIB = -lgcov
+endif
+
lib_LTLIBRARIES = \
libtalerutil.la
@@ -16,20 +21,21 @@ libtalerutil_la_LIBADD = \
-lgnunetutil \
$(LIBGCRYPT_LIBS) \
-ljansson \
- -lmicrohttpd
+ -lmicrohttpd $(XLIB)
libtalerutil_la_LDFLAGS = \
-version-info 0:0:0 \
-export-dynamic -no-undefined
-TESTS=\
+TESTS = \
test-json-validations
check_PROGRAMS=\
test-json-validations
-test_json_validations_SOURCES=test_json_validations.c
-test_json_validations_LDADD=\
+test_json_validations_SOURCES = \
+ test_json_validations.c
+test_json_validations_LDADD = \
-lgnunetutil \
-ljansson \
libtalerutil.la