Only build musl binaries on linux.

This commit is contained in:
Tom Alexander 2023-04-20 22:53:17 -04:00
parent 633d6e421f
commit 3a174dd41b
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 6 additions and 1 deletions

View File

@ -6,9 +6,14 @@ MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
TESTJOBS := 4
OS:=$(shell uname -s)
RELEASEFLAGS :=
ifeq ($(OS),Linux)
TESTJOBS:=$(shell nproc)
RELEASEFLAGS=--target x86_64-unknown-linux-musl
endif
ifeq ($(OS),FreeBSD)
TESTJOBS:=$(shell sysctl -n hw.ncpu)
endif
ifeq ($(origin .RECIPEPREFIX), undefined)
@ -22,7 +27,7 @@ build:
.PHONY: release
release:
> cargo build --release --target x86_64-unknown-linux-musl
> cargo build --release $(RELEASEFLAGS)
.PHONY: clean
clean: