Makefile cleanup, default to binary prefix
This commit is contained in:
parent
7f9a82752d
commit
40d9117b17
1 changed files with 41 additions and 39 deletions
43
mk/config.mk
43
mk/config.mk
|
|
@ -1,34 +1,48 @@
|
|||
# Configuration
|
||||
## Architecture to build Redox for (aarch64 or x86_64)
|
||||
ARCH?=x86_64
|
||||
## Flags to pass to the installer (empty to download binary packages)
|
||||
INSTALLER_FLAGS?=--cookbook=cookbook
|
||||
PREFIX_BINARY?=0
|
||||
## Enabled to use binary prefix (much faster)
|
||||
PREFIX_BINARY?=1
|
||||
## Enabled to build custom rustc
|
||||
PREFIX_RUSTC?=0
|
||||
# Filesystem Size in MB
|
||||
## Filesystem size in MB (256 is the default)
|
||||
FILESYSTEM_SIZE?=256
|
||||
|
||||
# Per host variables
|
||||
UNAME := $(shell uname)
|
||||
ifeq ($(UNAME),Darwin)
|
||||
ECHO=/bin/echo
|
||||
FUMOUNT=sudo umount
|
||||
export NPROC=sysctl -n hw.ncpu
|
||||
PREFIX_BINARY=0
|
||||
VB_AUDIO=coreaudio
|
||||
VBM="/Applications/VirtualBox.app/Contents/MacOS/VBoxManage"
|
||||
VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
|
||||
else
|
||||
ECHO=echo
|
||||
FUMOUNT=fusermount -u
|
||||
export NPROC=nproc
|
||||
VB_AUDIO="pulse"
|
||||
VB_AUDIO=pulse
|
||||
VBM=VBoxManage
|
||||
endif
|
||||
|
||||
# Automatic variables
|
||||
ROOT=$(PWD)
|
||||
ROOT=$(CURDIR)
|
||||
export RUST_TARGET_PATH=$(ROOT)/kernel/targets
|
||||
export XARGO_HOME=$(ROOT)/build/xargo
|
||||
export XARGO_RUST_SRC=$(ROOT)/rust/src
|
||||
|
||||
# Cross compiler variables
|
||||
## Kernel variables
|
||||
KTARGET=$(ARCH)-unknown-none
|
||||
KBUILD=build/kernel
|
||||
|
||||
## Userspace variables
|
||||
export TARGET=$(ARCH)-unknown-redox
|
||||
BUILD=build/userspace
|
||||
|
||||
## Bootloader variables
|
||||
EFI_TARGET=$(ARCH)-efi-pe
|
||||
|
||||
## Cross compiler variables
|
||||
AR=$(TARGET)-gcc-ar
|
||||
AS=$(TARGET)-as
|
||||
CC=$(TARGET)-gcc
|
||||
|
|
@ -41,18 +55,7 @@ RANLIB=$(TARGET)-gcc-ranlib
|
|||
READELF=$(TARGET)-readelf
|
||||
STRIP=$(TARGET)-strip
|
||||
|
||||
# Rust cross compile variables
|
||||
## Rust cross compile variables
|
||||
export AR_$(subst -,_,$(TARGET))=$(TARGET)-ar
|
||||
export CC_$(subst -,_,$(TARGET))=$(TARGET)-gcc
|
||||
export CXX_$(subst -,_,$(TARGET))=$(TARGET)-g++
|
||||
|
||||
# Bootloader variables
|
||||
EFI_TARGET=$(ARCH)-efi-pe
|
||||
|
||||
# Kernel variables
|
||||
KTARGET=$(ARCH)-unknown-none
|
||||
KBUILD=build/kernel
|
||||
|
||||
# Userspace variables
|
||||
export TARGET=$(ARCH)-unknown-redox
|
||||
BUILD=build/userspace
|
||||
|
|
|
|||
Loading…
Reference in a new issue