Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

VBox Makefile Guidelines

These guidelines apply to all the Makefile.kmk files in the tree. No exceptions.

All these makefiles are ultimately the responsiblity of bird. Since there are currently more than two hundred files and the number is growing, they have to be very kept uniform or it will become very difficult to maintain them and impossible do bulk refactoring. Thus these guidelines have no bits that are optional unlike the coding guidelines, and should be thought of as rules rather than guidelines.

Note! The guidelines do not apply to the other makefiles found in the source tree, like the ones shipped in the SDK and the ones for the linux kernel modules.


kBuild is way older than VirtualBox, at least as a concept, but the VirtualBox project was a push to get something done about it again. It's maintained by bird in his spare time because: "We don't make buildsystems, we make virtual machines". So, kBuild makes progress when there is spare time or when there is an urgent need for something.

The kBuild docs are in the process of being written. The current items and their status per 2009-04-19:

Local copies of the docs can be found in kBuild/docs, just keep in mind that they might be slightly behind the online version.

Example Makefiles

Let me point to some good sample makefiles:

And some bad ones:


First one really important fact:

Everything is global because all makefiles are virtually one single makefile.

The rules:

Helpful reminders

Generated by  Doxygen 1.6.0   Back to index