Login
Update of ”AmalgamationBuild”
Login

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

Overview

Artifact ID: acea781344fc8997e8918716a5cf203f8e199cd6
Page Name:AmalgamationBuild
Date: 2014-11-07 15:14:42
Original User: stephan
Parent: a89e9880d14c1a816d811f9306db5d9c362e166f (diff)
Next 3c98e71da80d6a1714d65e2d4035fdb4acaa6c90
Content

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:~/libfossil/src]$ make amal
Generating dependencies...
Creating ../libfossil.h...
Creating ../libfossil.c...
Trying GCC C89...
Trying GCC C99...
Trying tcc...
Man, that was FAST!
Trying clang...

It will try to compile it with various compilers if they are found in the search path.

The output is these three files:

The C++ build also has an amalgamation build which requires this amalgamation. To build it, run make amal from the cpp directory.

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.