Compile Emma 02 on Mac OS X
These instructions describe how to compile Emma 02 on Mac OS X using Xcode. If you have any problems feel free to drop me an email.
Libraries
Download and compile the libraries described in the following sub chapters.
wxwidgets
Download the latest stable wxwidgets 3.x release from: www.wxwidgets.org. I recommend 3.1.4 (or later) as the 3.0 release has issues with showing the help files. Also note that there is an issue causing antialias or interpolation on the emulated screens, to solve this there is a small addition needed in dcgraph.cpp as shown in the common folder.
Compile wxWidgets by following: https://wiki.wxwidgets.org/Compiling_wxWidgets_using_the_command-line_(Terminal).
For the Release build I used:
../configure --with-osx_cocoa --disable-shared --enable-universal-binary=x86_64 --with-macosx-version-min=10.10 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --prefix="$(pwd)" CXXFLAGS="-std=c++0x -stdlib=libc++" CPPFLAGS="-stdlib=libc++" LIBS=-lc++ make
../configure --with-osx_cocoa --disable-shared --enable-universal-binary=arm64,x86_64 --with-macosx-version-min=12.0 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --prefix="$(pwd)" CXXFLAGS="-std=c++0x -stdlib=libc++" CPPFLAGS="-stdlib=libc++" LIBS=-lc++ make
For the Debug build just add --enable-debug.
../configure --with-osx_cocoa --disable-shared --enable-debug --enable-universal-binary=x86_64 --with-macosx-version-min=10.10 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --prefix="$(pwd)" CXXFLAGS="-std=c++0x -stdlib=libc++" CPPFLAGS="-stdlib=libc++" LIBS=-lc++ make
../configure --with-osx_cocoa --disable-shared --enable-debug --with-macosx-version-min=12.0 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --prefix="$(pwd)" CXXFLAGS="-std=c++0x -stdlib=libc++" CPPFLAGS="-stdlib=libc++" LIBS=-lc++ make
If you are using Xcode 9 and running on Mojave or earlier you could also try following, for the Release build:
../configure --with-osx_cocoa --disable-shared --enable-universal-binary=i386,x86_64 --with-macosx-version-min=10.6 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk --prefix="$(pwd)" make
And for the Debug build:
../configure --with-osx_cocoa --enable-debug --disable-shared --with-macosx-version-min=10.6 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk --prefix="$(pwd)" make
SDL
Download the SDL development library from: http://www.libsdl.org/download-2.0.php, open the dmg file and copy SDL2.framework to /Library/Frameworks/
libserialport
Download libserialport from: sigrok.org/wiki/Downloads and compile using homebrew as described in chapter 'Building from source using Homebrew' on page https://sigrok.org/wiki/Mac_OS_X.
To build a fat library after following the homebrew steps, go to the libserialport library
./configure make CXXFLAGS="-arch i386 -arch x86_64" CFLAGS="-arch i386 -arch x86_64" LDFLAGS="-arch i386" sudo make install
Build Emma 02
Pull the latest source package from the github repository https://github.com/etxmato/emma_02:
Open Xcode and on the 'Welcome to Xcode' screen click on 'Check out an existing project' button on the left hand side. Then enter the details for the repository above.
Compile /Emma 02!