diff options
| author | Cliff Click <cliffc@acm.org> | 2026-11-12 13:16:00 -0800 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2026-11-12 13:52:46 -0800 |
| commit | 467338ee01565234762db8077c067df42c3b40a8 (patch) | |
| tree | 42c44a77da87c4811b1eb7611d0952dc2c55e022 /chapter31/docs/graphics.md | |
| parent | 0720fd8ed0aa92248622a9f3c3ebd522b002fd91 (diff) | |
| download | Simple-467338ee01565234762db8077c067df42c3b40a8.tar.gz Simple-467338ee01565234762db8077c067df42c3b40a8.zip | |
Add audio, overhaul makefiles
Adds simple audio support to Simple
Overhaul makefiles; remove common boilerplate; make them more uniform
Diffstat (limited to 'chapter31/docs/graphics.md')
| -rw-r--r-- | chapter31/docs/graphics.md | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/chapter31/docs/graphics.md b/chapter31/docs/graphics.md index fb3972ee..2394a401 100644 --- a/chapter31/docs/graphics.md +++ b/chapter31/docs/graphics.md @@ -7,12 +7,14 @@ provides a window, input, and pixel presentation. The first interface is The [drawing library and graphical tic-tac-toe](drawing.md) build on this pixel interface. `make run-graphical-tictactoe CTAGS=` builds the optional backend and opens the game; `make graphical-tictactoe CTAGS=` only builds its executable. +The game run target also builds optional [background audio](audio.md). ## Default: no graphics dependency From `chapter31`, the usual `make release`, `make tests`, and `make tictactoe` need no MiniFB, graphics headers, OpenGL, CMake, or running display. Nothing -downloads MiniFB unless you explicitly request `make graphics`. +downloads dependencies unless you explicitly request `make libs` or `make init` +(`make lib` remains a setup alias). Build and run targets never use the network. `make tests_nographics CTAGS=` runs the entire ordinary suite with `SIMPLE_MINIFB=off`. This includes the missing-backend tests, which never open @@ -29,12 +31,14 @@ the process. Non-graphics programs ignore even a broken graphics configuration. From `chapter31`: ```sh +make libs CTAGS= # Once while online; fills the persistent lib/ cache. make graphics graphics-example CTAGS= make run-graphics CTAGS= ``` -`graphics` downloads the revision pinned in [graphics.mk](../graphics.mk) into -ignored `build/deps/minifb` and builds only its C framebuffer backend. Windows +`libs` downloads the revision pinned in [graphics.mk](../graphics.mk) into +ignored `lib/minifb-<revision>.tar.gz` and extracts it under `lib/`. +`graphics` builds only its C framebuffer backend from these local sources. Windows uses the MinGW-w64 GCC compiler (`x86_64-w64-mingw32-gcc`) and GDI; the rest of Simple still uses the existing Cygwin GCC. Linux uses GCC and X11 (`libx11-dev` on Ubuntu), including XWayland on a Wayland desktop. OpenGL, the C++ callback @@ -50,6 +54,9 @@ Outputs: `MiniFB-LICENSE` is copied alongside the backend; include it when distributing the library. MiniFB sources remain outside the tracked Simple sources. +The cache survives `make clean`. Editing a makefile or rebuilding a backend +does not fetch or check GitHub. Missing dependencies fail promptly with +instructions to run `make libs` while online. `graphics-example` alone builds the executable without requiring MiniFB. It also demonstrates the diagnostic and exit status 1 when graphics is absent. |
