From dab58372432eb0917e873d93345dad3ed07ae9eb Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 17 Apr 2021 23:21:02 -0400 Subject: build static binaries with musl --- Makefile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'Makefile') 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) -- cgit v1.2.3-54-g00ecf