Skip to content
Snippets Groups Projects
Commit 5ce30e6d authored by bjorn3's avatar bjorn3
Browse files

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.
parent cf04f50d
No related branches found
No related tags found
No related merge requests found
...@@ -33,21 +33,20 @@ CONTAINERFILE?=podman/redox-base-containerfile ...@@ -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 ...@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment