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

View File

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