aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorEmil A. Overbeck <emil.a.overbeck@gmail.com>2026-07-19 03:46:27 +0200
committerEmil A. Overbeck <emil.a.overbeck@gmail.com>2026-07-19 03:46:27 +0200
commitff85499d5567c36ce63e2d7903d5f872fd9aef1d (patch)
treeb15b1cab27e5bb5a2bb8d797905e47d08bcca889 /README.md
parent37b5f7c8bd0b4c0e297614577edb7b634c13d700 (diff)
downloadforts_clone-ff85499d5567c36ce63e2d7903d5f872fd9aef1d.tar.gz
forts_clone-ff85499d5567c36ce63e2d7903d5f872fd9aef1d.zip
Makefile
Diffstat (limited to 'README.md')
-rw-r--r--README.md35
1 files changed, 21 insertions, 14 deletions
diff --git a/README.md b/README.md
index 9d43332..911e32e 100644
--- a/README.md
+++ b/README.md
@@ -13,16 +13,27 @@ and EnTT are planned but not yet wired up.
### Container (reproducible, any distro)
+The `Makefile` wraps the Podman workflow. Run it from the repo root:
+
```sh
-podman build -t forts-clone-dev .
-podman run --rm -v "$PWD":/src:Z --userns=keep-id localhost/forts-clone-dev:latest \
- sh -c "cd /src && meson setup builddir && meson compile -C builddir"
-./builddir/forts-clone # run from repo root
+make image # one-time, and after editing Containerfile
+make run # compile in the container, then launch on the host
```
+| Target | What it does |
+|---|---|
+| `make build` | compile in the container (default; configures on first use) |
+| `make run` | compile, then run the game on the host |
+| `make check` | compile + validate the Lua data |
+| `make reconfigure` | re-run `meson setup` after editing `meson.build` |
+| `make shell` | interactive shell in the dev container |
+| `make clean` / `make clean-image` | remove `builddir/` / the dev image |
+
The container builds every dependency into `/usr/local` and links Lua
-statically, so the resulting binary runs on any host. You still run it on the
-host (it needs the host's SDL3 and a display).
+statically, so the resulting binary runs on any host. Compilation happens in the
+container, but the game runs on the host, which supplies SDL3 and a display;
+`make run` handles both halves. Run from the repo root either way, since `data/`
+is resolved relative to the working directory.
### Local (Arch Linux)
@@ -30,6 +41,10 @@ host (it needs the host's SDL3 and a display).
libraries the code actually uses. bgfx, SoLoud, ENet and EnTT are part of the
planned stack but not yet wired up, so they are not required to build.
+The `make` targets above all go through Podman, so a native build drives meson
+directly. (`make check-lua` is the exception: it runs on the host and works
+either way.)
+
```sh
# repo packages
sudo pacman -S --needed meson ninja gcc pkgconf sdl3 lua54 glm box2d
@@ -45,14 +60,6 @@ meson compile -C builddir
Native builds link Lua dynamically against the system `lua54`, which is fine
when you build and run on the same machine.
-### Removing the container image
-
-```sh
-podman rmi localhost/forts-clone-dev:latest # drop the dev image
-podman image prune -f # drop dangling build layers
-rm -rf builddir # meson dir, reconfigure after
-```
-
## Assets
The repo ships CC0 placeholders only. If you own Forts, real textures load at