Files
ww/examples/cmatrix/Makefile
Hojun-Cho b7893916a3 examples: cmatrix — ww + libncurses falling-glyph demo
Exercises match/yield/?/!/alloc/free/slice/tagged-union end-to-end:
the @symbol FFI binds initscr/mvaddch/init_pair/getch/napms; setup
returns (*void | initerr) propagated via `?`; main unwraps the clock
via `!`; dispatch is a nested match-as-expression that yields a
bool; key handlers fold into switch/enum (q/space) and (i32 |
speederr | void) for 1..4 + the '0' error overlay.

No definite or indirect leaks under valgrind (the only "possibly
lost" / "still reachable" bytes are libncurses's process-lifetime
terminfo caches, freed only with --with-leaks).
2026-05-12 20:41:22 +09:00

13 lines
324 B
Makefile

# examples/cmatrix — Matrix-style falling glyphs, built with the ww
# toolchain. Links against libncurses.so via w6l's dynamic linker.
WW := $(shell cd ../..; pwd)/out/bin/ww
cmatrix: cmatrix.ww
$(WW) build cmatrix.ww -L /usr/lib -l ncurses
clean:
rm -f cmatrix cmatrix.o cmatrix.s cmatrix.combined.ww
.PHONY: clean