Luna/tools/env.sh
apio 0d924f89d3
All checks were successful
continuous-integration/drone/push Build is passing
tools: Avoid making the tests interfere with the main build directory
2023-07-21 14:49:59 +02:00

20 lines
583 B
Bash
Executable File

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