Somewhat simplify config.mk
* nproc exists on FreeBSD too * REDOX_MAKE is generally make, so use that as default with per-OS override if necessary. * HOST_TARGET can be fetched directly from rustc.
This commit is contained in:
parent
cf04f50d86
commit
5ce30e6da6
12
mk/config.mk
12
mk/config.mk
|
@ -33,21 +33,20 @@ CONTAINERFILE?=podman/redox-base-containerfile
|
||||||
|
|
||||||
# Per host variables
|
# Per host variables
|
||||||
HOST_CARGO=env -u RUSTUP_TOOLCHAIN cargo
|
HOST_CARGO=env -u RUSTUP_TOOLCHAIN cargo
|
||||||
|
export NPROC=nproc
|
||||||
|
export REDOX_MAKE=make
|
||||||
|
HOST_TARGET := $(shell rustc -vV | grep host | cut -d: -f2 | tr -d " ")
|
||||||
UNAME := $(shell uname)
|
UNAME := $(shell uname)
|
||||||
ifeq ($(UNAME),Darwin)
|
ifeq ($(UNAME),Darwin)
|
||||||
FUMOUNT=umount
|
FUMOUNT=umount
|
||||||
export NPROC=sysctl -n hw.ncpu
|
export NPROC=sysctl -n hw.ncpu
|
||||||
export REDOX_MAKE=make
|
|
||||||
VB_AUDIO=coreaudio
|
VB_AUDIO=coreaudio
|
||||||
VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
|
VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
|
||||||
HOST_TARGET ?= $(HOST_ARCH)-apple-darwin
|
|
||||||
else ifeq ($(UNAME),FreeBSD)
|
else ifeq ($(UNAME),FreeBSD)
|
||||||
FUMOUNT=sudo umount
|
FUMOUNT=sudo umount
|
||||||
export NPROC=sysctl -n hw.ncpu
|
|
||||||
export REDOX_MAKE=gmake
|
export REDOX_MAKE=gmake
|
||||||
VB_AUDIO=pulse # To check, will probaly be OSS on most setups
|
VB_AUDIO=pulse # To check, will probably be OSS on most setups
|
||||||
VBM=VBoxManage
|
VBM=VBoxManage
|
||||||
HOST_TARGET ?= $(HOST_ARCH)-unknown-freebsd
|
|
||||||
else
|
else
|
||||||
# Detect which version of the fusermount binary is available.
|
# Detect which version of the fusermount binary is available.
|
||||||
ifneq (, $(shell which fusermount3))
|
ifneq (, $(shell which fusermount3))
|
||||||
|
@ -56,11 +55,8 @@ else
|
||||||
FUMOUNT=fusermount -u
|
FUMOUNT=fusermount -u
|
||||||
endif
|
endif
|
||||||
|
|
||||||
export NPROC=nproc
|
|
||||||
export REDOX_MAKE=make
|
|
||||||
VB_AUDIO=pulse
|
VB_AUDIO=pulse
|
||||||
VBM=VBoxManage
|
VBM=VBoxManage
|
||||||
HOST_TARGET ?= $(HOST_ARCH)-unknown-linux-gnu
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(UNAME),Linux)
|
ifneq ($(UNAME),Linux)
|
||||||
|
|
Loading…
Reference in a new issue