aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-04-17 23:21:02 -0400
committerJesse Luehrs <doy@tozt.net>2021-04-17 23:50:43 -0400
commitdab58372432eb0917e873d93345dad3ed07ae9eb (patch)
tree04cbf0460f49f90cda6646d9dee7e07d09cc03dc /Makefile
parentf209a0ff18476c99629321e1ce141e3114857de3 (diff)
downloadrbw-dab58372432eb0917e873d93345dad3ed07ae9eb.tar.gz
rbw-dab58372432eb0917e873d93345dad3ed07ae9eb.zip
build static binaries with musl
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 5 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index adc5a6d..6ba6476 100644
--- a/Makefile
+++ b/Makefile
@@ -7,23 +7,19 @@ all: build
.PHONY: all
build:
- @cargo build --all-targets
+ @cargo build --all-targets --target x86_64-unknown-linux-musl
.PHONY: build
release:
- @cargo build --release --all-targets
- @./build/fix-glibc-function-versions ./target/release/rbw
- @./build/fix-glibc-function-versions ./target/release/rbw-agent
- @mv ./target/release/rbw.new ./target/release/rbw
- @mv ./target/release/rbw-agent.new ./target/release/rbw-agent
+ @cargo build --release --all-targets --target x86_64-unknown-linux-musl
.PHONY: release
test:
- @RUST_BACKTRACE=1 cargo test
+ @RUST_BACKTRACE=1 cargo test --target x86_64-unknown-linux-musl
.PHONY: test
check:
- @cargo check --all-targets
+ @cargo check --all-targets --target x86_64-unknown-linux-musl
.PHONY: check
doc:
@@ -45,7 +41,7 @@ pkg:
@mkdir pkg
pkg/$(DEB_PACKAGE): release | pkg
- @cargo deb --no-build && mv target/debian/$(DEB_PACKAGE) pkg
+ @cargo deb --no-build --target x86_64-unknown-linux-musl && mv target/x86_64-unknown-linux-musl/debian/$(DEB_PACKAGE) pkg
pkg/$(DEB_PACKAGE).minisig: pkg/$(DEB_PACKAGE)
@minisign -Sm pkg/$(DEB_PACKAGE)