-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
30 lines (21 loc) · 897 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
EXE_x86_64 = ./target/x86_64-unknown-linux-musl/release/mprober
EXE_i686 = ./target/i686-unknown-linux-musl/release/mprober
INSTALLED_EXE = /usr/local/bin/mprober
all: x86_64 i686
x86_64: $(EXE_x86_64)
i686: $(EXE_i686)
$(EXE_x86_64): $(shell find . -type f -iname '*.rs' -o -name 'Cargo.toml' | grep -v ./target | sed 's/ /\\ /g') $(shell find ./front-end ./views -type f | sed 's/ /\\ /g')
cargo build --release --target x86_64-unknown-linux-musl
$(EXE_i686): $(shell find . -type f -iname '*.rs' -o -name 'Cargo.toml' | grep -v ./target | sed 's/ /\\ /g') $(shell find ./front-end ./views -type f | sed 's/ /\\ /g')
cross build --release --target i686-unknown-linux-musl
install:
$(MAKE)
sudo cp $(EXE_x86_64) $(INSTALLED_EXE)
sudo chown root: $(INSTALLED_EXE)
sudo chmod 0755 $(INSTALLED_EXE)
uninstall:
sudo rm $(INSTALLED_EXE)
test:
cargo test --verbose
clean:
cargo clean