mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 23:59:53 +00:00
MacOS 32-bit compilation
This commit is contained in:
parent
0245ebe9f6
commit
ea2fc1fb03
@ -50,9 +50,19 @@ if [ "$1" == "rpi" ]; then
|
|||||||
elif [ "$1" == "mac" ]; then
|
elif [ "$1" == "mac" ]; then
|
||||||
[ -z "$march" ] && march=prescott;
|
[ -z "$march" ] && march=prescott;
|
||||||
[ -z "$mtune" ] && mtune=generic;
|
[ -z "$mtune" ] && mtune=generic;
|
||||||
[ -z "$CFLAGS" ] && CFLAGS="-fomit-frame-pointer";
|
[ -z "$CFLAGS" ] && CFLAGS="-m32 -arch i386 -fomit-frame-pointer";
|
||||||
|
[ -z "$LDFLAGS" ] && LDFLAGS=" ";
|
||||||
|
export RPATH="@executable_path/../lib"
|
||||||
|
OPENSSL_TARGET="darwin-i386-cc"
|
||||||
|
echo "[INFO] Compiling for Intel MacOS x86"
|
||||||
|
elif [ "$1" == "mac64" ]; then
|
||||||
|
[ -z "$march" ] && march=core2;
|
||||||
|
[ -z "$mtune" ] && mtune=generic;
|
||||||
|
[ -z "$CFLAGS" ] && CFLAGS="-m64 -arch x86_64 -fomit-frame-pointer";
|
||||||
|
[ -z "$LDFLAGS" ] && LDFLAGS=" ";
|
||||||
|
export RPATH="@executable_path/../lib"
|
||||||
OPENSSL_TARGET="darwin64-x86_64-cc"
|
OPENSSL_TARGET="darwin64-x86_64-cc"
|
||||||
echo "[INFO] Compiling for Intel MacOS"
|
echo "[INFO] Compiling for Intel MacOS x86_64"
|
||||||
elif [ "$1" == "ios" ]; then
|
elif [ "$1" == "ios" ]; then
|
||||||
[ -z "$march" ] && march=armv6;
|
[ -z "$march" ] && march=armv6;
|
||||||
[ -z "$mtune" ] && mtune=cortex-a8;
|
[ -z "$mtune" ] && mtune=cortex-a8;
|
||||||
|
@ -71,6 +71,29 @@ then
|
|||||||
export LIBTOOLIZE="$COMPILEDIR/mac/libtool/bin/libtoolize"
|
export LIBTOOLIZE="$COMPILEDIR/mac/libtool/bin/libtoolize"
|
||||||
$SCRIPT mac curl
|
$SCRIPT mac curl
|
||||||
|
|
||||||
|
tar -czf PHP_${PHP_VERSION}_x86_MacOS.tar.gz bin/
|
||||||
|
cp -r $COMPILEDIR/mac/{install.log,PHP_${PHP_VERSION}_x86_MacOS.tar.gz,install_data/*} $ARCHIVE/mac/
|
||||||
|
if [ ! -f $COMPILEDIR/mac/bin/php5/bin/php ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$COMPILE_MAC_64" = "true" ];
|
||||||
|
then
|
||||||
|
mkdir -p {$COMPILEDIR,$ARCHIVE}/mac
|
||||||
|
cd $COMPILEDIR/mac
|
||||||
|
|
||||||
|
curl -L http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz | tar -xz > /dev/null
|
||||||
|
cd libtool-2.4.2
|
||||||
|
./configure --prefix="$COMPILEDIR/mac/libtool" > /dev/null
|
||||||
|
make > /dev/null
|
||||||
|
make install
|
||||||
|
cd ../
|
||||||
|
rm -rf libtool-2.4.2
|
||||||
|
export LIBTOOL="$COMPILEDIR/mac/libtool/bin/libtool"
|
||||||
|
export LIBTOOLIZE="$COMPILEDIR/mac/libtool/bin/libtoolize"
|
||||||
|
$SCRIPT mac64 curl
|
||||||
|
|
||||||
tar -czf PHP_${PHP_VERSION}_x86-64_MacOS.tar.gz bin/
|
tar -czf PHP_${PHP_VERSION}_x86-64_MacOS.tar.gz bin/
|
||||||
cp -r $COMPILEDIR/mac/{install.log,PHP_${PHP_VERSION}_x86-64_MacOS.tar.gz,install_data/*} $ARCHIVE/mac/
|
cp -r $COMPILEDIR/mac/{install.log,PHP_${PHP_VERSION}_x86-64_MacOS.tar.gz,install_data/*} $ARCHIVE/mac/
|
||||||
if [ ! -f $COMPILEDIR/mac/bin/php5/bin/php ]; then
|
if [ ! -f $COMPILEDIR/mac/bin/php5/bin/php ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user