libfossil
building
Not logged in

Building libfossil

See also: AmalgamationBuild

libfossil's canonical build system is currently aimed at platforms hosting GNU Make 3.81 or newer (most relatively recent platforms have 3.81, though some name it 'gmake' instead of 'make').

The first step is to configure the build tree, which generates some configuration and makefiles:

$ ./configure

Pass it the --help option for the list of options, but none are normally needed.

To change the compiler, pass CC=compiler-name to the configuration script. It is currently known to build cleanly with gcc, clang, and tcc on x64 and i386 Linux. Note that the makefiles tweak the compiler flags for those particular compilers, and may need similar tweaks for other compilers (see config.make.in). When using clang it might be useful to pass CC='clang -fno-color-diagnostics' to disable color output. Normally clang detects that automatically, but it mis-detects when compiling from xemacs and the color codes break xemacs' understanding of the output.

To build it:

$ make
# or:
$ gmake

That will compile the library and a few sample/test/demo applications. Be careful with them - some modify the repository (but never without being told to).

System vs. Local sqlite3

If the build finds the files sqlite3.{c,h} in the top build directory, it uses those, otherwise it uses whatever -lsqlite3 finds. It currently requires that zlib be installed at the system level (where it normally is).