Luna/tools/env.sh
apio 6761b3fcaf
Some checks failed
continuous-integration/drone/push Build is failing
tools: Finally a proper autoconf build?
2023-08-14 11:54:11 +02:00

20 lines
631 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:$LUNA_ROOT/toolchain/bin:$LUNA_ROOT/tools/exec/:$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