Fossil SCM
New Build Documentation
15 years, 9 months ago by michael
New Build Documentation
In myttmrichter branch, tagged newbuild, I have a new build system in the works that should make it easier for new users to quickly get up to speed on their platform of choice. The new system works thusly:
- One
Makefiledrives all platforms. - Different platforms are brought into this makefile through
include commands. Which one is brought in is specified using
a variable called PLATFORM. For example if
PLATFORM is set to "solaris" the Makefile will bring in the
makefile fragment named ./make/solaris-fragment.mk. This
fragment selects which features are enabled and other OS-specific settings.
PLATFORM defaults to "linux" if not supplied.
- Different compilers are introduced via the
COMPILERvariable.
clang instead of
gcc, simply set COMPILER to clang.
As with the previous, a makefile fragment build from the compiler name is
brought in. This file will set compiler command line options.
COMPILER defaults to "gcc" if not supplied.
- As it is a hassle to constantly have to set the variables on the command
./pre-config.mkis included beforePLATFORMor
COMPILER are set and is thus a perfect place to define these
two variables to avoid the need for convoluted (and error-prone) command
lines or for build scripts.
./post-config.mkis included after the platform and compiler
- To support platform-specific modifications of compiler settings, special
PLATFORM_SPECIFIC_(compiler) and
PLATFORM_SPECIFIC_LIB are provided. You can see how these
variables are set in the ./make/mingw32-fragment.mk file (note
the use of a friendlier wrapper definition) and how they are used in the
two compiler fragment files.
- Note that since platforms are included before compilers, it is possible for