File: Makefile.am

package info (click to toggle)
balsa 2.5.6-2%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 23,764 kB
  • sloc: ansic: 95,130; sh: 4,221; makefile: 720; awk: 60; xml: 25
file content (32 lines) | stat: -rw-r--r-- 1,112 bytes parent folder | download
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
# $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-smtp.c $(libsrcdir)/net-client-utils.c

EXTRA_DIST = 		\
	tests.c			\
	inetsim.conf	\
	ca_cert.pem		\
	cert.pem 		\
	cert_u.pem 		\
	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) -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