2026-02-10 01:24:49 -08:00
|
|
|
#!/bin/bash
|
|
|
|
|
# Wowee Build Script - Ensures no stale binaries
|
|
|
|
|
|
|
|
|
|
set -e # Exit on error
|
|
|
|
|
|
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
|
|
|
|
|
echo "Building wowee..."
|
|
|
|
|
|
|
|
|
|
# Create build directory if it doesn't exist
|
|
|
|
|
mkdir -p build
|
|
|
|
|
cd build
|
|
|
|
|
|
|
|
|
|
# Configure with cmake
|
|
|
|
|
echo "Configuring with CMake..."
|
|
|
|
|
cmake .. -DCMAKE_BUILD_TYPE=Release
|
|
|
|
|
|
|
|
|
|
# Build with all cores
|
2026-02-23 18:35:53 -08:00
|
|
|
NPROC=$(nproc 2>/dev/null || sysctl -n hw.logicalcpu 2>/dev/null || echo 4)
|
|
|
|
|
echo "Building with $NPROC cores..."
|
|
|
|
|
cmake --build . --parallel "$NPROC"
|
2026-02-10 01:24:49 -08:00
|
|
|
|
|
|
|
|
# Ensure Data symlink exists in bin directory
|
|
|
|
|
cd bin
|
|
|
|
|
if [ ! -e Data ]; then
|
|
|
|
|
ln -s ../../Data Data
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
echo "Build complete! Binary: build/bin/wowee"
|
|
|
|
|
echo "Run with: cd build/bin && ./wowee"
|