forked from ccp-project/portus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
71 lines (53 loc) · 1.71 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
all: build test-portus test-ipc libccp-integration lint algs
travis: build test-portus libccp-integration bindings
OS := $(shell uname)
CLIPPY := $(shell rustup component list --toolchain nightly | grep "clippy" | grep -c "installed")
build:
cargo +nightly build --all
test-portus: build
cargo +nightly test --all
test-ipc: build
ifeq ($(OS), Linux)
sudo ./target/debug/nltest
sudo ./target/debug/kptest
endif
lint:
ifeq ($(CLIPPY), 1)
cargo +nightly clippy
else
$(warning clippy not installed, skipping...)
endif
cargo_bench: build test
cargo +nightly bench --all
ipc_latency: build
sudo ./target/debug/ipc_latency -i 10
bench: cargo_bench ipc_latency
algs: generic
generic:
cd ccp_generic_cong_avoid && cargo +nightly build
ifeq ($(CLIPPY), 1)
cd ccp_generic_cong_avoid && cargo +nightly clippy
else
$(warning clippy not installed, skipping...)
endif
clean:
cargo clean
cd ccp_generic_cong_avoid && cargo clean
$(MAKE) -C integration_tests/libccp_integration/libccp clean
cd integration_tests/libccp_integration && cargo clean
$(MAKE) -C src/ipc/test-char-dev/ccp-kernel clean
integration-test:
python integration_tests/algorithms/compare.py reference-trace
integration_tests/libccp_integration/libccp/ccp.h:
$(error Did you forget to git submodule update --init --recursive ?)
libccp-integration: integration_tests/libccp_integration/libccp/ccp.h
ifeq ($(OS), Linux)
cd integration_tests/libccp_integration && export LD_LIBRARY_PATH=./libccp && cargo +nightly test -- --test-threads=1
endif
ifeq ($(OS), Darwin)
cd integration_tests/libccp_integration && export DYLD_LIBRARY_PATH=./libccp && cargo +nightly test -- --test-threads=1
endif
.PHONY: bindings python
bindings: python
python:
$(MAKE) -C python/