From 7a811406dd16e057204bed1aa15cfe33d81ccb6b Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 17 Aug 2025 23:36:54 +0300 Subject: initial commit --- Makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f4b03ae --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +CFLAGS = -Wall -Wextra -O0 -g -Iinclude + +.PHONY: all +all: + mkdir -p build + $(CC) $(CFLAGS) src/server.c -o build/covsrv + +.PHONY: clean +clean: + rm -rf build reports coverage vgcore.* + +build/pass: include/covsrv/covsrv.h src/client.c tests/pass.c + $(CC) $(CFLAGS) --coverage -DCOVERAGE=1 src/client.c tests/pass.c -o build/pass + +.PHONY: xpass +.IGNORE: xpass +xpass: build/pass + ./scripts/run-test build/pass + +build/fail: include/covsrv/covsrv.h src/client.c tests/fail.c + $(CC) $(CFLAGS) --coverage -DCOVERAGE=1 src/client.c tests/fail.c -o build/fail + +.PHONY: xfail +.IGNORE: xfail +xfail: build/fail + ./scripts/run-test build/fail + +.PHONY: check +coverage: all xpass xfail + mkdir -p coverage + lcov --capture --directory . --out coverage/covsrv.info + genhtml coverage/covsrv.info --out coverage -- cgit v1.2.3