-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
43 lines (34 loc) · 847 Bytes
/
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
BUILDDIR := build/linux/
TOOL := build/linux/refunct-tas
LIB := build/linux/librtil.so
.PHONY: all
all: $(TOOL) $(LIB) scripts
.PHONY: zip
zip: all
cd build/ && cp -r linux practice-linux && zip -r practice-linux.zip practice-linux
.PHONY: clippy
clippy:
cd rtil && cargo clippy
cd tool && cargo clippy
.PHONY: check
check:
cd rtil && cargo check
cd tool && cargo check
.PHONY: $(TOOL) # always execute cargo
$(TOOL): $(BUILDDIR)
cd tool && cargo build
cp tool/target/debug/refunct-tas $(TOOL)
.PHONY: $(LIB) # always execute cargo
$(LIB): $(BUILDDIR)
cd rtil && cargo +nightly build --release
cp rtil/target/release/librtil.so $(LIB)
$(BUILDDIR):
mkdir -p $(BUILDDIR)
.PHONY: scripts
scripts: $(BUILDDIR)
bash -c 'cp tool/*.re $(BUILDDIR)'
.PHONY: clean
clean:
$(RM) -r build/
cd tool && cargo clean
cd rtil && cargo clean