build: document system deps, add check-deps, auto-glob web modules
- README: rewrite Build section for the hand-written Makefile (make / make DEBUG=1 / run / test / bench). Add a "System dependencies" table with the X11+GL dev packages per distro (apt/dnf/pacman/zypper/apk), since a clone won't build without them and the error is otherwise cryptic. Fix stale ./bin/Debug paths to ./bin/Release. - Makefile: add `make check-deps` — probes for the required X11/GL dev headers and prints the install command for the detected distro on failure (via /etc/os-release). - build_web.sh: auto-discover app modules from src/*.c (drop the hardcoded APP_MODULES list that had to be hand-synced), matching the desktop Makefile. Excludes the desktop platform backends. Remove the stale rspektrum.make reference. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+12
-3
@@ -50,12 +50,21 @@ fi
|
||||
|
||||
# Compile the application modules (web version — no subprocess support).
|
||||
# platform_web.c provides stub implementations for spawn/error functions.
|
||||
# Keep this list in sync with rspektrum.make (use platform_web instead of
|
||||
# platform_linux for the web target).
|
||||
#
|
||||
# Auto-discovered from src/*.c (same as the desktop Makefile) so adding a module
|
||||
# needs no edit here. The web target keeps platform_web.c and drops the desktop
|
||||
# backends (platform_linux.c / platform_win32.c).
|
||||
echo "=== Step 2: Compiling spectrogram modules for web ==="
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
APP_MODULES="spectrogram fft stft audio render ui utils primitives mlnl platform_web"
|
||||
APP_MODULES=""
|
||||
for f in "$SRC_DIR"/*.c; do
|
||||
m=$(basename "$f" .c)
|
||||
case "$m" in
|
||||
platform_linux|platform_win32) continue ;; # desktop-only backends
|
||||
esac
|
||||
APP_MODULES="$APP_MODULES $m"
|
||||
done
|
||||
|
||||
APP_OPT="-Os"
|
||||
if [ "$BUILD_TYPE" = "debug" ]; then
|
||||
|
||||
Reference in New Issue
Block a user