This commit is contained in:
Your Name
2025-05-03 13:28:54 +12:00
parent 0d69e78ef7
commit a7580122dc
2 changed files with 5 additions and 3 deletions

2
.gitignore vendored
View File

@@ -1,6 +1,8 @@
# Build directories
build/
cmake-build-*/
build-*/
# CMake generated files
CMakeCache.txt

View File

@@ -7,7 +7,6 @@ set -e
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
CACHE_DIR="${SCRIPT_DIR}/cache"
EXE_DIR="${SCRIPT_DIR}/exe"
BUILD_DIR="${SCRIPT_DIR}/build"
# FUNCTIONS
function title() {
@@ -31,7 +30,8 @@ function die() {
function build() {
ARCH=$1
BUILD_DIR="${SCRIPT_DIR}/build-${ARCH}"
BUILD_NAME="build-${ARCH}"
BUILD_DIR="${SCRIPT_DIR}/${BUILD_NAME}"
mkdir -p ${BUILD_DIR}
DOCKCROSS_SCRIPT="${CACHE_DIR}/dockcross-${ARCH}"
@@ -44,7 +44,7 @@ function build() {
echo "Building $ARCH executable"
cd "${SCRIPT_DIR}"
"${DOCKCROSS_SCRIPT}" bash -c "cd ${BUILD_DIR} && cmake .. && make -j$(nproc)"
"${DOCKCROSS_SCRIPT}" bash -c "cd ${BUILD_NAME} && cmake .. && make -j$(nproc)"
if [ ! -f ${BUILD_DIR}/simple_object_storage ]; then
die "Failed to build $ARCH executable"