redox/mk/config.mk

69 lines
1.7 KiB
Makefile
Raw Normal View History

2017-01-05 22:07:20 +01:00
# Configuration
## Architecture to build Redox for (aarch64 or x86_64)
2017-01-05 22:07:20 +01:00
ARCH?=x86_64
## Flags to pass to the installer (empty to download binary packages)
INSTALLER_FLAGS?=--cookbook=cookbook
## Enabled to use binary prefix (much faster)
2019-06-19 04:10:30 +02:00
PREFIX_BINARY?=1
## Enabled to build custom rustc
PREFIX_RUSTC?=1
## Filesystem size in MB (256 is the default)
FILESYSTEM_SIZE?=256
2017-01-05 22:07:20 +01:00
2017-02-01 22:15:48 +01:00
# Per host variables
UNAME := $(shell uname)
ifeq ($(UNAME),Darwin)
FUMOUNT=sudo umount
export NPROC=sysctl -n hw.ncpu
PREFIX_BINARY=0
2017-02-01 22:15:48 +01:00
VB_AUDIO=coreaudio
VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
2020-05-03 02:45:15 +02:00
else ifeq ($(UNAME),FreeBSD)
2020-05-03 02:13:21 +02:00
FUMOUNT=sudo umount
export NPROC=sysctl -n hw.ncpu
PREFIX_BINARY=0
VB_AUDIO=pulse # To check, will probaly be OSS on most setups
VBM=VBoxManage
2017-02-01 22:15:48 +01:00
else
FUMOUNT=fusermount -u
export NPROC=nproc
VB_AUDIO=pulse
2017-02-01 22:15:48 +01:00
VBM=VBoxManage
endif
2017-01-05 22:07:20 +01:00
# Automatic variables
ROOT=$(CURDIR)
export RUST_COMPILER_RT_ROOT=$(ROOT)/rust/src/llvm-project/compiler-rt
2017-01-16 18:10:56 +01:00
export RUST_TARGET_PATH=$(ROOT)/kernel/targets
export XARGO_HOME=$(ROOT)/build/xargo
2017-05-11 05:39:05 +02:00
export XARGO_RUST_SRC=$(ROOT)/rust/src
2017-01-05 22:07:20 +01:00
## 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
2018-12-23 00:45:16 +01:00
AR=$(TARGET)-gcc-ar
2018-11-28 03:45:52 +01:00
AS=$(TARGET)-as
CC=$(TARGET)-gcc
CXX=$(TARGET)-g++
LD=$(TARGET)-ld
2018-12-23 00:45:16 +01:00
NM=$(TARGET)-gcc-nm
2018-11-28 03:45:52 +01:00
OBJCOPY=$(TARGET)-objcopy
OBJDUMP=$(TARGET)-objdump
2018-12-23 00:45:16 +01:00
RANLIB=$(TARGET)-gcc-ranlib
2018-11-28 03:45:52 +01:00
READELF=$(TARGET)-readelf
STRIP=$(TARGET)-strip
## Rust cross compile variables
2018-11-28 03:45:52 +01:00
export AR_$(subst -,_,$(TARGET))=$(TARGET)-ar
export CC_$(subst -,_,$(TARGET))=$(TARGET)-gcc
export CXX_$(subst -,_,$(TARGET))=$(TARGET)-g++