blob: 1a4be6a91346818cd0e0a0330e1e8fbf1fba95c5 [file] [log] [blame]
Haibo Huangb0bee822021-02-24 15:40:15 -08001# This is only for jsoncpp developers/contributors.
2# We use this to sign releases, generate documentation, etc.
3VER?=$(shell cat version.txt)
Derek Sollenberger2eb3b4d2016-01-11 14:41:40 -05004
Haibo Huangb0bee822021-02-24 15:40:15 -08005default:
6 @echo "VER=${VER}"
7sign: jsoncpp-${VER}.tar.gz
8 gpg --armor --detach-sign $<
9 gpg --verify $<.asc
10 # Then upload .asc to the release.
11jsoncpp-%.tar.gz:
12 curl https://github.com/open-source-parsers/jsoncpp/archive/$*.tar.gz -o $@
13dox:
14 python doxybuild.py --doxygen=$$(which doxygen) --in doc/web_doxyfile.in
15 rsync -va -c --delete dist/doxygen/jsoncpp-api-html-${VER}/ ../jsoncpp-docs/doxygen/
16 # Then 'git add -A' and 'git push' in jsoncpp-docs.
Derek Sollenberger2eb3b4d2016-01-11 14:41:40 -050017build:
18 mkdir -p build/debug
Haibo Huangb0bee822021-02-24 15:40:15 -080019 cd build/debug; cmake -DCMAKE_BUILD_TYPE=debug -DBUILD_SHARED_LIBS=ON -G "Unix Makefiles" ../..
Derek Sollenberger2eb3b4d2016-01-11 14:41:40 -050020 make -C build/debug
21
22# Currently, this depends on include/json/version.h generated
23# by cmake.
Haibo Huangb0bee822021-02-24 15:40:15 -080024test-amalgamate:
Derek Sollenberger2eb3b4d2016-01-11 14:41:40 -050025 python2.7 amalgamate.py
26 python3.4 amalgamate.py
Haibo Huangb0bee822021-02-24 15:40:15 -080027 cd dist; gcc -I. -c jsoncpp.cpp
28
29valgrind:
30 valgrind --error-exitcode=42 --leak-check=full ./build/debug/src/test_lib_json/jsoncpp_test
31
32clean:
33 \rm -rf *.gz *.asc dist/
Derek Sollenberger2eb3b4d2016-01-11 14:41:40 -050034
35.PHONY: build