File: Makefile.am

package info (click to toggle)
balsa 2.6.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,576 kB
  • sloc: ansic: 99,871; xml: 4,934; makefile: 769; sh: 185; awk: 60; python: 34
file content (34 lines) | stat: -rw-r--r-- 1,200 bytes parent folder | download | duplicates (3)
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
# $Id$

# Note: the following hack is needed so lcov recognises the paths of the sources...
libsrcdir = $(shell echo $(abs_srcdir) | sed -e 's;/test$$;;')
test_src = $(libsrcdir)/net-client.c $(libsrcdir)/net-client-pop.c $(libsrcdir)/net-client-siobuf.c \
	$(libsrcdir)/net-client-smtp.c $(libsrcdir)/net-client-utils.c

EXTRA_DIST = 		\
	tests.c			\
	inetsim.conf	\
	ca_cert.pem		\
	cert.pem 		\
	cert_u.pem 		\
	meson.build		\
	valgrind.supp

TESTFLAGS = -fprofile-arcs -ftest-coverage -g -Wno-error

LCOVFLGS	= --rc lcov_branch_coverage=1
GENHTMLFLGS	= --function-coverage --branch-coverage --num-spaces 4
VALGRFLAGS  = --tool=memcheck --log-file=$@.vg --suppressions=valgrind.supp --leak-check=full --track-fds=yes \
			  --child-silent-after-fork=yes

CLEANFILES = *.gcda *.gcno *.covi *.vg tests

clean-local:
	-rm -rf gcov

tests:	tests.c
	$(CC) $(LIBNETCLIENT_CFLAGS) $(CPPFLAGS) $(TESTFLAGS) -DG_LOG_DOMAIN=\"libnetclient\" -I. -I.. -I../.. $< $(test_src) -o $@ $(LIBNETCLIENT_LIBS)
	$(VALGRIND) $(VALGRFLAGS) ./$@
	$(LCOV) $(LCOVFLGS) -c -b $(libsrcdir) -d $(abs_srcdir) --no-external -o $@.covi
	$(LCOV) $(LCOVFLGS) -r $@.covi '*/'$< -o $@.covi
	$(GENHTML) $(GENHTMLFLGS) -o gcov $@.covi