Help save net neutrality! Learn more.
Close

Build Instructions for Mac OS X

Pat O

Prerequisites

You'll first need to install a few programs that don't come by default with Mac OS X.

The first is Xcode - you can get this from the Mac App Store.

Next, install automake, autoconf and gettext. I'm working in the ~/Programming directory

cd ~/Programming
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.68.tar.gz
tar xzf autoconf-2.68.tar.gz
cd autoconf-2.68
./configure --prefix=/usr/local
make
sudo make install
export PATH=$PATH:/usr/local/bin

##
# Automake
# http://ftpmirror.gnu.org/automake

cd ~/Programming
curl -OL http://ftpmirror.gnu.org/automake/automake-1.14.tar.gz
tar xzf automake-1.14.tar.gz
cd automake-1.11
./configure --prefix=/usr/local
make
sudo make install

##
# gettext
cd ~/Programming
curl -OL http://ftp.gnu.org/gnu/gettext/gettext-0.19.tar.gz
tar xzf gettext-0.19.tar.gz
cd gettext-0.19
./configure
make
sudo make install

Next, download wxWidgets 3.0.2 and extract it to the programming folder.

cd ~/Programming/wxWidgets-3.0.2/build
mkdir build-cocoa-release
cd build-cocoa-release
../../configure --enable-unicode --disable-shared --with-osx_cocoa --with-macosx-version-min=10.8 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/ CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11" OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS=-stdlib=libc++ --disable-debug --disable-debug_flag

make

Don't do make install for wxWidgets!

If you just want to make a build, skip ahead to the download mmex section. If you want to be able to edit the Bakefiles, you'll need to install Bakefile 0.2.9. Unfortunately the binaries don't work with MacOSX >=10.10, so you'll have to build from scratch. To do this, you'll need SWIG. Get that installed an then fork the Bakefile repo from github and check out the legacy-0.2-branch:

git clone https://github.com/omalleypat/bakefile.git  # this is my fork - replace omalleypat with your own github username after you fork it
cd bakefile/
git remote add upstream https://github.com/vslavik/bakefile.git
git fetch
git checkout -b legacy-0.2-branch origin/legacy-0.2-branch
./bootstrap
./configure --enable-maintainer-mode
make
sudo make install

Bakefile instruction references: 1 2

Download mmex source

You can get the mmex source here. I have my directories set up as follows (where mmex_src contains all the git stuff and the build_cocoa_release directory is where we will build MMEX):

/Users/pom/Programming/
├── mmex_git
│   ├── build_cocoa_release
│   └── mmex_src

To build, run the following

cd ~/Programming/mmex_git/mmex_src
./bootstrap
cd ~/Programming/mmex_git/build_cocoa_release
../mmex_src/configure --with-wxdir=/Users/pom/Programming/wxWidgets-3.0.2/build-cocoa-debug prefix=`pwd` datarootdir='${prefix}/mmex.app/Contents/SharedSupport' bindir='${prefix}/mmex.app/Contents/MacOS' CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11" OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS=-stdlib=libc++
make
make install