2022-10-08 13:35:39 +00:00
|
|
|
#!/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
|
|
|
|
2022-11-19 16:46:53 +00:00
|
|
|
[ -f "$LUNA_ROOT/env-local.sh" ] && source $LUNA_ROOT/env-local.sh
|
|
|
|
|
2023-01-21 21:44:16 +00:00
|
|
|
export LUNA_ARCH=${LUNA_ARCH:-x86_64}
|
2023-08-08 18:28:11 +00:00
|
|
|
export PATH=$LUNA_ROOT/toolchain/$LUNA_ARCH-luna/bin:$LUNA_ROOT/toolchain/dist:$LUNA_ROOT/tools/exec/:$PATH
|
2022-11-19 16:46:53 +00:00
|
|
|
|
2022-11-23 18:01:28 +00:00
|
|
|
if [ "$USE_MAKE" = "1" ]
|
2022-11-19 16:46:53 +00:00
|
|
|
then
|
2023-01-21 21:44:16 +00:00
|
|
|
export LUNA_BUILD=make
|
|
|
|
export LUNA_CMAKE_GENERATOR_NAME="Unix Makefiles"
|
2022-11-23 18:01:28 +00:00
|
|
|
else
|
2023-01-21 21:44:16 +00:00
|
|
|
export LUNA_BUILD=ninja
|
|
|
|
export LUNA_CMAKE_GENERATOR_NAME="Ninja"
|
2022-11-19 16:46:53 +00:00
|
|
|
fi
|
|
|
|
|
2023-07-21 12:49:59 +00:00
|
|
|
export LUNA_BUILD_DIR=$LUNA_ROOT/build/${LUNA_BUILD_PREFIX:-""}$LUNA_BUILD-$LUNA_ARCH
|