RBuild is system used to generate makefiles for compiling ReactOS and its various components. It uses a XML schema to describe the various source files and dependencies each component needs. RBuild is intended to be platform independent and be able to generate makefiles for various compiler families ranging from GCC to MSVC.
Example of an RBuild module file
<?xml version="1.0"?> <!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd"> <group xmlns:xi="http://www.w3.org/2001/XInclude"> <module name="csrss" type="nativecui" installbase="system32" installname="csrss.exe"> <include base="csrss">.</include> <include base="csrss">include</include> <include base="ReactOS">include/reactos/subsys</include> <include base="ReactOS">include/reactos/drivers</include> <define name="__USE_W32API" /> <define name="_WIN32_WINNT">0x0600</define> <define name="WINVER">0x0501</define> <library>nt</library> <library>ntdll</library> <library>smdll</library> <directory name="api"> <file>handle.c</file> <file>process.c</file> <file>user.c</file> <file>wapi.c</file> </directory> <pch>csrss.h</pch> <file>csrss.c</file> <file>init.c</file> <file>print.c</file> <file>video.c</file> <file>csrss.rc</file> </module> <directory name="win32csr"> <xi:include href="win32csr/win32csr.rbuild" /> </directory> </group>
This is a fairly typical example of an RBuild file containing many common elements (for further information, see RBuild Files). Note the leading standard XML declaration, which define the RBuild format. The file contains all the source code, resources (pictures, strings, winforms definitions,etc). It also references needed libraries and defines important flags.
The module name tag is the most important part of the file, which identifies the target and its name. In this case a native command line application called csrss (it actually is the application that draws console windows). Every single module must be defined in an RBuild file. But there are several different module types. Some module types are only different in name, while others are in fact different things that are not even compiled.