<div class="gmail_quote">On Sun, Jul 31, 2011 at 8:42 PM, Raffael Cavallaro <span dir="ltr"><<a href="mailto:raffaelcavallaro@mac.com">raffaelcavallaro@mac.com</a>></span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
</div>Adam,<br>
maybe you could email your scripts to Marc and he could incorporate them into the the gambit releases since you seem to be having more consistent success at getting it to build for all platforms under Xcode.<br></blockquote>
<div><br></div><div>I've copied each script below.  It actually doesn't need to be two scripts for each platform afterall - I've just updated them (and rebuilt all) with the scripts below under the latest beta of Xcode 4.2 and ran each with my code without issue.  However, my setup is probably unique to me but may be of use.  I place the primary OSX build under /usr/local/Gambit-C and then the two iOS builds are installed under /usr/local/Gambit-C/iPhoneOS and /usr/local/Gambit-C/iPhoneSimulator - and I've setup Xcode to pick the correct -lgambc to link based on the current target.  The 3 scripts are:</div>
<div><br></div><div>OSX:</div><div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace">export CC='clang'</font></div><div><font class="Apple-style-span" face="'courier new', monospace">export CXX='clang++'</font></div>
</div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><div><font class="Apple-style-span" face="'courier new', monospace">./configure --prefix=/usr/local/Gambit-C </font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">CFLAGS="-arch i386" LDFLAGS="-arch i386" ./configure --prefix=/usr/local/Gambit-C --enable-single-host --host=i386</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">make</font></div><div><font class="Apple-style-span" face="'courier new', monospace">sudo make install</font></div></div><div><br></div><div>
<br></div><div>iPhoneSimulator:</div><div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace">export CC='/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk'</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">export CXX='/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk'</font></div>
</div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><div><font class="Apple-style-span" face="'courier new', monospace">CFLAGS="-arch i386" LDFLAGS="-arch i386" ./configure --prefix=/usr/local/Gambit-C/iPhoneSimulator --host=i386</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">CFLAGS="-arch i386" LDFLAGS="-arch i386" make</font></div><div><font class="Apple-style-span" face="'courier new', monospace">sudo make install</font></div>
</div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><br></div><div><br></div><div>iPhoneOS:</div><div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace">export PATH="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:$PATH"</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">export CC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk"</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">export CXX="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++ -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk"</font></div>
</div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><div><font class="Apple-style-span" face="'courier new', monospace">CFLAGS="-arch armv7" LDFLAGS="-arch armv7" ./configure --host=arm --prefix=/usr/local/Gambit-C/iPhoneOS </font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">CFLAGS="-arch armv7" LDFLAGS="-arch armv7" make</font></div><div><font class="Apple-style-span" face="'courier new', monospace">sudo make install</font></div>
</div><div><br></div><div><br></div><div>Note:  I have compiled both iPhoneOS and iPhoneSim with '--enable-single-host' in the past, but as it takes a couple of _hours_ to compile with that option, I don't both for those two.  But I do for the osx as that's what I use for compiling the scm source to C that get's compiled/linked in the iOS builds.  Hope this helps!</div>
<div><br></div><div>  Adam</div></div>