--- 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) $@ $^