-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (48 loc) · 1.45 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
BUILD_DIR := build
REDPILE := ./build/src/redpile conf/redstone.lua
BENCHMARK := ${REDPILE} --benchmark
VALGRIND := valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes
RSPEC := rspec
COMPILE := make --no-print-directory
.PHONY: all clean release debug run install test bench memcheck docs publish help
all: release
${BUILD_DIR}:
mkdir -p ${BUILD_DIR}
clean:
rm -rf ${BUILD_DIR}
release: ${BUILD_DIR}
cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=RELEASE .. && ${COMPILE}
debug: ${BUILD_DIR}
cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=DEBUG .. && ${COMPILE}
run:
${REDPILE} -i
install:
cd ${BUILD_DIR} && make install --no-print-directory
test: debug
${RSPEC}
TEST_INTERACTIVE=true ${RSPEC}
memtest: debug
TEST_VALGRIND=true ${RSPEC}
memcheck: debug
${VALGRIND} ${REDPILE} -i
bench: release
${BENCHMARK} 1000
docs:
./docs/generate.rb
paper:
rubber --pdf --into ${BUILD_DIR} docs/redpile.tex
zathura build/redpile.pdf 2>/dev/null
publish: docs
scp docs/*.html redpile:~/webapps/redpile_org
help:
# release - Build redpile in release mode
# debug - Build redpile in debug mode
# clean - Remove all build files
# run - Start an interactive session in redpile
# install - Install binaries in the local system
# test - Run all tests
# memtest - Run all tests under valgrind
# memcheck - Run redpile under valgrind
# bench - Run benchmarks
# docs - Generate documentation
# publish - Publish documentation