Luna/tools/env.sh
apio 8838e2cf22
Some checks failed
continuous-integration/drone/push Build is failing
Bring back the OS-Specific Toolchain on restart :^)
2023-01-06 17:35:07 +01:00

20 lines
488 B
Bash
Executable File

#!/usr/bin/env bash
export LUNA_ROOT=${LUNA_ROOT:-$(realpath $(dirname $0)/..)}
export LUNA_BASE=${LUNA_BASE:-$LUNA_ROOT/base}
export PATH=$LUNA_ROOT/toolchain/x86_64-luna/bin:$LUNA_ROOT/toolchain/dist:$PATH
[ -f "$LUNA_ROOT/env-local.sh" ] && source $LUNA_ROOT/env-local.sh
export ARCH=${ARCH:-x86_64}
if [ "$USE_MAKE" = "1" ]
then
export BUILD=make
export CMAKE_GEN="Unix Makefiles"
else
export BUILD=ninja
export CMAKE_GEN="Ninja"
fi
export BUILD_DIR=$LUNA_ROOT/build/$BUILD-$ARCH