Luna/tools/env.sh

20 lines
631 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
2022-10-26 19:56:43 +00:00
export LUNA_ROOT=${LUNA_ROOT:-$(realpath $(dirname $0)/..)}
export LUNA_BASE=${LUNA_BASE:-$LUNA_ROOT/base}
2022-10-02 15:01:30 +00:00
[ -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
2022-11-23 18:01:28 +00:00
if [ "$USE_MAKE" = "1" ]
then
export LUNA_BUILD=make
export LUNA_CMAKE_GENERATOR_NAME="Unix Makefiles"
2022-11-23 18:01:28 +00:00
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