Files
PodTui/Makefile
Michael Freno c9e3aa92ec fix release pipeline: vendored cava source, fftw in CI, runner arch, smoke test
- Vendor cava/cavacore.c + header (MIT, from karlstav/cava) — the FFI build
  referenced cava/cavacore.c which was never committed, so every CI runner
  failed at scripts/build-cavacore.sh and no release was possible.
- build-cavacore.sh: discover libfftw3.a across Homebrew and Debian/Ubuntu
  multiarch paths (FFTW_PREFIX override preserved).
- release.yml: install fftw before building cavacore; run the boot smoke test
  from a bunfig-free dir (the embedded runtime reads the CWD bunfig.toml and
  this repo's preload entry breaks it — 'preload not found'); use
  macos-15-intel for darwin-x64 (macos-latest is arm64).
- Makefile/build.ts: drop the no-op BUN_CONFIG=bunfig.standalone.toml compile
  dance (Bun never honored it; compile output is config-independent); delete
  bunfig.standalone.toml.
2026-08-07 14:27:35 -04:00

66 lines
2.1 KiB
Makefile

# PodTui — Makefile
#
# Development targets:
# make install install dependencies (bun install) + build native lib
# make dev run with hot reload
# make test run the test suite
# make build produce the JS bundle + native libs in dist/
# make native build the cavacore FFI library from C source
# make lint run typecheck-style checks (lsp), not eslint
#
# Packaging / release targets:
# make dist build a standalone compiled binary + tarball for the
# CURRENT platform (see dist/ for podtui + libs + tarball)
# make dist-mac alias for `dist` targeting macOS (run on macOS)
# make dist-linux alias for `dist` targeting Linux (run on Linux)
# make clean remove dist/ output
#
# Cross-platform binaries are produced by CI (GitHub Actions) with one runner
# per OS/arch — Bun cannot cross-compile, so dist:mac / dist:linux only produce
# the binary for the OS they run on. Each runner runs `make dist` and uploads
# its podtui-<platform>-<arch>.tar.gz artifact.
SHELL := /bin/bash
.PHONY: install dev build native dist dist-mac dist-linux test clean
## Install dependencies and build the native runtime library.
install:
bun install
make native
## Run the dev server with hot reload.
dev:
bun run dev
## Type-check the whole project. (See AGENTS.md: `bun run lint` points at a
## nonexistent lint.ts; LSP diagnostics are the maintained clean bar.)
lint:
bun tsc --noEmit
## Build the JS bundle + native libs into dist/ (the `podtui` npm bin target).
build:
bun run build
## Build the cavacore FFI library from src/native/cavacore.c.
native:
scripts/build-cavacore.sh
## Standalone binary + native-libs tarball for the current platform.
## Unaffected by bunfig.toml at build time. Note: the compiled runtime reads
## the launching process's CWD bunfig.toml, so smoke tests must run the binary
## from a bunfig-free dir (see release.yml).
dist:
bun run build.ts --compile
## macOS build (run on a macOS runner / host).
dist-mac:
bun run build.ts --compile
## Linux build (run on a Linux runner / host).
dist-linux:
bun run build.ts --compile
## Remove build artifacts.
clean:
rm -rf dist