libfossil
AmalgamationBuild
Not logged in

The Amalgamation Build

See also: building

This library supports the creation of a so-called "amalgamation build", a practice adopted from the sqlite project which compounds the sources and headers into a form which can easily be dropped into client-side projects.

To create the amalgamation you need a working build environment (GNU Make and friends):

[stephan@host:~/cvs/fossil/f2]$ make amal
Generating dependencies...
Generating libfossil_amalgamation-config.h ...
sh configure --amal
Host System...x86_64-unknown-linux-gnu
Build System...x86_64-unknown-linux-gnu
C compiler... cc -g -O2
C++ compiler... c++ -g -O2
Build C compiler...cc
Checking for stdlib.h...ok
Found fossil binary: fossil
Using hard-coded aux-schema: 2011-04-25 19:50
Generating conservative config for the amalgamation build...
Generated libfossil_amalgamation-config.h.
Creating libfossil_amalgamation.h...
Creating libfossil_amalgamation.c...
gcc -c -pedantic -Wall -Werror -std=c89 -Wno-long-long libfossil_amalgamation.c

The output is these three files:

To use the amalgamation, simply:

Regarding the sqlite3 dependency: currently this library tries to work with whatever sqlite3 version is installed, but if it at some point requires features of relatively new versions then clients may need to use the sqlite3 amalgamation when building this code.