Path: blob/master/libmupen64plus/mupen64plus-core/tools/osx_build_instructions.txt
2 views
OSX build instructions (using OSX 10.8.3 and Xcode 4.6.2):121. Install SDL framework3- go to http://www.libsdl.org/download-1.2.php4- download SDL-1.2.15.dmg5- Open the DMG and copy SDL.framework to /Library/Frameworks6- also, copy devel-lite to your desktop7- Build SDLMain.m_o:8- open terminal, cd ~/Desktop/devel-lite9- run: gcc -c -O3 -I./ -I/Library/Frameworks/SDL.framework/Headers -o SDLMain.m_o SDLMain.m102. Install macports113. Install the following ports (sudo port install <name>):12- bzip213- freetype14- libpng15- libsamplerate16- speex17- zlib184. Boost requires some special stuff. We must compile with clang and libc++.19- edit your /opt/local/etc/macports/macports.conf20- add to end: default_compiler clang21- sudo port edit boost22- change this line:23write_jam "using darwin : : ${configure.cxx} : <cxxflags>\"${configure.cxxflags}\" ${compileflags} <linkflags>\"${configure.ldflags}\" : ;"24- to this:25write_jam "using darwin : : ${configure.cxx} : <cxxflags>\"${configure.cxxflags} -std=c++11 -stdlib=libc++\" ${compileflags} <linkflags>\"${configure.ldflags} -stdlib=libc++\" : ;"26- if you have boost already installed in macports, remove it:27- sudo port uninstall boost28- reinstall boost from source:29- sudo port -s install boost305. Download the Mupen64Plus source code:31- Open terminal window, create build directory for Mupen64Plus32- Download and unpack the latest m64p_helper_scripts.tar.gz from: https://code.google.com/p/mupen64plus/wiki/CompilingFromHg33- run ./m64p_get.sh346. Hack your ui-console makefile to build against SDLMain.m_o:35- edit source/mupen64plus-ui-console/projects/unix/Makefile36- change line:37CFLAGS += $(SDL_CFLAGS)38- to:39CFLAGS += $(SDL_CFLAGS) ~/devel-lite/SDLMain.m_o -framework Cocoa407. Hack your m64p_build.sh script to build under OSX:41- change line:42"$MAKE" -C source/mupen64plus-${component}/projects/unix all $@43- to:44if [ "${component}" = "ui-console" ]; then45"$MAKE" -C source/mupen64plus-${component}/projects/unix all -j4 V=1 CC=clang CXX=clang++ OSX_SDK=10.7 SDL_CFLAGS="-I/opt/local/include -D__APPLE__ -I/Library/Frameworks/SDL.framework/Headers" SDL_LDLIBS="-F/Library/Frameworks -framework SDL -framework Foundation" OPTFLAGS="-O3" LDFLAGS="-Wl,-rpath -Wl,@executable_path/../Frameworks"46else47"$MAKE" -C source/mupen64plus-${component}/projects/unix all -j4 V=1 CC=clang CXX=clang++ OSX_SDK=10.7 SDL_CFLAGS="-I/opt/local/include -D__APPLE__ -I/Library/Frameworks/SDL.framework/Headers" SDL_LDLIBS="-F/Library/Frameworks -framework SDL -framework Foundation" OPTFLAGS="-O3"48fi498. Build it50- copy osx_build_bundle.sh from source/mupen64plus-core/tools to current directory51- run ./osx_build_bundle.sh525354