Build Prerequisites

The following packages are required for the development of all AOMedia projects:

  • Git version 1.5.4 or newer

AOMedia Video Codec SDK (libaom)

The AOMedia Video SDK supports a large variety of targets and build environments. These are generally identified by a isa-os-compiler triplet. This is the instruction set architecture, the operating system, and compiler used to compile for the target. A full list of these targets can be seen by running ./configure --help in the root of your source tree. (Windows users will need to set up MSYS before being able to run this command.) Certain targets require special setup be completed. Please see if one of the sections on this page applies to you before trying to build the codec library.

Building For x86 (32- and 64-bit)

The Yasm assembler is required to build optimized libraries for x86 platforms. Version 0.8.0 or newer is required. Version 1.0.0 is known to have bugs affecting libaom, but subsequent versions (1.1.0) should work.

For Unix-like platforms, binary distributions are likely to be included in your package manager, or you can easily build from source. Windows users are advised to download the pre-built binary.

Building For Windows

There are two methods of building for Windows.

Using Visual Studio

Important When installing Yasm, disregard instructions for Visual Studio integration and use the “general use” executables instead (yasm-x.x.x-win32.exe or yasm-x.x.x-win64.exe).

These files are generated using our Makefile build system, so if you wish to work on the latest code from Git on Windows, you’ll have to install a Unix-workalike environment like MSYS or Cygwin. Instructions for installing MSYS can be found below. When creating the Visual Studio projects from source, you’ll have to do some additional setup:

Decide on “in-tree” or “out-of-tree” build method.

The “build root” is not necessarily the same directory as the “source root” with this build system. This allows you to keep your source tree pristine and not clutter it with object files, temporary files, output runs, etc. You can wipe out your whole build root at any time without worrying too much about it. We first must choose the build root we want to use:

  • In-tree build root means that your build root is a subdirectory of the source root. The advantage of this approach is that the Git Extensions plug-in for Visual Studio can be used. Create the following directory (use vs7 for VS 2003): libaom/build/x86-win32-vs8 Note that git has been configured to ignore this directory — we don’t want the
    generated files to be checked in.
  • Out-of-tree build root means that the build root is not a child of the source root. This is the most common configuration used. Typically you create a build directory in the same location that the libaom tree is checked out.
Configure The Build Root

The first thing that must be done to a new build root is to configure it for the configuration of the SDK that you want to build.

Start a Cygwin or MSYS shell, and navigate to your build directory. Here we’ll assume that you want to do an out-of-tree build, you’ve cloned libaom to /cygdrive/c/libaom and you’ve created the build directory /cygdrive/c/build.

$ cd /cygdrive/c/build
$ ../libaom/configure --target=x86-win32-vs8 --enable-static-msvcrt
  • --enable-static-msvcrt to switch all vs8 projects to use static for Runtime library option, i.e. /MT and /MTd, instead of /MD and /MDd by default.
  • vs9 is for Visual Studio 2008, vs8 is for Visual Studio 2005, and vs7 is for Visual Studio .NET 2003
  • ../libaom/configure --help has interesting output.
Build The VS Projects

If configuration succeeded (it should) you can now execute the scripts that create the visual studio solutions and projects:

$ make
That’s It!

You typically will not need to rerun the configuration scripts, but it doesn’t hurt to do so. You will need to rerun them if you pull in changes to any file named configure or .mk, or if any files are added, removed, or renamed (even by others). You should be aware that your changes will be overwritten any time you modify the project settings through the properties page. The Makefiles and associated scripts are the authoritative location for all build related
This means if you add, remove, or rename a file, you must do so in the Makefiles first, and then regenerate the project files from them.

Using MSYS

If you’re already familiar with MSYS, there’s likely nothing here that will surprise you. If this is your first time installing MSYS, read on …

Download depot_tools

The depot_tools are used to download the tools and patches needed to build the AOMedia Video library on Windows. They facilitate a one-step dependencies download, and allow you to avoid the hassle of downloading individual MSYS archives.

Get the Chromium MinGW dependencies

Now we use the depot_tools installation to grab MSYS, and a subset of MSYS tools needed for building AOMedia Video.

  1. Create a very simple .gclient in an empty directory, and insert
    the following text:
solutions = [
 {  "name" : "mingw", "url"  : ""
 } ]
  • Tip: A text editor like Notepad++ will be useful here since Windows doesn’t want to allow you to name a file .gclient. Note that any text editor will do, provided that it
    will allow you to name a file .gclient. Notepad++ is not required.
  • Open a cmd.exe window, cd to the directory where you saved
    your .gclient, and execute the command:
D:\src\chromium_mingw_deps>gclient sync

It will return output similar to the following.

________ running 'svn checkout
   ' in 'D:\src\chromium_mingw_deps'
   A    D:\src\chromium_mingw_deps\mingw\README.chromium
   A    D:\src\chromium_mingw_deps\mingw\mingwrt-3.15.2-mingw32-dev.tar.gz
   A    D:\src\chromium_mingw_deps\mingw\pthreads-w32.patch.txt
   A    D:\src\chromium_mingw_deps\mingw\msysCORE-1.0.11-20080826-src.tar.gz
   A    D:\src\chromium_mingw_deps\mingw\coreutils-5.97-MSYS-1.0.11-snapshot-src.tar.bz2
   A    D:\src\chromium_mingw_deps\mingw\gcc-4.2.1-2-src.tar.gz
   A    D:\src\chromium_mingw_deps\mingw\w32api-3.13-mingw32-src.tar.gz
   A    D:\src\chromium_mingw_deps\mingw\gcc-core-4.2.1-sjlj-2.tar.gz
   A    D:\src\chromium_mingw_deps\mingw\binutils-2.17.50-20060824-1.tar.gz
   A    D:\src\chromium_mingw_deps\mingw\pthreads-w32-2-8-0-release.tar.gz
   A    D:\src\chromium_mingw_deps\mingw\MSYS-1.0.11.exe
   A    D:\src\chromium_mingw_deps\mingw\mingwrt-3.15.2-mingw32-src.tar.gz
   A    D:\src\chromium_mingw_deps\mingw\binutils-2.17.50-20060824-1-src.tar.gz
   A    D:\src\chromium_mingw_deps\mingw\w32api-3.13-mingw32-dev.tar.gz
   A    D:\src\chromium_mingw_deps\mingw\coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
  • Tip: If subversion is not installed, depot_tools will install it for you! No need to stop here to install it yourself.