]> granicus.if.org Git - libjpeg-turbo/commitdiff
Modify OS X universal binary creation process to give the user more control over...
authorDRC <dcommander@users.sourceforge.net>
Mon, 18 Oct 2010 08:24:42 +0000 (08:24 +0000)
committerDRC <dcommander@users.sourceforge.net>
Mon, 18 Oct 2010 08:24:42 +0000 (08:24 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@281 632fc199-4ca6-4c93-a231-07263d6284db

BUILDING.txt
Makefile.am
release/makemacpkg

index 95b2a6506bb0bffd3b224dec9c0f059cb082f78f..f99babec0f060dcf692b512842813156a9de691e 100644 (file)
@@ -530,13 +530,15 @@ make dmg
   Create Macintosh package/disk image.  This requires the PackageMaker
   application, which must be installed in /Developer/Applications/Utilities.
 
-make udmg
+make udmg [BUILDDIR32={32-bit build directory}]
 
   On 64-bit OS X systems, this creates a version of the Macintosh package and
-  disk image which contains universal i386/x86-64 binaries.  The 32-bit fork of
-  these binaries is backward compatible with OS X 10.4 and later.  The 64-bit
-  fork can be made backward compatible as well by using the instructions in
-  the "Build Recipes" section.  OS X 10.4 compatibility SDK required.
+  disk image which contains universal i386/x86-64 binaries.  You should first
+  configure a 32-bit out-of-tree build of libjpeg-turbo, then configure a
+  64-bit out-of-tree build, then run 'make udmg' from the 64-bit build
+  directory.  The build system will look for the 32-bit build under
+  {source_directory}/osxx86 by default, but you can override this by setting
+  the BUILDDIR32 variable on the make command line as shown above.
 
 make cygwinpkg
 
index df5cf0a72f7924dafa820c6680cfb227ece48482..e3b8314ed0391e22e3ee50517f212a11cf9cd31c 100644 (file)
@@ -197,9 +197,11 @@ deb: all
 
 if X86_64
 
+BUILDDIR32=${srcdir}/osxx86
+
 udmg: all
        sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
-               ${srcdir} universal
+               ${srcdir} ${BUILDDIR32}
 
 endif
 
index b1fb90e121d8c1067c2bb7120961880b1ac5a832..c7f3fbddecf6a824f2b16d7e9f879cb3001e5a05 100644 (file)
@@ -17,7 +17,7 @@ onexit()
 
 usage()
 {
-       echo "$0 <package name> <version> <build> <source dir.> [universal]"
+       echo "$0 <package name> <version> <build> <source dir.> [32-bit build dir]"
        exit 1
 }
 
@@ -29,7 +29,8 @@ VERSION=$2
 BUILD=$3
 SRCDIR=$4
 if [ $# -gt 4 ]; then
-       if [ "$5" = "universal" ]; then UNIVERSAL=1; fi
+       BUILDDIR32=$5
+       UNIVERSAL=1
 fi
 PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
 
@@ -50,15 +51,16 @@ mkdir -p $PKGROOT/usr/include
 mv $PKGROOT/opt/$PACKAGE_NAME/include/turbojpeg.h $PKGROOT/usr/include
 
 if [ $UNIVERSAL = 1 ]; then
-       if [ ! -d $SRCDIR/osxx86 ]; then
-               mkdir -p $SRCDIR/osxx86
+       if [ ! -d $BUILDDIR32 ]; then
+               echo ERROR: 32-bit build directory $BUILDDIR32 does not exist
+               exit 1
+       fi
+       if [ ! -f $BUILDDIR32/Makefile ]; then
+               echo ERROR: 32-bit build directory $BUILDDIR32 is not configured
+               exit 1
        fi
        mkdir -p $TMPDIR/dist.x86
-       pushd $SRCDIR/osxx86
-       sh $SRCDIR/configure --with-pic \
-               CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -O3 -m32' \
-               CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -O3 -m32' \
-               LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -m32'
+       pushd $BUILDDIR32
        make install DESTDIR=$TMPDIR/dist.x86
        popd
        if [ ! -h $TMPDIR/dist.x86/opt/$PACKAGE_NAME/lib/libjpeg.62.dylib -a \