hw8: Initial commit
This commit is contained in:
24
08_TestingCoverage/Makefile
Normal file
24
08_TestingCoverage/Makefile
Normal 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)
|
||||
|
||||
Reference in New Issue
Block a user