/
ne-ilyxa
/
C2_s21_stringplus
Обзор
Документация
Войти
/
ne-ilyxa
/
C2_s21_stringplus
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
src/Makefile
98 строк
3 KB
git1worker
Check all
27 янв 2024, 21:56
27 янв 2024, 21:56
ca96060
Код
Авторство
О чём код?
SAN = -fsanitize=address W = -Wall -Werror -Wextra FLAGS = -std=c11 -g ${W} CMPL = gcc LIBS=-lcheck UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) LIBS += -lsubunit -lm endif TEST_SOURCES=./tests/test_insert.c \ ./tests/test_memchr.c \ ./tests/test_memcmp.c \ ./tests/test_memcpy.c \ ./tests/test_memset.c \ ./tests/test_strchr.c \ ./tests/test_strcspn.c \ ./tests/test_strlen.c \ ./tests/test_strncat.c \ ./tests/test_strncmp.c \ ./tests/test_strncpy.c \ ./tests/test_strpbrk.c \ ./tests/test_strrchr.c \ ./tests/test_strstr.c \ ./tests/test_strtok.c \ ./tests/test_to_lower.c \ ./tests/test_to_upper.c \ ./tests/test_trim.c \ ./tests/test_strerror.c all: clean s21_string.a check test check: lint-fix lint-errors clean: rm -f *.o *.a *.out *.gcda *.gcno *.info *.out s21_string.o: ${CMPL} ${FLAGS} -o s21_string.o -c s21_string.c s21_citoa.o : ${CMPL} ${FLAGS} -o s21_citoa.o -c ./s21_citoa.c s21_sprintf.o : ${CMPL} ${FLAGS} -o s21_sprintf.o -c ./s21_sprintf.c s21_sscanf.o: ${CMPL} ${FLAGS} -o s21_sscanf.o -c s21_sscanf.c s21_string.a : s21_string.o s21_sprintf.o s21_citoa.o s21_sscanf.o ar r libs21_string.a s21_string.o s21_sprintf.o s21_citoa.o s21_sscanf.o ar r s21_string.a s21_string.o s21_sprintf.o s21_citoa.o s21_sscanf.o cppcheck: cppcheck --enable=all --suppress=missingIncludeSystem *.c lint-fix: clang-format -i -style=Google tests/*.c *.c *.h lint-errors: clang-format -n -style=Google tests/*.c *.c *.h test : clean lint-fix lint-errors test_string test_sscanf test_sprintf ./test_sscanf.out ./test_sprintf.out ./test_string.out test_string : s21_string.a ${CMPL} ${FLAGS} tests/s21_string.test.c ${TEST_SOURCES} -o test_string.out ${LIBS} -L. -ls21_string test_sscanf: lint-fix lint-errors ${CMPL} ${FLAGS} tests/s21_sscanf.test.c s21_sscanf.c -o test_sscanf.out ${LIBS} test_sprintf: s21_string.a ${CMPL} ${FLAGS} -o test_sprintf.out \ tests/test_sprintf.c -L. -ls21_string ${LIBS} test1 : clean s21_string.a ${CMPL} -std=c11 -g test.c -o test.out -L. -ls21_string ${LIBS} gcov_report: clean ${CMPL} --coverage ${FLAGS} -o test_sprintf.out tests/test_sprintf.c s21_string.c s21_citoa.c s21_sprintf.c s21_sscanf.c ${LIBS} ./test_sprintf.out lcov --capture --directory . --output-file test_sprintf.info rm -f *.gcda *.gcno ${CMPL} --coverage ${FLAGS} tests/s21_sscanf.test.c -o test_sscanf.out s21_string.c s21_citoa.c s21_sprintf.c s21_sscanf.c ${LIBS} ./test_sscanf.out lcov --capture --directory . --output-file test_sscanf.info rm -f *.gcda *.gcno ${CMPL} --coverage ${FLAGS} tests/s21_string.test.c ${TEST_SOURCES} s21_string.c s21_citoa.c s21_sprintf.c s21_sscanf.c -o test_string.out ${LIBS} ./test_string.out lcov --capture --directory . --output-file test_string.info rm -f *.gcda *.gcno lcov -a test_sprintf.info -t test2 -a test_sscanf.info -t test1 -a test_string.info -t test3 -o coverage.info genhtml -o report coverage.info open report/index.html rm -f *.gcda *.gcno *.info *.out