Subject: Re: [PD] Building Pd App on OSX
Date: July 27, 2013 1:34:11 AM EDT
On 07/06/2013 06:18 PM, Miller Puckette wrote:
Yeah... I originally assembled it by trial and error, starting from the
"Wish Shell" app and changing stuff by trial and error. It might even
be the case that the "Wish Shell.app" archive used by the script below
can be replaced with your own local one... but I thought it safer to cache
copy once I had it all working.
After yet another wasted hour on a non-free OS,
some questions regarding makefile.mac:
* what is -O6? It throws an error right off the bat. (I changed it to -O3 to fix)
* why is there "-arch ppc" as well as i386?
By specifying multiple architectures, OSX will build a "fat" lib that supports them in a single binary.
i386 + ppc is the old "universal binary/lib". The new 10.7+ format is i386 + x86_64 so I'd suggest dropping the old format
now as the vast majority of people are using newer Intel machines.
* Why is there -isysroot? If I'm using Xcode 4.6 the directory
specified after that flag in makefile.mac doesn't exist, and I get an error
that stdlib.h doesn't exist.
sysroot should point to the Mac OSX SDK location. For newer Xcodes, there is a commandline util that returns the path to the Xcode
developer root: xcode-select -print-path. With Xcode 4.6, it returns:
/Applications/Xcode.app/Contents/Developer
For example, with the 10.8 SDK you can use this:
$(xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/
Naturally, you can do a search in that SDKs folder and choose the last one to build for the latest SDK or simply use a shell variable:
OSX_SDK_VER=10.8
SYSROOT=$(xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_SDK_VER.sdk/
* Any hint what -isysroot should be to find something as
common as stdlib.h?
Yes, it contains all of the includes and libs for that particular SDK.
* Is "make -f makefile.mac" supposed to compile using cc, gcc, or something else?
gcc should be fine for now, you could target llvm-gcc if you want, but gcc isn't disappearing complete in the meantime.