-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
73 lines (65 loc) · 2.48 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
65
66
67
68
69
70
71
72
73
all: netbricks
(cd db; cargo build --release)
(cd splinter; cargo build --release)
(cd ext/bad; cargo build --release)
(cd ext/tao; cargo build --release)
(cd ext/get; cargo build --release)
(cd ext/put; cargo build --release)
(cd ext/err; cargo build --release)
(cd ext/long; cargo build --release)
(cd ext/aggregate; cargo build --release)
(cd ext/pushback; cargo build --release)
(cd ext/scan; cargo build --release)
(cd ext/analysis; cargo build --release)
(cd ext/auth; cargo build --release)
(cd ext/ycsbt; cargo build --release)
(cd ext/checksum; cargo build --release)
.PHONY: so-test
so-test: netbricks
(cd db; cargo build --release)
(cd splinter; cargo build --release)
(cd ext/test; cargo build --release)
$(foreach i,$(shell seq 0 99),cp ext/test/target/release/libtest.so ext/test/target/release/libtest$(i).so;)
(cd db; LD_LIBRARY_PATH=../net/target/native RUST_BACKTRACE=1 cargo run --release --bin ext_bench)
(cd ext/test; cargo clean)
bench: netbricks
(cd db; LD_LIBRARY_PATH=../net/target/native cargo run --release --bin table_bench)
run:
(cd db; RUST_LOG=db cargo run -- --nocapture)
netbricks:
(cd net/native; make)
mkdir -p net/target/native
cp net/native/libzcsi.so net/target/native/libzcsi.so
test: netbricks
(cd ext/test; cargo build --release)
(cd db; LD_LIBRARY_PATH=../net/target/native cargo test)
(cd splinter; LD_LIBRARY_PATH=../net/target/native cargo test)
(cd sandstorm; LD_LIBRARY_PATH=../net/target/native cargo test)
coverage: netbricks
(curl -sL https://github.com/xd009642/tarpaulin/releases/download/0.7.0/cargo-tarpaulin-0.7.0-travis.tar.gz |\
tar xvz -C ${HOME}/.cargo/bin)
(cd ext/test; cargo build --release)
(cd db; LD_LIBRARY_PATH=../net/target/native cargo-tarpaulin)
(cd splinter; LD_LIBRARY_PATH=../net/target/native cargo-tarpaulin)
(cd sandstorm; LD_LIBRARY_PATH=../net/target/native cargo-tarpaulin)
(rm -rf db/target/debug/; rm -rf splinter/target/debug/; rm -rf sandstorm/target/debug/)
clean:
(cd db; cargo clean)
(cd splinter; cargo clean)
(cd ext/bad; cargo clean)
(cd ext/tao; cargo clean)
(cd ext/get; cargo clean)
(cd ext/put; cargo clean)
(cd ext/err; cargo clean)
(cd ext/test; cargo clean)
(cd ext/long; cargo clean)
(cd ext/aggregate; cargo clean)
(cd ext/pushback; cargo clean)
(cd ext/scan; cargo clean)
(cd ext/analysis; cargo clean)
(cd ext/auth; cargo clean)
(cd ext/ycsbt; cargo clean)
(cd ext/checksum; cargo clean)
(cd sandstorm; cargo clean)
(cd net; ./build.sh clean)
(cd util; cargo clean)