Mozilla's getting a new look. What do you think? https://mzl.la/brandsurvey

Makefile - variables

Note: Non-functional links can be fixed by inserting en/.
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.
DEFINES Additional preprocessor defines for C++
EXPAND_MOZLIBNAME  
EXPORTS A list of exported header files and sources to install for external use.
EXPORTS_NAMESPACES Exported package include directory: dist/include/${namespace}
EXPORTS_${namespace} A list of exports/headers that should be copied into the exported namespace directory.
EXTRA_COMPONENTS nsDefaultCLH.manifest, JavaScript XPCOMM files
EXTRA_DSO_LIBS  
EXTRA_DSO_LDOPTS  
EXTRA_JS_MODULES  
EXTRA_PP_COMPONENTS XPCOMM files to pre-process before installation.
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.
GLOBAL_DEPS A list of common dependencies (Makefile.in, autoconf.mk) that will force rebuilding.
LIBOBJS  
HAVE_DTRACE Sun Microsystem's dynamic tracing environment is available.
LOCAL_INCLUDES Allow use of MOZ_OBJDIR in .mozconfig with older GNU gcc on BeOS.
MODULE  
MODULE_NAME  
NO_DIST_INSTALL Inhibit generating and copying exports/install targets into $(MOZ_OBJDIR)/dist/install.
.NS_PRINTING  
OBJS  
OBJ_SUFFIX Filename suffix to use when writing object files.
MODULE Instructs the build system where to install exported headers.
SIMPLE_PROGRAMS  
SUPPRESS_DEFAULT_RULES Inhibit processing of Makefile TIER targets/directory processing will be unordered.
TIER Build order dependencies - subdirectories for make to traverse prior to building current.
XPIDL_MODULE Module name to use when generating .xpt files, default to MODULE.
XPIDLSRCS Internal: A list of .idl files to generate exported headers from.
XPIDL_NAME Name of extension to build see also
configure.sh Variables Description
BUILD_PROJECT_ARG Command line/environment override
CONFIGURE_ENV_ARGS 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.
TEST_DIRS A list of directories containing test makefiles
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_NATIVE_NSPR  
MOZ_METRO  
MOZ_PKG_MAINFEST  
MOZ_PREFLIGHT_ALL  
MOZ_RDF  
MOZ_TOOLKIT_SEARCH  
MOZ_URL_CLASSIFIER  
MOZ_WIDGET_TOOLKIT  Android, BeOS, Cocoa, GTK2, OS2, Qt, Windows
MOZ_XPCTOOLS  
MOZ_XUL  
MOZ_X11  

Test Variable

Description
ENABLE_TESTS

Boolean value that should wrapper all unit tests to allow disabling on demand[1].

PYTHON_UNIT_TESTS List of python scripts to check exit status for make check
XPC_SHELL_TESTS  

NO_XPCSHELL_MANIFEST_CHECK

Inhibit validating manifest files when running xpcshell tests.
Compiler Variable Description
GNU_CC Defined if the GNU gcc compiler is available.
MODULE_OPTIMIZE_FLAGS Additional flags for enabling or overriding compiler optimizations(-O2).
SOLARIS_SUNPRO_CC Sun Studio compiler
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  
Makefile Generation Description
NO_MAKEFILE_RULE [pending] Inhibit Makefile.in deps that would allow $obj/Makefile to be generated.
NO_SUBMAKEFILE_RULE [pending/redundant?] Inhibit Makefile generation within subdirectories.
NO_ Variable Description
NO_PROFILE_GUIDED_OPTIMIZE Inhibit PGO builds
NO_DIST_INSTALL  
Note: 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 GNU/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 GNU/Linux).

Distribution/Release variables

Variable Description
DIST  Top level distribution directory for install/packaging/repacking.
DIST_FILES A list of files copied into the distribution archive(~application.ini).
DIST_CHROME_FILES Exists in rules.mk but not referenced by mozilla-central.  Deprecated?
FINAL_TARGET Directory to install distributed content.  default=$(DIST)/bin
XPI_NAME If set FINAL_TARGET=$(DIST)/xpi-stage/$(XPI_NAME)
DIST_SUBDIR If set FINAL_TARGET will be $(DIST)/bin/$(DIST_SUBDIR)  [ metro build ]
   

l10n.mk and localization

Variable Description
EN_US_BINARY_URL Server URL from which wget will FTP binaries.
L10NBASEDIR  
MOZ_CHROME_MULTILOCALE A list of locale names to process
MOZ_CHROME_FILE_FORMAT both, file, jar, omni, symlink
PACKAGER_NO_LIBS Hack to allow one makefile to include another without pulling in libs:: target definitions.
STAGEDIST Local staging directory for localization and packaging.

 

Todo:

xpcom/xpinstall variables: https://developer.mozilla.org/en/Adding_XPCOM_components_to_Mozilla_build_system

Document Tags and Contributors

 Contributors to this page: teoli, gps, jhammel, Joey Armstrong, Sheppy, ashneo76, berkerpeksag
 Last updated by: teoli,