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 (GNU Make and friends):

[stephan@host:~/libfossil]$ 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:

The C++ build also has an amalgamation build which requires this amalgamation. To build it, run make amalpp.

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. The main makefile will use those two files (sqlite3.c and sqlite3.h) automatically if they are found in the src/ dir the build tree, but it does not include them in the Amalgamation build.