-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
63 lines (46 loc) · 1.73 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
BUILD_DIR := .
ifeq ($(wildcard /.dockerenv),)
# not in docker
BUILD_DIR := build
endif
sync-docker-files:
scripts/docker_rsync.sh
clean:
rm -rf ${BUILD_DIR}/cmake-build-debug
clean-in-docker:
docker exec controller bash -c "cd /root/sandtable && make clean"
build-sandtable:
@test -f /.dockerenv || echo "Warning: SandTable should be built in docker (make build-sandtable-in-docker)"
cmake -B ${BUILD_DIR}/cmake-build-debug -S src
cmake --build ${BUILD_DIR}/cmake-build-debug -j $(shell nproc)
build-sandtable-in-docker:
docker exec controller bash -c "cd /root/sandtable && make build-sandtable"
build-cpp-raft-driver:
cmake -B ${BUILD_DIR}/cmake-build-debug/drivers -S systems/WRaft-series/driver
cmake --build ${BUILD_DIR}/cmake-build-debug/drivers -j $(shell nproc)
build-cpp-raft-driver-in-docker:
docker exec controller bash -c "cd /root/sandtable && make build-cpp-raft-driver"
config-network:
sudo scripts/batch_config_tproxy.sh -n 20 -b docker -c controller start
unconfig-network:
sudo scripts/batch_config_tproxy.sh -n 20 -b docker -c controller stop
config-network-lxd:
sudo scripts/batch_config_tproxy.sh -n 20 -b lxc -c sandtable-lxc start
unconfig-network-lxd:
sudo scripts/batch_config_tproxy.sh -n 20 -b lxc -c sandtable-lxc stop
build-docker:
cd docker && docker-compose build
start-docker: sync-docker-files
cd docker && docker-compose up -d
make build-sandtable-in-docker
make build-cpp-raft-driver-in-docker
make config-network
stop-docker:
make unconfig-network
cd docker && docker-compose down
#### system specific targets
include systems/PySyncObj/Makefile
include systems/WRaft-series/Makefile
include systems/RaftOS/Makefile
include systems/Xraft-series/Makefile
include systems/ZooKeeper/Makefile