generally, let headers and code be more readable to humans or programs.

Some of the most immediate benefits include faster compilation times, while
also reducing the storage footprint. It is also useful during the development of
programs intended to be portable across Operating Systems.

DeforaOS libc is part of the DeforaOS Project, and distributed under the terms
of the BSD 2-clause license.

Compiling DeforaOS libc

Simply running make with no argument should be enough to build DeforaOS libc
on your platform:

$ make

The build process uses the default compiler available on the system (through
the CC variable). The compiler used can therefore be defined as follows:

$ make CC="/path/to/the/compiler"

DeforaOS libc is developed with GCC as the main compiler.

To install DeforaOS libc in a dedicated directory, like /path/to/libc:

$ make PREFIX="/path/to/libc" install

Warning: unless you know what you are doing, do not install DeforaOS libc in a
directory where it might conflict with the system headers and
libraries, like /usr or even the default /usr/local.

Generating Makefiles

Official releases of DeforaOS libc ship with Makefiles fitting BSD- and
Linux-based platforms by default. The Makefiles are generated with
configure(1) from the DeforaOS configure project, found at
http://www.defora.org/os/project/16/configure.

This tool is necessary to generate Makefiles for other platforms (including
MacOS X), or when working with development versions of DeforaOS libc.

The following command should be enough to re-generate the Makefiles:

$ configure

Please refer to the documentation of DeforaOS configure for further
instructions.

Compiling programs against DeforaOS libc

The following instructions assume that DeforaOS libc is installed in the
/path/to/libc directory.

A specs file for GCC is also provided by DeforaOS libc, in
tools/deforaos-gcc.specs. It is installed in the $PREFIX/lib/gcc directory
by default. A shell wrapper for GCC using this specs file, deforaos-gcc, is
also provided and installed by default.

This specs file is experimental, with some known issues remaining.

Cross-compiling with DeforaOS libc

DeforaOS libc supports cross-compiling without any specific configuration.
Simply refer to the right compiler while building, as follows:

$ make CC="/path/to/the/cross/compiler"

Compatibility with GCC's command-line syntax is assumed by default (for both
building and linking).

In some cases, it is possible to build binaries cross-OS without requiring a
cross-compiler in the first place. For instance, to build a Linux i386 binary
on NetBSD amd64, with GCC: