CC=gcc CFLAGS=-Wall -Werror -Wextra LIBS=-pthread -lcheck_pic -pthread -lrt -lm -lsubunit #LIBS=-I -L # BREWH=$(shell brew config | grep HOMEBREW_PREFIX | cut -d' ' -f2-) # KAMPUS $(CC) -o tests.out tests.c s21_string.c -I -L -lcheck # HOME $(CC) -o tests.out tests.c s21_string.c -I../../homebrew/include -L/usr/local/Cellar/check/0.15.2/lib -lcheck # $(CC) --coverage -o tests.out tests.c s21_string.c -pthread -lcheck_pic -pthread -lrt -lm -lsubunit all: make s21_string.a make gcov_report s21_string.a: s21_string.c s21_string.h $(CC) -c s21_string.c -o s21_string.o ar rc s21lib.a s21_string.o s21_string_test: s21_test.c $(CC) --coverage -c s21_test.c $(LIBS) $(CC) -c s21_string.c $(LIBS) $(CC) --coverage -o s21_test.out s21_test.o s21_string.o $(LIBS) -lcheck #-fprofile-arcs -ftest-coverage # $(CC) -fprofile-arcs -ftest-coverage -c s21_test.c $(LIBS) # $(CC) -c s21_string.c $(LIBS) # $(CC) -fprofile-arcs -ftest-coverage -o s21_test.out s21_test.o s21_string.o $(LIBS) test: s21_string_test ./s21_test.out gcov_report: test lcov -t "test" -o test.info -c -d . genhtml -o report test.info clean: rm -rf *.o *.a *.out *.gcno *.gcda *.info main: rebuild: make clean make all