th1-sgb  Update of "AmalgamationBuild"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.


Artifact ID: cdb3e113b4446e25480a04f94b6f33ec5c85a5d8
Page Name:AmalgamationBuild
Date: 2012-07-22 14:05:12
Original User: stephan
Parent: ab856fddb15612b5d7308d2158bbebaa16cf0325

Amalgamation Build

The library's sources can be "compacted" into a two-file distribution (one header and one implementation file) with:

make amal

The output is two files, th1_amalgamation.{c,h}, which can be dropped in to client projects and compiled as part of it:

$ make amal
Generating dependencies...
Creating th1_amalgamation.h...
Creating th1_amalgamation.c...
$ gcc -c -std=c89 -pedantic -Wall -Werror th1_amalgamation.c
$ clang -c th1_amalgamation.c
$ tcc -c th1_amalgamation.c

The library also provides a basic mechanism for adding one's own functionality to the amalgamation build, the intention being to allow a user to more easily copy shared th1 routines amongst his scripted projects. The library interface declares a function which it does not implement: th1_register_client(). Clients may implement it, append that to the amalgamation, and then distribute that. Downstream code which then calls th1_register_client() will pick up whatever extensions have been added there.