-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
85 lines (68 loc) · 1.51 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
74
75
76
77
78
79
80
81
82
83
84
85
PORT ?= "0000:02:00.0"
CORE ?= 0
BASE_DIR = $(shell git rev-parse --show-toplevel)
POOL_SIZE ?= 512
[email protected]:williamofockham
.PHONY: build build-all build-ex build-nb build-rel build-rel-ex clean fmt \
init lint native run run-rel test watch watch-test
build:
@./build.sh build
build-all:
@./build.sh build_all
build-ex:
ifdef EXAMPLE
@./build.sh build_example $(EXAMPLE)
else
@./build.sh build_example
endif
build-nb:
@./build.sh build_fmwk
build-rel:
@./build.sh build_rel
build-rel-ex:
ifdef EXAMPLE
@./build.sh build_example_rel $(EXAMPLE)
else
@./build.sh build_example
endif
clean:
@./build.sh clean
fmt:
@./build.sh fmt
init:
@mkdir -p $(BASE_DIR)/.git/hooks && ln -s -f $(BASE_DIR)/.hooks/pre-commit $(BASE_DIR)/.git/hooks/pre-commit
-git clone $(GH)/utils.git
-ln -s utils/Vagrantfile
-git clone --recurse-submodules $(GH)/moongen.git
lint:
@./build.sh lint
native:
@./build.sh build_native
run:
ifdef EXAMPLE
@./build.sh run $(EXAMPLE) -p $(PORT) -c $(CORE) --pool-size=$(POOL_SIZE)
else
@./build.sh run
endif
run-rel:
ifdef EXAMPLE
@./build.sh run_rel $(EXAMPLE) -p $(PORT) -c $(CORE) --pool-size=$(POOL_SIZE)
else
@./build.sh run_rel
endif
test:
ifdef TEST
@unset RUST_BACKTRACE
@./build.sh build_example $(TEST)
@./build.sh test $(TEST)
@export RUST_BACKTRACE=1
else
@unset RUST_BACKTRACE
@./build.sh build
@./build.sh test
@export RUST_BACKTRACE=1
endif
watch:
@cargo watch --poll -x build -w framework/src
watch-test:
@cargo watch --poll -x test -w framework/src