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
|
|
|
|
|
|
|
|
export ARCH=${ARCH:-x86_64}
|
2023-01-11 18:14:35 +00:00
|
|
|
export PATH=$LUNA_ROOT/toolchain/$ARCH-luna/bin:$LUNA_ROOT/toolchain/dist:$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
|
|
|
|
export BUILD=make
|
|
|
|
export CMAKE_GEN="Unix Makefiles"
|
2022-11-23 18:01:28 +00:00
|
|
|
else
|
|
|
|
export BUILD=ninja
|
|
|
|
export CMAKE_GEN="Ninja"
|
2022-11-19 16:46:53 +00:00
|
|
|
fi
|
|
|
|
|
2023-01-06 16:35:07 +00:00
|
|
|
export BUILD_DIR=$LUNA_ROOT/build/$BUILD-$ARCH
|