src/Makefile

changeset 774
4fd4e0c6107a
parent 766
e59b76889f00
child 794
23c6e3e846a8
--- a/src/Makefile	Wed Dec 27 16:18:10 2023 +0100
+++ b/src/Makefile	Wed Dec 27 17:19:54 2023 +0100
@@ -28,11 +28,21 @@
 
 OBJ_EXT=.o
 OBJ=$(SRC:%.c=$(build_dir)/%$(OBJ_EXT))
+GCOV=$(SRC:%.c=%.c.gcov)
 
 static: $(build_dir)/libucx_static$(STLIB_EXT)
 
 shared: $(build_dir)/libucx$(SHLIB_EXT)
 
+check-coverage: $(GCOV)
+	mv *.gcov "$(build_dir)"
+
+%.c.gcov: %.c $(build_dir)/%.gcno
+	gcov -Ho "$(build_dir)" $<
+
+$(build_dir)/%.gcno:
+	test -f "$@"
+
 $(build_dir)/libucx_static$(STLIB_EXT): $(OBJ)
 	$(AR) $(ARFLAGS) $@ $^
 

mercurial