Project

General

Profile

Actions

BuildSystem » History » Revision 1

Revision 1/12 | Next »
fixeria, 03/14/2023 08:14 PM


The Build System

The build system is basically a suite of tools that helps developers to "translate" source code files into executable binaries and libraries. Examples of such systems are GNU Make, GNU Autotools, CMake, QMake, and Ninja. The majority of Osmocom projects is employing GNU Autotools, except these very few using CMake (mostly GNU Radio related projects) and hand-written Makefiles. Thus this page will be focusing on the GNU Autotools, which is supposed to make things simple for all of us, but sometimes becomes a PITA and a source of confusion for many.

GNU Autotools Essentials

GNU Autotools includes the following tools:

  • Automake - a tool for automatically generating Makefile.in files,
  • Autoconf - a tool for generating configure scripts, and
  • Libtool - a tool for building static and shared libraries.

These tools are usually available in package repositories of many Linux distributions.

GNU Autotools Basic Usage

The usual sequence of commands is as follows:

$ autoreconf -fi
$ ./configure
$ make
$ make check  # optionally
$ sudo make install

autoreconf scans the current directory for configure.ac and Makefile.am taking them as the input, converts Makefile.am files to Makefile.in, and generates the configure script. The configure script performs dozens of checks, finds suitable compilers and linkers, scans for Makefile.in files and generates the usual Makefile files from them. Finally, make follows the rules listed in automatically generated Makefile files, and invokes compilers, linkers, and other tools on the source files.

Files (0)

Updated by fixeria about 1 year ago · 1 revisions

Add picture from clipboard (Maximum size: 48.8 MB)