1. Initial requirements. I mean tools which we will use while compilation. XCode application contains compilers C and C++, standard library and necessary header files. All mentioned above is a base for C/C++ environment on OS X platform. Cmake is a tool for building C/C++ projects.

This is a good idea to make a special catalog in which you can keep all source files, additional files, library files and all stuff necessary for compilation.

  • Mkdir blender-build

2. Sources. In this section we download sources of the Blender itself with submodules. Blender sources contain a lot of scripts and configuration files. It contain also files helping with buildup and making packages under various platforms but we are not interested in that yet. We will download the sources first.

  • git clone git://git.blender.org/blender.git

Having Blender sources we need yet submodules. Submodules are sources which for some reason are not included in the main repository, but they have influence for addition functions. As for us to be able to download submodules we should enter to the folder of cloned repository

  • cd blender

And now we can download submodules

  • git submodule update –init –recursive
  • git submodule foreach git checkout master
  • git submodule foreach git pull –rebase origin master

We got submodules now. Next step is to download dependency libraries. Those are complicated static and dynamic files with the headers. These libraries we can compile oureself or download from SVN repository.

  • svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/darwin lib
    • I encountered a problem with braking connection, when downloading some files. You can go back re-download those files but before that you have to cleanup repository
    • cd lib
    • svn cleanup
    • cd ..
    • svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/darwin lib

Downloading might take some time 

3. Compilation. Compilation take place with the command ‚make’, but we can have a few types of this command. 

  • make full – it makes version with all possible options and dependencies
  • Make like – it makes version with minimal number of dependencies 
  • Make headless – it makes version without interface
  • Make deps –  it makes libraries of decency

And this is all, after compilation we have working version of Blender.