Building libmackie
A hand-kept Makefile, no build system to configure. You need a C11 compiler and make.
Nothing else: no library outside libc, not even libm.
make # libmackie.a
make shared # libmackie.so.<version>, with its soname links
make test # the unit suite, the same command CI runs
make install PREFIX=/usr/local [DESTDIR=...]
make clean
The code is plain C11 built with -Wall -Wextra -Werror, so a warning is a build failure.
CC and CFLAGS can be overridden on the command line; the warning flags are kept even then.
make install copies the headers to $(PREFIX)/include/mackie/, the archive to
$(PREFIX)/lib (LIBDIR= to change it) and a pkg-config file, so a consumer builds with:
cc app.c $(pkg-config --cflags --libs libmackie)
Tests
Every test runs through tests/run-test.sh, which gives it a timeout: a hang is a failure,
never a stalled build. A test that exits 77 proved this machine cannot host it and is reported
as SKIP, never as a pass.
test_mcuis the TypeScript MCU suite ported case for case: faders, buttons, V-Pots, meters, scribble strips, the handshake ground truth and the scribble backlights, with the refusals a C API adds.test_goldenholds every encoder and decoder totests/golden/mcu_golden.h, the bytes the TypeScript encoders sent and what the TypeScript decoders read for the same inputs, and checks that what the encoders send decodes back to what they were given.test_install.shinstalls into a scratch root and builds a consumer through pkg-config;conformance-packaging.shholds the version and soname copies to one another;test_workflows.shparses the CI workflows;public-sources-check.shand its own test keep private names out of the tree and the history.
The golden bytes
tests/golden/mcu_golden.h is generated, and committed. To compare against a TypeScript MCU
module (compiled to mcu.js, with its dependencies resolvable from where it sits):
node tools/gen-goldens.mjs path/to/mcu.js > tests/golden/mcu_golden.h
git diff tests/golden/mcu_golden.h
A difference in the header is a change of wire bytes on one side or the other. The generator draws its sampled inputs from a fixed seed, so the same module writes the same file.