Makefile - variables

  • Revision slug: How_Mozilla's_build_system_works/Makefile_-_variables
  • Revision title: Makefile - variables
  • Revision id: 38339
  • Created:
  • Creator: Joey Armstrong
  • Is current revision? No
  • Comment 3 words added

Revision Content

This page lists makefile variables of interest.

Variable name Description
ADD_TO_DEF_FILE  
CPP_SOURCES  
CPP_UNIT_TESTS A list of source files to compile as unit tests
CSRCS A list of C source files to compile.
EXPAND_MOZLIBNAME  
EXPORTS A list of exported header files and sources to install for external use.
EXTRA_COMPONENTS nsDefaultCLH.manifest
EXTRA_DSO_LIBS  
EXTRA_DSO_LDOPTS  
EXTRA_JS_MODULES  
EXTRA_PP_COMPONENTS nsDefaultCLJ.js
GARBAGE A "clean target" macro containing a list of files to remove.
GARBAGE_DIRS A "clean target" macro containing a list of directories to remove.
LIBOBJS  
LOCAL_INCLUDES Allow use of MOZ_OBJDIR in .mozconfig with older gcc on BeOS
NS_PRINTING  
OBJS  
MODULE Instructs the build system where to install exported headers
SIMPLE_PROGRAMS  
SUPPRESS_DEFAULT_RULES Inhibit processing of TIER targets / ordered build
TIER  Build order dependencies - subdirectories for make to traverse prior to building current.
XPIDLSRCS  
configure.sh Variables    Description Description
BUILD_PROJECT_ARG    command line / environment override command line /environment override
CONFIGURE_ENV_ARGS    command line / environment override command line / environment override
Directory Variable  
DIRS A list of subdirectories to build recursively
PARALLEL_DIRS A list of subdirectories to build recursively that may be built concurrently
STATIC_DIRS Subdirectories containing static makefiles that are not autogenerated
TOOL_DIRS A list of directories to process makefile 'tool' targets in
MOZ_ Variable Description
MOZ_AUTO_DEPS  
MOZ_BUILD_APP  
MOZ_BUILD_PROJECTS Build multiple projects in the same sandbox.  Dest=$(MOZ_OBJDIR)/$project
MOZ_CURRENT_PROJECT  
MOZ_DEBUG  
MOZ_ENABLE_XREMOTE  
MOZ_FEEDS  
MOZ_HELP_VIEWER  
MOZ_PREFLIGHT_ALL  
MOZ_RDF  
MOZ_TOOLKIT_SEARCH  
MOZ_URL_CLASSIFIER  
MOZ_WIDGET_TOOLKIT  
MOZ_XPCTOOLS  
MOZ_XUL  

Test Variable

Description
ENABLE_TESTS Boolean value that should wrapper all unit tests to allow disabling on demand [1]
XPC_SHELL_TESTS  
Compiler Variable Description
GNU_CC Defined if the gcc compiler is available
MODULE_OPTIMIZE_FLAGS Additional flags for enabling compiler optimizations (-O2)
SOLARIS_SUNPRO_CC Sun Studio compiler

[table-spacer]

Export Variables Description
AUTOCFG_JS_EXPORTS  
EXPORTS A list of exported headers and source files for external use
HAS_EXTRA_EXPORTS  
PREF_JS_EXPORTS  Javascript preferences file to export. [1]
SDK_HEADERS  
NO_ Variable Description
NO_PROFILE_GUIDED_OPTIMIZE Inhibit PGO builds
NO_DIST_INSTALL  

 * Values will be appended to the EXPORT variable when present.

OS_ Variable Description
OS_ARCH Platform type
OS_TARGET Target binary type if building on an intermediate platform (building mobile binaries on linux)
HOST_ Variable Description
HOST_CMSRCS A list of .m sources to compile
HOST_CMMSRCS A list of .mm sources to compile
HOST_OBJS  
HOST_OS_ARCH ARCH of real platform a target platform is being built on (building mobile binaries on linux)

Revision Source

<p>This page lists makefile variables of interest.</p>
<table class="standard-table" style="width: 1219px; height: 332px;"> <thead> <tr> <th>Variable name</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>ADD_TO_DEF_FILE</td> <td> </td> </tr> <tr> <td>CPP_SOURCES</td> <td> </td> </tr> <tr> <td>CPP_UNIT_TESTS</td> <td>A list of source files to compile as unit tests</td> </tr> <tr> <td>CSRCS</td> <td>A list of C source files to compile.</td> </tr> <tr> <td>EXPAND_MOZLIBNAME</td> <td> </td> </tr> <tr> <td>EXPORTS</td> <td>A list of exported header files and sources to install for external use.</td> </tr> <tr> <td>EXTRA_COMPONENTS</td> <td>nsDefaultCLH.manifest</td> </tr> <tr> <td>EXTRA_DSO_LIBS</td> <td> </td> </tr> <tr> <td>EXTRA_DSO_LDOPTS</td> <td> </td> </tr> <tr> <td>EXTRA_JS_MODULES</td> <td> </td> </tr> <tr> <td>EXTRA_PP_COMPONENTS</td> <td>nsDefaultCLJ.js</td> </tr> <tr> <td><code>GARBAGE</code></td> <td>A "clean target" macro containing a list of files to remove.</td> </tr> <tr> <td><code>GARBAGE_DIRS</code></td> <td>A "clean target" macro containing a list of directories to remove.</td> </tr> <tr> <td>LIBOBJS</td> <td> </td> </tr> <tr> <td>LOCAL_INCLUDES</td> <td>Allow use of MOZ_OBJDIR in .mozconfig with older gcc on BeOS</td> </tr> <tr> <td>NS_PRINTING</td> <td> </td> </tr> <tr> <td>OBJS</td> <td> </td> </tr> <tr> <td><a href="/MODULE" title="MODULE">MODULE</a></td> <td>Instructs the build system where to install exported headers</td> </tr> <tr> <td>SIMPLE_PROGRAMS</td> <td> </td> </tr> <tr> <td>SUPPRESS_DEFAULT_RULES</td> <td>Inhibit processing of TIER targets / ordered build</td> </tr> <tr> <td><a href="/TIER" title="TIER">TIER</a></td> <td> Build order dependencies - subdirectories for make to traverse prior to building current.</td> </tr> <tr> <td>XPIDLSRCS</td> <td> </td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">configure.sh Variables    Description</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td>BUILD_PROJECT_ARG    command line / environment override</td> <td>command line /environment override</td> </tr> <tr> <td>CONFIGURE_ENV_ARGS    command line / environment override</td> <td>command line / environment override</td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">Directory Variable</th> <th scope="col"> </th> </tr> </thead> <tbody> <tr> <td><a href="/en/DIRS" title="en/DIRS">DIRS</a></td> <td>A list of subdirectories to build recursively</td> </tr> <tr> <td><a href="/en/PARALLEL_DIRS" title="en/PARALLEL DIRS">PARALLEL_DIRS</a></td> <td>A list of subdirectories to build recursively that may be built concurrently</td> </tr> <tr> <td><a href="/en/STATIC_DIRS" title="en/STATIC DIRS">STATIC_DIRS</a></td> <td>Subdirectories containing static makefiles that are not autogenerated</td> </tr> <tr> <td>TOOL_DIRS</td> <td>A list of directories to process makefile 'tool' targets in</td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">MOZ_ Variable</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td>MOZ_AUTO_DEPS</td> <td> </td> </tr> <tr> <td>MOZ_BUILD_APP</td> <td> </td> </tr> <tr> <td><a href="/en/Configuring_Build_Options" title="en/Configuring Build Options">MOZ_BUILD_PROJECTS</a></td> <td>Build multiple projects in the same sandbox.  Dest=$(MOZ_OBJDIR)/$project</td> </tr> <tr> <td>MOZ_CURRENT_PROJECT</td> <td> </td> </tr> <tr> <td>MOZ_DEBUG</td> <td> </td> </tr> <tr> <td>MOZ_ENABLE_XREMOTE</td> <td> </td> </tr> <tr> <td>MOZ_FEEDS</td> <td> </td> </tr> <tr> <td>MOZ_HELP_VIEWER</td> <td> </td> </tr> <tr> <td>MOZ_PREFLIGHT_ALL</td> <td> </td> </tr> <tr> <td>MOZ_RDF</td> <td> </td> </tr> <tr> <td>MOZ_TOOLKIT_SEARCH</td> <td> </td> </tr> <tr> <td>MOZ_URL_CLASSIFIER</td> <td> </td> </tr> <tr> <td>MOZ_WIDGET_TOOLKIT</td> <td> </td> </tr> <tr> <td>MOZ_XPCTOOLS</td> <td> </td> </tr> <tr> <td>MOZ_XUL</td> <td> </td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table" style="width: 747px; height: 41px;"> <thead> <tr> <th scope="col"> <p>Test Variable</p> </th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td>ENABLE_TESTS</td> <td>Boolean value that should wrapper all unit tests to allow disabling on demand [<a href="/en/How_to_add_a_build-time_test" title="en/How to add a build-time test">1</a>]</td> </tr> <tr> <td>XPC_SHELL_TESTS</td> <td> </td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">Compiler Variable</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td>GNU_CC</td> <td>Defined if the gcc compiler is available</td> </tr> <tr> <td>MODULE_OPTIMIZE_FLAGS</td> <td>Additional flags for enabling compiler optimizations (-O2)</td> </tr> <tr> <td>SOLARIS_SUNPRO_CC</td> <td>Sun Studio compiler</td> </tr> </tbody>
</table>
<p>[table-spacer]</p>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">Export Variables</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td>AUTOCFG_JS_EXPORTS</td> <td> </td> </tr> <tr> <td><a href="/en/Installing_headers_using_EXPORTS" title="en/Installing headers using EXPORTS">EXPORTS</a></td> <td>A list of exported headers and source files for external use</td> </tr> <tr> <td>HAS_EXTRA_EXPORTS</td> <td> </td> </tr> <tr> <td>PREF_JS_EXPORTS</td> <td> Javascript preferences file to export. [<a href="/User:xFallenAngel/Build_System" title="User:xFallenAngel/Build System">1</a>]</td> </tr> <tr> <td>SDK_HEADERS</td> <td> </td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">NO_ Variable</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td>NO_PROFILE_GUIDED_OPTIMIZE</td> <td>Inhibit PGO builds</td> </tr> <tr> <td>NO_DIST_INSTALL</td> <td> </td> </tr> </tbody>
</table>
<p> * Values will be appended to the EXPORT variable when present.</p>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">OS_ Variable</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td>OS_ARCH</td> <td>Platform type</td> </tr> <tr> <td>OS_TARGET</td> <td>Target binary type if building on an intermediate platform (building mobile binaries on linux)</td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">HOST_ Variable</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td>HOST_CMSRCS</td> <td>A list of .m sources to compile</td> </tr> <tr> <td>HOST_CMMSRCS</td> <td>A list of .mm sources to compile</td> </tr> <tr> <td>HOST_OBJS</td> <td> </td> </tr> <tr> <td>HOST_OS_ARCH</td> <td>ARCH of real platform a target platform is being built on (building mobile binaries on linux)</td> </tr> </tbody>
</table>
Revert to this revision