Luna/tools/env.sh
apio a6974b605e
All checks were successful
continuous-integration/drone/push Build is passing
tools+CMake: Prefix all environment variables with LUNA_
2023-01-21 22:44:16 +01:00

20 lines
559 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-$LUNA_ARCH