-
-
Notifications
You must be signed in to change notification settings - Fork 321
/
Makefile
32 lines (23 loc) · 884 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# This file is only used for development for convinience functions as
# quick builds and tests
GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)
.PHONY: build
build:
mkdir -p build
cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_COVERAGE=Yes .. && make -j$(nproc)
coverage: test
mkdir -p reports
gcovr -r . -d -e "build" -e "src/test" -e "src/examples" -e "src/stubgenerator/main.cpp" --html --html-details -o reports/coverage.html
format:
find src/ -name "*.h" -o -name "*.cpp" -exec clang-format -i {} \;
check-format: format
git diff --exit-code
tarball:
git archive --format=tar.gz --prefix=libjson-rpc-cpp-$(GIT_VERSION)/ -o libjson-rpc-cpp-$(GIT_VERSION).tar.gz HEAD
signed-taball: tarball
gpg --armor --detach-sign libjson-rpc-cpp-$(GIT_VERSION).tar.gz
test: build
cd build && ./bin/unit_testsuite
clean:
rm -rf build
rm -rf reports