]> git.sesse.net Git - vlc/blobdiff - libs/srtp/Makefile.am
Fix make check too
[vlc] / libs / srtp / Makefile.am
index 74c4bafe049598c0a67ab9f6dd09f6ff661a426b..cef9824872436e7619a9c7a7cdcef4b1c983ae22 100644 (file)
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 AM_CPPFLAGS = @LIBGCRYPT_CFLAGS@
-AM_LDFLAGS = @LIBGCRYPT_LIBS@
-
-if !HAVE_WIN32
-AM_LDFLAGS += -lpthread
-endif
 
 noinst_HEADERS = srtp.h
 
 EXTRA_PROGRAMS = srtp
-if HAVE_LIBGCRYPT
 noinst_LTLIBRARIES = libvlc_srtp.la
-check_PROGRAMS = test-aes
-TESTS = test-aes
-endif
+check_PROGRAMS = test-aes test-recv
+TESTS = $(check_PROGRAMS)
 
 libvlc_srtp_la_SOURCES = srtp.c
-test_aes_SOURCES = test-aes.c
+libvlc_srtp_la_LIBADD = @LIBGCRYPT_LIBS@
+
 srtp_SOURCES = recv.c
 srtp_LDADD = libvlc_srtp.la
+test_recv_LDADD = libvlc_srtp.la
+test_aes_LDADD = @LIBGCRYPT_LIBS@
+
+if !HAVE_WIN32
+libvlc_srtp_la_LIBADD += -lpthread
+test_aes_LDADD += -lpthread
+endif
+
+lcov-run:
+       rm -Rf *.gcda lcov
+       $(MAKE) $(AM_MAKEFLAGS) check
+
+lcov-pre.out:
+       lcov -c -d . -o lcov.tmp
+
+lcov.out: lcov-pre.out
+       lcov -r lcov.tmp '*test*' > lcov.out
+
+lcov: lcov.out
+       genhtml lcov.out -o lcov
 
+.PHONY: lcov-run