From 3a00b54164bea447556fcf200e26496989d90489 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 19 Jun 2014 15:10:17 -0700 Subject: [PATCH] Add the Mac OS X build instructions. --- Building-for-Mac-OS-X.md | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Building-for-Mac-OS-X.md diff --git a/Building-for-Mac-OS-X.md b/Building-for-Mac-OS-X.md new file mode 100644 index 0000000..72b2e86 --- /dev/null +++ b/Building-for-Mac-OS-X.md @@ -0,0 +1,54 @@ +# Mac OSX Build + +## Minimum OS X and Xcode versions +--- + +Mac OS X Mountain Lion (10.8) or newer is required to build it. Mavericks is recommended. + +You will need to install "Command Line Tools for Xcode". Installing Xcode itself is optional if you have installed the Command Line Tools. + + +## Checkout and compile Dolphin +--- + +To checkout Dolphin's source: +```bash +git clone https://code.google.com/p/dolphin-emu ~/dolphin-emu +cd ~/dolphin-emu +``` + +To build with CMake (optionally verbose): Download and install [CMake](http://www.cmake.org/cmake/resources/software.html) if you don't have it. + +#### CMake Notes + +The `-j` option can be passed to make in order to compile multiple objects at once. +A good rule of thumb is number of CPU cores plus one. For example, on a quad core CPU `make -j5` would be a good choice. + +You can execute `cmake -L` to view the options that Dolphin's CMake environment supports, as well as their current and possible settings. + +If you have any problems compiling, use the verbose option (shown above) to give more detail. If you report a problem, at a minimum include the last screen-full of lines. + + +## Optional: Ninja +--- + +[Ninja](http://martine.github.io/ninja/) is a replacement for Make which is a bit faster for a Dolphin-sized project and is worth considering if you intend to rebuild frequently. + +After installing it, pass `-G Ninja` to cmake and use 'ninja' instead of 'make' (note that ninja is `-j` by default). + +By default, clang won't show color diagnostics when not invoked from a TTY, and ninja buffers compiler output through a pipe to avoid interleaving issues. +To fix this, pass to cmake: +``` +-DCMAKE_CXX_FLAGS="-Xclang -fcolor-diagnostics" +``` + +## Keeping up to date +--- + +All you need to do to update to the latest Dolphin revision is the following: + +```bash +cd ~/dolphin-emu/build +git pull +make && open Binaries/* +```