hw8: Initial commit

This commit is contained in:
2020-11-04 16:49:27 +03:00
parent ed17584264
commit a0d68131c9
6 changed files with 363 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
GENERATES = main libbuf.so tester *.gcov
TRASH = *.o *~ o.* *.gcdna *.gcno *.gcda
all: lib main tester
lib:
gcc -shared -fPIC -c buf.c -o libbuf.so
main: lib
gcc -L. main.c -lbuf -o main
tester:
# Запускаем без библиотеки для показа результатов покрытия
gcc -fprofile-arcs -ftest-coverage -O0 -g -L. tests.c buf.c -o tester
./tester
gcov -b -c buf.c
clean:
rm -f $(TRASH)
distclean: clean
rm -rf $(GENERATES)