Login
AmalgamationBuild
Login

The libfossil Amalgamation Build

See also: building, download pre-built copies of the amalgamation

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:

$ ./configure ...
$ make amal
...
Amalgamation files:
-rw-rw-r-- 1 stephan stephan 1502299 Dec 21 17:06 ./libfossil.c
-rw-rw-r-- 1 stephan stephan    4273 Dec 21 15:16 ./libfossil-config.h
-rw-rw-r-- 1 stephan stephan  824290 Dec 21 17:06 ./libfossil.h
ccache cc -I. ... -o "../libfossil.o"
Reminder: it will need these sqlite3 files to build:
sqlite3.h, sqlite3ext.h, and optionally a local copy of sqlite3.c

The output is these three files in the top-most directory of the tree:

To use the amalgamation, simply:

Regarding the sqlite3 dependency: this tree includes a copy of sqlite3.c and sqlite3.h in its extsrc directory. Those versions are known to work with the library. The build can optionally use an external copy of sqlite3 (see ./configure --help), but it will not work with arbitrarily old versions because libfossil frequently makes use of new features in the library. (Fossil itself is a testing ground for new SQLite features.)