-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
50 lines (35 loc) · 1.23 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
VER=$(shell cargo pkgid | cut -d\# -f2 | cut -d: -f2)
GIT_VER=$(shell git rev-parse --short HEAD)
APP_VERSION=${VER}.${GIT_VER}
TARBALL="target/tarball"
APP_NAME="aprsproxy"
all: debug
ver:
@echo Version: ${APP_NAME} v${APP_VERSION}
debug:
cargo build
macos:
cargo build --release --target x86_64-apple-darwin
armv7:
cargo build --release --target armv7-unknown-linux-musleabihf
linux:
cargo build --release --target x86_64-unknown-linux-musl
clean:
cargo clean
tarball: macos linux armv7
@echo Creating tarball...
@mkdir -p ${TARBALL}
@echo Creating x86_64-apple-darwin
@tar cvfz "${TARBALL}/${APP_NAME}-${APP_VERSION}-x86_64-apple-darwin.tar.gz" -C target/x86_64-apple-darwin/release/ ${APP_NAME}
@echo Creating x86_64-unknown-linux-musl
@tar cvfz "${TARBALL}/${APP_NAME}-${APP_VERSION}-x86_64-unknown-linux-musl.tar.gz" -C target/x86_64-unknown-linux-musl/release/ ${APP_NAME}
@echo Creating armv7-unknown-linux-musleabihf
@tar cvfz "${TARBALL}/${APP_NAME}-${APP_VERSION}-armv7-unknown-linux-musleabihf.tar.gz" -C target/armv7-unknown-linux-musleabihf/release/ ${APP_NAME}
lint:
cargo clippy --all
fmt:
cargo +nightly fmt --all
docker: linux
docker build -t lazywalker/aprsproxy .
docker-push:
docker push lazywalker/aprsproxy