x
Loading
 Loading
Hello, Guest | Login | Register

Building Portable Build Systems

Last month, we talked about writing portable code and focused on how to use feature test macros, coding standards, and emulation of uncommon functions to make porting even easier. This month, we’ll talk about portable build systems — tools you can use to easily build that portable code on a variety of target platforms.

Last month, we talked about writing portable code and focused on how to use feature test macros, coding standards, and emulation of uncommon functions to make porting even easier. This month, we’ll talk about portable build systems — tools you can use to easily build that portable code on a variety of target platforms.

What’s a Build System?

A build system is the collection of components needed to turn your source into a distribution. Source can just be code, and a distribution can be nothing more than single executable. In that case, a compiler may be the build system.

For example, it’s entirely possible that your application is simple enough that the following command could build it all:

 gcc -o myprogram *.c 

However, most interesting software is more complex than that. Source typically includes code (perhaps in multiple programming languages), man pages, shell scripts, configuration files, and data. Given such complex source, a common build system typically contains compilers, linkers, libraries, include files, and a suite of supporting utilities. Distributions usually include installers, documentation, multiple executables, and sometimes even another build system (for example, if you’re distributing source, the source code and its build system is your distribution).

Undoubtedly, the mention of “build system” brings the ubiquitous make to mind. make is certainly a very common and important component of build systems, so we’ll spend most of this month’s column discussing it, the many make variants, and how…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. Helpful Tools for Software Developers
  2. The Github Hall of Fame
  3. Book'em, Github.
  4. This Week on Github: Stupid Ruby Tricks
  5. A Veritable Scatter Shot!
Follow Linux Magazine
Rackspace