Changes

Jump to: navigation, search

Real World Mozilla Makefile Lab

619 bytes removed, 20:21, 26 February 2007
no edit summary
This lab is designed to give you first-hand experience creating a simple Makefile and using Make to build software. While the Mozilla build system is much more complex than this example, the ideas learned here will get you started understanding how Mozilla is built.
For nostalgic reasons we will work with the source code to Evan Weaver's nled editor, written in C.
== Instructions ==
The lab machines have already been set-up to use MSVC 8 and MozillaBuild RC1. You only need to run '''Mozilla-Build MSVC 8.bat''' (there is a link on the desktop) to begin (i.e., you shouldn't need to install anything).
# Create a directory called '''C:\ff''' to hold the source# Make sure Download and extract the tree is '''not red''' on nled [http://tinderboxcs.mozillasenecac.on.orgca/showbuilds~david.cgi?tree=Firefox tinderboxhumphrey/nled-2.52-src.zip source code]# CheckStart Mozilla-out Build MSVC8.bat to get a proper build environment# Move to the Firefox code from directory where you extracted the source# Using a text editor, create a file in this directory named '''CVSMakefile''' into C:\ff ([http://developer.mozilla.org/en/docs/Mozilla_Source_Code_%28CVS%29 instructions are here]). You can use either of the following CVSROOT values:#* :pserver:anonymous@cvs-mirrorExamine all the .mozillac files to determine dependencies with the .org:/cvsrooth files#* :pserver:anonymous@hera.senecac.on.ca:/cvsrootWrite targets and rules for each of the object files and the final executable# Create Write a '''.mozconfigclean''' file (target in order to delete all .obj and .exe files == Hints ==* [http://developermsdn2.mozillamicrosoft.orgcom/en-us/docslibrary/Configuring_Build_Options instructions are here]) in '''C:\ff\mozilla''' with the following:#* Use an Object Directory 8we9bhf4(OBJDIRVS.80) named '''objdir'''#* '''Disable''' Optimization.aspx CL /c option]#* '''Enable''' Debugging#* Use '''Shared''' libraries instead of Static# Build the source ([http://developermsdn2.mozillamicrosoft.orgcom/en-us/library/docsyb8e9b8y(VS.80).aspx CL /Build_and_Install instructions are hereFo option])# wait, wait, wait...NOTE: * To create the build process executable (a debug buildnled.ext) takes approximately '''1 hour''' to complete in the labyou must link all .# Test your new browser:## Set the following environment variables to turn-off assertion dialogs and allow for multiple versions of the browser to be run simultaneously:##* export XPCOM_DEBUG_BREAK=warn##* export MOZ_NO_REMOTE=1## Run the browser as follows:<code>C:\ff\mozilla\objdir\dist\bin\firefox -Profilemanager</code>## When prompted, create a new profile called obj files '''development'''## In the address bar, enter the following URI and note the build information: '''about:'''user32.lib
== Resources ==
* [http://benjamin.smedbergs.us/blog/2007-01-12/mozillabuild-rc1/ MozillaBuild RC1 for Win32]
* [http://webtools.mozilla.org/build/config.cgi MOZCONFIG Build Configurator]

Navigation menu