-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
51 lines (39 loc) · 1.46 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
.PHONY: build-release
cargo_check:
cargo check
cargo check --no-default-features -F json
cargo check --no-default-features -F sqlite
run_test:
cargo test
clippy:
cargo clippy
build-release:
cargo build --release
release-mac-x86_64: build-release
cargo build --release --target=x86_64-apple-darwin
strip target/x86_64-apple-darwin/release/tjournal
otool -L target/x86_64-apple-darwin/release/tjournal
mkdir -p release
tar -C ./target/x86_64-apple-darwin/release/ -czvf ./release/tjournal-mac-x86_64.tar.gz ./tjournal
ls -lisah ./release/tjournal-mac-x86_64.tar.gz
release-mac-arm64: build-release
cargo build --release --target=aarch64-apple-darwin
strip target/aarch64-apple-darwin/release/tjournal
otool -L target/aarch64-apple-darwin/release/tjournal
mkdir -p release
tar -C ./target/aarch64-apple-darwin/release/ -czvf ./release/tjournal-mac-arm64.tar.gz ./tjournal
ls -lisah ./release/tjournal-mac-arm64.tar.gz
release-win: build-release
mkdir -p release
7z -y a ./release/tjournal-win.zip ./target/release/tjournal.exe
release-linux:
cargo build --release --target=x86_64-unknown-linux-gnu
strip target/x86_64-unknown-linux-gnu/release/tjournal
mkdir -p release
tar -C ./target/x86_64-unknown-linux-gnu/release/ -czvf ./release/tjournal-linux-gnu.tar.gz ./tjournal
install:
cargo install --path "."
install_sqlite:
cargo install --path "." --no-default-features -F sqlite
install_json:
cargo install --path "." --no-default-features -F json