FireBreath (Only needed when building NPAPI plugins.)
git (Makefile pulls submodules.)
gcc, g++ (mingw32, MSVS)
autotools (autoconf, automake, make, gmake)
cmake >= 2.8 (Needed only in old cmake-based build.)
XCode + Command Line Tools (OS X)
MS Visual Studio 2010 or later (Windows)
Since the extension version 126.96.36.199 the build mechanism uses autotools to configure the sources. If you are trying to build an older version (e.g. 2.2.0 or 188.8.131.52) then you need to obey the cmake-based building procedure.
Compiling Using Autotools
This procedure applies to versions since 184.108.40.206. The description is incomplete. Only the most important aspects are described. Currently only x86 and x86_64 architectures are supported.
In order to generate the configuration script run the following script:
Targeting UNIX and UNIX-Like Systems
GNU Make is required so it may be necessary to use gmake instead of make.
Configuring and building the sources:
This will build the js-ctypes and native messaging cores for the current architecture. Library dependencies will be taken from the system. Firefox extension package file (.xpi) is going to be created in the add-on subdirectory.
You can bundle the most important libraries directly into the extension core making it more portable. Building the extension with statically linked libraries:
This will download OpenSSL, ldns and Unbound sources from an external git repository. The libraries are going to be compiled and statically linked into the binary extension cores.
This will compile both 32- and 64-bit versions of the extensions on non-OS-X systems. On non-OS-X systems the building of native messaging (Chrome) extension will be avoided. On OS X all the generated binaries will be fat (containing 32- and 64-bit versions). (Useful when creating a distributable package. We use Debian 7 to build Linux packages.)
If you have several C compiler versions on your system and if you want to compile the extension using a different compiler version (e.g. gcc-4.4) than the default one then use these commands:
# Libtool crashes when OBJC not specified../configure CC=gcc-4.4 OBJC=gcc-4.4 --enable-static-linking--with-force-abi=fatmake CC=gcc-4.4 OBJC=gcc-4.4
Cross compiling using MinGW32:
This will prepare and generate a 32-bit package for Windows. Currently we use i586-mingw32msvc.
If you want to create an extension supporting both 32- and 64-bit Firefox on Windows the n you need to run this sequence:
./scripts/build_with_mingw32.sh w64+32make clean
For more details see content of scripts/build_with_mingw32.sh.