Include ARMv8 binaries when generating a combined OS X/iOS package using 'make iosdmg'
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1452 632fc199-4ca6-4c93-a231-07263d6284db
diff --git a/BUILDING.txt b/BUILDING.txt
index a19d8ce..c800b6e 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -335,6 +335,9 @@
(https://sourceforge.net/p/libjpeg-turbo/code/HEAD/tree/gas-preprocessor)
should be installed in your PATH.
+
+ARM 32-bit Build (Xcode 4.6.x and earlier, LLVM-GCC):
+
Set the following shell variables for simplicity:
Xcode 4.2 and earlier:
@@ -343,28 +346,18 @@
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk
-
- Xcode 4.6.x and earlier:
IOS_GCC=$IOS_PLATFORMDIR/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
- Xcode 5.0.x and later:
- IOS_GCC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
- ARM v6 (code will run on all iOS devices, not SIMD-accelerated):
+ ARMv6 (code will run on all iOS devices, not SIMD-accelerated):
[NOTE: Requires Xcode 4.4.x or earlier]
IOS_CFLAGS="-march=armv6 -mcpu=arm1176jzf-s -mfpu=vfp"
- ARM v7 (code will run on iPhone 3GS-4S/iPad 1st-3rd Generation and newer):
- Xcode 4.6.x and earlier:
+ ARMv7 (code will run on iPhone 3GS-4S/iPad 1st-3rd Generation and newer):
IOS_CFLAGS="-march=armv7 -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon"
- Xcode 5.0.x and later:
- IOS_CFLAGS="-arch armv7"
- ARM v7s (code will run on iPhone 5/iPad 4th Generation and newer):
+ ARMv7s (code will run on iPhone 5/iPad 4th Generation and newer):
[NOTE: Requires Xcode 4.5 or later]
- Xcode 4.6.x and earlier:
IOS_CFLAGS="-march=armv7s -mcpu=swift -mtune=swift -mfpu=neon"
- Xcode 5.0.x and later:
- IOS_CFLAGS="-arch armv7s"
Follow the procedure under "Building libjpeg-turbo" above, adding
@@ -373,24 +366,67 @@
CFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT -O3 $IOS_CFLAGS" \
LDFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT $IOS_CFLAGS"
-to the configure command line. If using Xcode 5.0.x or later, also add
+to the configure command line.
+
+ARM 32-bit Build (Xcode 5.0.x and later, Clang):
+
+Set the following shell variables for simplicity:
+
+ IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
+ IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk
+ IOS_GCC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
+
+ ARMv7 (code will run on iPhone 3GS-4S/iPad 1st-3rd Generation and newer):
+ IOS_CFLAGS="-arch armv7"
+
+ ARMv7s (code will run on iPhone 5/iPad 4th Generation and newer):
+ IOS_CFLAGS="-arch armv7s"
+
+Follow the procedure under "Building libjpeg-turbo" above, adding
+
+ --host arm-apple-darwin10 \
+ CC="$IOS_GCC" LD="$IOS_GCC" \
+ CFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT -O3 $IOS_CFLAGS" \
+ LDFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT $IOS_CFLAGS" \
CCASFLAGS="-no-integrated-as $IOS_CFLAGS"
to the configure command line.
+
+ARMv8 64-bit Build (Xcode 5.0.x and later, Clang):
+
+Code will run on iPhone 5S/iPad Mini 2 and newer.
+
+Set the following shell variables for simplicity:
+
+ IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
+ IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk
+ IOS_GCC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
+ IOS_CFLAGS="-arch arm64"
+
+Follow the procedure under "Building libjpeg-turbo" above, adding
+
+ --host aarch64-apple-darwin \
+ CC="$IOS_GCC" LD="$IOS_GCC" \
+ CFLAGS="-isysroot $IOS_SYSROOT -O3 $IOS_CFLAGS" \
+ LDFLAGS="-isysroot $IOS_SYSROOT $IOS_CFLAGS"
+
+to the configure command line.
+
+
NOTE: You can also add -miphoneos-version-min={version} to $IOS_CFLAGS above
in order to support older versions of iOS than the default version supported by
the SDK.
-Once built, lipo can be used to combine the ARM v6, v7, and/or v7s variants
+Once built, lipo can be used to combine the ARMv6, v7, v7s, and/or v8 variants
into a universal library.
NOTE: If you are building libjpeg-turbo from the "official" project tarball,
then it is highly likely that you will need to run 'autoreconf -fiv' in the
-source tree prior to building ARM v7 or v7s iOS binaries using the techniques
-described above. Otherwise, you may get a libtool error such as "unable to
-infer tagged configuration."
+source tree prior to building ARMv7, v7s, or v8 iOS binaries using the
+techniques described above. Otherwise, you may get a libtool error such as
+"unable to infer tagged configuration."
Building libjpeg-turbo for Android
@@ -764,26 +800,32 @@
make command line as shown above.
make iosdmg [BUILDDIR32={32-bit build directory}] \
- [BUILDDIRARMV6={ARM v6 build directory}] \
- [BUILDDIRARMV7={ARM v7 build directory}] \
- [BUILDDIRARMV7S={ARM v7s build directory}]
+ [BUILDDIRARMV6={ARMv6 build directory}] \
+ [BUILDDIRARMV7={ARMv7 build directory}] \
+ [BUILDDIRARMV7S={ARMv7s build directory}] \
+ [BUILDDIRARMV8={ARMv8 build directory}]
On OS X systems, this creates a Macintosh package and disk image in which the
libjpeg-turbo static libraries contain ARM architectures necessary to build
iOS applications. If building on an x86-64 system, the binaries will also
contain the i386 architecture, as with 'make udmg' above. You should first
- configure ARM v6, ARM v7, and/or ARM v7s out-of-tree builds of libjpeg-turbo
- (see "Building libjpeg-turbo for iOS" above.) If you are building an x86-64
- version of libjpeg-turbo, you should configure a 32-bit out-of-tree build as
- well. Next, build libjpeg-turbo as you would normally, using an out-of-tree
- build. When it is built, run 'make iosdmg' from the build directory. The
- build system will look for the ARM v6 build under {source_directory}/iosarmv6
- by default, the ARM v7 build under {source_directory}/iosarmv7 by default,
- the ARM v7s build under {source_directory}/iosarmv7s by default, and (if
- applicable) the 32-bit build under {source_directory}/osxx86 by default, but
- you can override this by setting the BUILDDIR32, BUILDDIRARMV6,
- BUILDDIRARMV7, and/or BUILDDIRARMV7S variables on the make command line as
- shown above.
+ configure ARMv6, ARMv7, ARMv7s, and/or ARMv8 out-of-tree builds of
+ libjpeg-turbo (see "Building libjpeg-turbo for iOS" above.) If you are
+ building an x86-64 version of libjpeg-turbo, you should configure a 32-bit
+ out-of-tree build as well. Next, build libjpeg-turbo as you would normally,
+ using an out-of-tree build. When it is built, run 'make iosdmg' from the
+ build directory. The build system will look for the ARMv6 build under
+ {source_directory}/iosarmv6 by default, the ARMv7 build under
+ {source_directory}/iosarmv7 by default, the ARMv7s build under
+ {source_directory}/iosarmv7s by default, the ARMv8 build under
+ {source_directory}/iosarmv8 by default, and (if applicable) the 32-bit build
+ under {source_directory}/osxx86 by default, but you can override this by
+ setting the BUILDDIR32, BUILDDIRARMV6, BUILDDIRARMV7, BUILDDIRARMV7S, and/or
+ BUILDDIRARMV8 variables on the make command line as shown above.
+
+ NOTE: If including an ARMv8 build in the package, then you may need to use
+ Xcode's version of lipo instead of the operating system's. To do this, pass
+ an argument of LIPO="xcrun lipo" on the make command line.
make cygwinpkg
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 40ae481..9fab2d1 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -315,7 +315,7 @@
libjpeg v6b or v7 API/ABI (or with previous versions of libjpeg-turbo.) See
README-turbo.txt for more details.
-[13] Added ARM v7s architecture to libjpeg.a and libturbojpeg.a in the official
+[13] Added ARMv7s architecture to libjpeg.a and libturbojpeg.a in the official
libjpeg-turbo binary package for OS X, so that those libraries can be used to
build applications that leverage the faster CPUs in the iPhone 5 and iPad 4.
@@ -398,7 +398,7 @@
are in violation of the spec, other JPEG implementations handle them
correctly.
-[7] Added ARM v6 and ARM v7 architectures to libjpeg.a and libturbojpeg.a in
+[7] Added ARMv6 and ARMv7 architectures to libjpeg.a and libturbojpeg.a in
the official libjpeg-turbo binary package for OS X, so that those libraries can
be used to build both OS X and iOS applications.
diff --git a/Makefile.am b/Makefile.am
index 569c0bb..b32a41b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -584,12 +584,12 @@
sh pkgscripts/makemacpkg -build32 ${BUILDDIR32}
iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
- sh pkgscripts/makemacpkg -build32 ${BUILDDIR32} -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S}
+ sh pkgscripts/makemacpkg -build32 ${BUILDDIR32} -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S} -buildarmv8 ${BUILDDIRARMV8} -lipo "${LIPO}"
else
iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
- sh pkgscripts/makemacpkg -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S}
+ sh pkgscripts/makemacpkg -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S} -buildarmv8 ${BUILDDIRARMV8} -lipo "${LIPO}"
endif
diff --git a/release/makemacpkg.in b/release/makemacpkg.in
index d0edecb..7163757 100644
--- a/release/makemacpkg.in
+++ b/release/makemacpkg.in
@@ -17,7 +17,7 @@
usage()
{
- echo "$0 [-build32 [32-bit build dir]] [-buildarmv6 [ARM v6 build dir]] [-buildarmv7 [ARM v7 build dir]] [-buildarmv7s [ARM v7s build dir]]"
+ echo "$0 [-build32 [32-bit build dir]] [-buildarmv6 [ARMv6 build dir]] [-buildarmv7 [ARMv7 build dir]] [-buildarmv7s [ARMv7s build dir] [-buildarmv8 [ARMv8 build dir]] [-lipo [path to lipo]]"
exit 1
}
@@ -33,7 +33,10 @@
BUILDARMV7=0
BUILDDIRARMV7S=@abs_top_srcdir@/iosarmv7s
BUILDARMV7S=0
+BUILDDIRARMV8=@abs_top_srcdir@/iosarmv8
+BUILDARMV8=0
WITH_JAVA=@WITH_JAVA@
+LIPO=lipo
PREFIX=%{__prefix}
BINDIR=%{__bindir}
@@ -75,6 +78,21 @@
fi
fi
;;
+ -buildarmv8)
+ BUILDARMV8=1
+ if [ $# -gt 1 ]; then
+ if [[ ! "$2" =~ -.* ]]; then
+ BUILDDIRARMV8=$2; shift
+ fi
+ fi
+ ;;
+ -lipo)
+ if [ $# -gt 1 ]; then
+ if [[ ! "$2" =~ -.* ]]; then
+ LIPO=$2; shift
+ fi
+ fi
+ ;;
esac
shift
done
@@ -110,50 +128,50 @@
popd
if [ ! -h $TMPDIR/dist.x86/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib -a \
! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib ]; then
- lipo -create \
+ $LIPO -create \
-arch i386 $TMPDIR/dist.x86/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
-arch x86_64 $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
-output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib
elif [ ! -h $TMPDIR/dist.x86/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib -a \
! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib ]; then
- lipo -create \
+ $LIPO -create \
-arch i386 $TMPDIR/dist.x86/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
-arch x86_64 $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
-output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib
fi
- lipo -create \
+ $LIPO -create \
-arch i386 $TMPDIR/dist.x86/$LIBDIR/libjpeg.a \
-arch x86_64 $PKGROOT/$LIBDIR/libjpeg.a \
-output $PKGROOT/$LIBDIR/libjpeg.a
- lipo -create \
+ $LIPO -create \
-arch i386 $TMPDIR/dist.x86/$LIBDIR/libturbojpeg.0.dylib \
-arch x86_64 $PKGROOT/$LIBDIR/libturbojpeg.0.dylib \
-output $PKGROOT/$LIBDIR/libturbojpeg.0.dylib
- lipo -create \
+ $LIPO -create \
-arch i386 $TMPDIR/dist.x86/$LIBDIR/libturbojpeg.a \
-arch x86_64 $PKGROOT/$LIBDIR/libturbojpeg.a \
-output $PKGROOT/$LIBDIR/libturbojpeg.a
- lipo -create \
+ $LIPO -create \
-arch i386 $TMPDIR/dist.x86/$BINDIR/cjpeg \
-arch x86_64 $PKGROOT/$BINDIR/cjpeg \
-output $PKGROOT/$BINDIR/cjpeg
- lipo -create \
+ $LIPO -create \
-arch i386 $TMPDIR/dist.x86/$BINDIR/djpeg \
-arch x86_64 $PKGROOT/$BINDIR/djpeg \
-output $PKGROOT/$BINDIR/djpeg
- lipo -create \
+ $LIPO -create \
-arch i386 $TMPDIR/dist.x86/$BINDIR/jpegtran \
-arch x86_64 $PKGROOT/$BINDIR/jpegtran \
-output $PKGROOT/$BINDIR/jpegtran
- lipo -create \
+ $LIPO -create \
-arch i386 $TMPDIR/dist.x86/$BINDIR/tjbench \
-arch x86_64 $PKGROOT/$BINDIR/tjbench \
-output $PKGROOT/$BINDIR/tjbench
- lipo -create \
+ $LIPO -create \
-arch i386 $TMPDIR/dist.x86/$BINDIR/rdjpgcom \
-arch x86_64 $PKGROOT/$BINDIR/rdjpgcom \
-output $PKGROOT/$BINDIR/rdjpgcom
- lipo -create \
+ $LIPO -create \
-arch i386 $TMPDIR/dist.x86/$BINDIR/wrjpgcom \
-arch x86_64 $PKGROOT/$BINDIR/wrjpgcom \
-output $PKGROOT/$BINDIR/wrjpgcom
@@ -162,11 +180,11 @@
if [ $BUILDARMV6 = 1 ]; then
if [ ! -d $BUILDDIRARMV6 ]; then
- echo ERROR: ARM v6 build directory $BUILDDIRARMV6 does not exist
+ echo ERROR: ARMv6 build directory $BUILDDIRARMV6 does not exist
exit 1
fi
if [ ! -f $BUILDDIRARMV6/Makefile ]; then
- echo ERROR: ARM v6 build directory $BUILDDIRARMV6 is not configured
+ echo ERROR: ARMv6 build directory $BUILDDIRARMV6 is not configured
exit 1
fi
mkdir -p $TMPDIR/dist.armv6
@@ -175,50 +193,50 @@
popd
if [ ! -h $TMPDIR/dist.armv6/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib -a \
! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib ]; then
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
-arch arm $TMPDIR/dist.armv6/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
-output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib
elif [ ! -h $TMPDIR/dist.armv6/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib -a \
! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib ]; then
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
-arch arm $TMPDIR/dist.armv6/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
-output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib
fi
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libjpeg.a \
-arch arm $TMPDIR/dist.armv6/$LIBDIR/libjpeg.a \
-output $PKGROOT/$LIBDIR/libjpeg.a
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libturbojpeg.0.dylib \
-arch arm $TMPDIR/dist.armv6/$LIBDIR/libturbojpeg.0.dylib \
-output $PKGROOT/$LIBDIR/libturbojpeg.0.dylib
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libturbojpeg.a \
-arch arm $TMPDIR/dist.armv6/$LIBDIR/libturbojpeg.a \
-output $PKGROOT/$LIBDIR/libturbojpeg.a
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/cjpeg \
-arch arm $TMPDIR/dist.armv6/$BINDIR/cjpeg \
-output $PKGROOT/$BINDIR/cjpeg
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/djpeg \
-arch arm $TMPDIR/dist.armv6/$BINDIR/djpeg \
-output $PKGROOT/$BINDIR/djpeg
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/jpegtran \
-arch arm $TMPDIR/dist.armv6/$BINDIR/jpegtran \
-output $PKGROOT/$BINDIR/jpegtran
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/tjbench \
-arch arm $TMPDIR/dist.armv6/$BINDIR/tjbench \
-output $PKGROOT/$BINDIR/tjbench
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/rdjpgcom \
-arch arm $TMPDIR/dist.armv6/$BINDIR/rdjpgcom \
-output $PKGROOT/$BINDIR/rdjpgcom
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/wrjpgcom \
-arch arm $TMPDIR/dist.armv6/$BINDIR/wrjpgcom \
-output $PKGROOT/$BINDIR/wrjpgcom
@@ -226,11 +244,11 @@
if [ $BUILDARMV7 = 1 ]; then
if [ ! -d $BUILDDIRARMV7 ]; then
- echo ERROR: ARM v7 build directory $BUILDDIRARMV7 does not exist
+ echo ERROR: ARMv7 build directory $BUILDDIRARMV7 does not exist
exit 1
fi
if [ ! -f $BUILDDIRARMV7/Makefile ]; then
- echo ERROR: ARM v7 build directory $BUILDDIRARMV7 is not configured
+ echo ERROR: ARMv7 build directory $BUILDDIRARMV7 is not configured
exit 1
fi
mkdir -p $TMPDIR/dist.armv7
@@ -239,50 +257,50 @@
popd
if [ ! -h $TMPDIR/dist.armv7/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib -a \
! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib ]; then
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
-arch arm $TMPDIR/dist.armv7/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
-output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib
elif [ ! -h $TMPDIR/dist.armv7/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib -a \
! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib ]; then
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
-arch arm $TMPDIR/dist.armv7/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
-output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib
fi
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libjpeg.a \
-arch arm $TMPDIR/dist.armv7/$LIBDIR/libjpeg.a \
-output $PKGROOT/$LIBDIR/libjpeg.a
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libturbojpeg.0.dylib \
-arch arm $TMPDIR/dist.armv7/$LIBDIR/libturbojpeg.0.dylib \
-output $PKGROOT/$LIBDIR/libturbojpeg.0.dylib
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libturbojpeg.a \
-arch arm $TMPDIR/dist.armv7/$LIBDIR/libturbojpeg.a \
-output $PKGROOT/$LIBDIR/libturbojpeg.a
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/cjpeg \
-arch arm $TMPDIR/dist.armv7/$BINDIR/cjpeg \
-output $PKGROOT/$BINDIR/cjpeg
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/djpeg \
-arch arm $TMPDIR/dist.armv7/$BINDIR/djpeg \
-output $PKGROOT/$BINDIR/djpeg
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/jpegtran \
-arch arm $TMPDIR/dist.armv7/$BINDIR/jpegtran \
-output $PKGROOT/$BINDIR/jpegtran
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/tjbench \
-arch arm $TMPDIR/dist.armv7/$BINDIR/tjbench \
-output $PKGROOT/$BINDIR/tjbench
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/rdjpgcom \
-arch arm $TMPDIR/dist.armv7/$BINDIR/rdjpgcom \
-output $PKGROOT/$BINDIR/rdjpgcom
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/wrjpgcom \
-arch arm $TMPDIR/dist.armv7/$BINDIR/wrjpgcom \
-output $PKGROOT/$BINDIR/wrjpgcom
@@ -290,11 +308,11 @@
if [ $BUILDARMV7S = 1 ]; then
if [ ! -d $BUILDDIRARMV7S ]; then
- echo ERROR: ARM v7s build directory $BUILDDIRARMV7S does not exist
+ echo ERROR: ARMv7s build directory $BUILDDIRARMV7S does not exist
exit 1
fi
if [ ! -f $BUILDDIRARMV7S/Makefile ]; then
- echo ERROR: ARM v7s build directory $BUILDDIRARMV7S is not configured
+ echo ERROR: ARMv7s build directory $BUILDDIRARMV7S is not configured
exit 1
fi
mkdir -p $TMPDIR/dist.armv7s
@@ -303,55 +321,119 @@
popd
if [ ! -h $TMPDIR/dist.armv7s/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib -a \
! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib ]; then
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
-arch arm $TMPDIR/dist.armv7s/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
-output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib
elif [ ! -h $TMPDIR/dist.armv7s/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib -a \
! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib ]; then
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
-arch arm $TMPDIR/dist.armv7s/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
-output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib
fi
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libjpeg.a \
-arch arm $TMPDIR/dist.armv7s/$LIBDIR/libjpeg.a \
-output $PKGROOT/$LIBDIR/libjpeg.a
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libturbojpeg.0.dylib \
-arch arm $TMPDIR/dist.armv7s/$LIBDIR/libturbojpeg.0.dylib \
-output $PKGROOT/$LIBDIR/libturbojpeg.0.dylib
- lipo -create \
+ $LIPO -create \
$PKGROOT/$LIBDIR/libturbojpeg.a \
-arch arm $TMPDIR/dist.armv7s/$LIBDIR/libturbojpeg.a \
-output $PKGROOT/$LIBDIR/libturbojpeg.a
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/cjpeg \
-arch arm $TMPDIR/dist.armv7s/$BINDIR/cjpeg \
-output $PKGROOT/$BINDIR/cjpeg
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/djpeg \
-arch arm $TMPDIR/dist.armv7s/$BINDIR/djpeg \
-output $PKGROOT/$BINDIR/djpeg
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/jpegtran \
-arch arm $TMPDIR/dist.armv7s/$BINDIR/jpegtran \
-output $PKGROOT/$BINDIR/jpegtran
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/tjbench \
-arch arm $TMPDIR/dist.armv7s/$BINDIR/tjbench \
-output $PKGROOT/$BINDIR/tjbench
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/rdjpgcom \
-arch arm $TMPDIR/dist.armv7s/$BINDIR/rdjpgcom \
-output $PKGROOT/$BINDIR/rdjpgcom
- lipo -create \
+ $LIPO -create \
$PKGROOT/$BINDIR/wrjpgcom \
-arch arm $TMPDIR/dist.armv7s/$BINDIR/wrjpgcom \
-output $PKGROOT/$BINDIR/wrjpgcom
fi
+if [ $BUILDARMV8 = 1 ]; then
+ if [ ! -d $BUILDDIRARMV8 ]; then
+ echo ERROR: ARMv8 build directory $BUILDDIRARMV8 does not exist
+ exit 1
+ fi
+ if [ ! -f $BUILDDIRARMV8/Makefile ]; then
+ echo ERROR: ARMv8 build directory $BUILDDIRARMV8 is not configured
+ exit 1
+ fi
+ mkdir -p $TMPDIR/dist.armv8
+ pushd $BUILDDIRARMV8
+ make install DESTDIR=$TMPDIR/dist.armv8
+ popd
+ if [ ! -h $TMPDIR/dist.armv8/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib -a \
+ ! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib ]; then
+ $LIPO -create \
+ $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
+ -arch arm64 $TMPDIR/dist.armv8/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib \
+ -output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib
+ elif [ ! -h $TMPDIR/dist.armv8/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib -a \
+ ! -h $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib ]; then
+ $LIPO -create \
+ $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
+ -arch arm64 $TMPDIR/dist.armv8/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib \
+ -output $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.0.@SO_MINOR_VERSION@.dylib
+ fi
+ $LIPO -create \
+ $PKGROOT/$LIBDIR/libjpeg.a \
+ -arch arm64 $TMPDIR/dist.armv8/$LIBDIR/libjpeg.a \
+ -output $PKGROOT/$LIBDIR/libjpeg.a
+ $LIPO -create \
+ $PKGROOT/$LIBDIR/libturbojpeg.0.dylib \
+ -arch arm64 $TMPDIR/dist.armv8/$LIBDIR/libturbojpeg.0.dylib \
+ -output $PKGROOT/$LIBDIR/libturbojpeg.0.dylib
+ $LIPO -create \
+ $PKGROOT/$LIBDIR/libturbojpeg.a \
+ -arch arm64 $TMPDIR/dist.armv8/$LIBDIR/libturbojpeg.a \
+ -output $PKGROOT/$LIBDIR/libturbojpeg.a
+ $LIPO -create \
+ $PKGROOT/$BINDIR/cjpeg \
+ -arch arm64 $TMPDIR/dist.armv8/$BINDIR/cjpeg \
+ -output $PKGROOT/$BINDIR/cjpeg
+ $LIPO -create \
+ $PKGROOT/$BINDIR/djpeg \
+ -arch arm64 $TMPDIR/dist.armv8/$BINDIR/djpeg \
+ -output $PKGROOT/$BINDIR/djpeg
+ $LIPO -create \
+ $PKGROOT/$BINDIR/jpegtran \
+ -arch arm64 $TMPDIR/dist.armv8/$BINDIR/jpegtran \
+ -output $PKGROOT/$BINDIR/jpegtran
+ $LIPO -create \
+ $PKGROOT/$BINDIR/tjbench \
+ -arch arm64 $TMPDIR/dist.armv8/$BINDIR/tjbench \
+ -output $PKGROOT/$BINDIR/tjbench
+ $LIPO -create \
+ $PKGROOT/$BINDIR/rdjpgcom \
+ -arch arm64 $TMPDIR/dist.armv8/$BINDIR/rdjpgcom \
+ -output $PKGROOT/$BINDIR/rdjpgcom
+ $LIPO -create \
+ $PKGROOT/$BINDIR/wrjpgcom \
+ -arch arm64 $TMPDIR/dist.armv8/$BINDIR/wrjpgcom \
+ -output $PKGROOT/$BINDIR/wrjpgcom
+fi
+
install_name_tool -id $LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib $PKGROOT/$LIBDIR/libjpeg.@SO_MAJOR_VERSION@.dylib
install_name_tool -id $LIBDIR/libturbojpeg.0.dylib $PKGROOT/$LIBDIR/libturbojpeg.0.dylib