Makefile (1979B)
1 include config.mk 2 3 # this must be started and running before running tests that do network connections 4 server: 5 python3 -m jetforce --dir tests 6 7 debug: 8 ${DCOMMAND_P} src/main.cpp ${DCOMMAND_S} -o foreseen.out 9 10 build: 11 ${COMMAND_P} src/main.cpp ${COMMAND_S} -o foreseen.out 12 13 install: build 14 cp foreseen.out ${PREFIX}/bin/foreseen 15 mkdir -p ${MANPREFIX}/man1 16 cp docs/foreseen.1 ${MANPREFIX}/man1/foreseen.1 17 chmod 644 ${MANPREFIX}/man1/foreseen.1 18 19 format: 20 clang-format -i include/*.hpp 21 clang-format -i src/*.cpp 22 clang-format -i tests/*.cpp 23 24 clean: 25 rm -rf test*.out foreseen.out 26 rm -rf bench*.out 27 rm -rf *.gcda *.gcno 28 rm -rf coverage.info 29 rm -rf coverage-html 30 rm -rf *.svg 31 rm -rf *.data 32 rm -rf *.data.old 33 rm -rf *.folded 34 rm -rf *.info 35 36 browser-test: 37 ${TCOMMAND_P} tests/browser-test.cpp ${TCOMMAND_S} -o test1.out 38 ./test1.out 39 rm test1.out 40 41 fetch-test: 42 ${TCOMMAND_P} tests/fetch-test.cpp ${TCOMMAND_S} -o test2.out 43 ./test2.out 44 rm test2.out 45 46 puppet-test: 47 ${TCOMMAND_P} tests/puppet-test.cpp ${TCOMMAND_S} -o test6.out 48 ./test6.out 49 rm test6.out 50 51 pure-test: 52 ${TCOMMAND_P} tests/pure-test.cpp ${TCOMMAND_S} -o test3.out 53 ./test3.out 54 rm test3.out 55 56 # NOTE: This is purposely not included in the make test command 57 mem-leak-test: 58 ${STCOMMAND_P} tests/mem-leak-test.cpp ${COMMAND_S} -o test4.out 59 valgrind --tool=memcheck ./test4.out 60 rm test4.out 61 62 benchmark: 63 ${BCOMMAND_P} benchmarking/render-bench.cpp ${BCOMMAND_S} -o bench1.out 64 perf record -g ./bench1.out 65 rm bench1.out 66 67 test: format pure-test browser-test fetch-test puppet-test 68 lcov --capture --directory . --output-file coverage.info \ 69 --no-external \ 70 --rc geninfo_unexecuted_blocks=1 \ 71 --ignore-errors inconsistent,inconsistent 72 genhtml coverage.info --output-directory coverage-html \ 73 --ignore-errors inconsistent,inconsistent 74 rm -rf *.gcda *.gcno 75 rm -rf coverage.info 76 77 .PHONY: test pure-test browser-test fetch-test puppet-test benchmark mem-leak-test clean install build debug server format