Re: NetCDF library in Universal Binary for Mac OS X

William Kyngesburye of http://www.kyngchaos.com/ did provide me with
this solution to the compilation of netcdf as an universal library. I
post it here for reference for others who might want to do a similar
thing:


Most packages I build ppc/intel separately, then merge with lipo, to
deal with endian issues, and libtool quirks.  I usually do a bit of
patching to make it go smoothly.

netcdf is one such split build.  Assuming you're using a PPC Mac,
configure and build the PPC version.  Duplicate the source folder to
retain the same configuration.  make clean the copy.

Edit libsrc/ncconfig.h and find where it defines WORDS_BIGENDIAN -
delete that line.  Edit macros.make: add $(CCFLAGS) to both the
CFLAGS and CXXFLAGS lines.

In the Terminal:

$ export SDKROOT=/Developer/SDKs/MacOSX10.4u.sdk
$ export CCFLAGS="-arch i386 -isysroot $SDKROOT"

and make your intel copy.  Then use lipo to merge the two together.


  • 2006 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: