mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
also fix eduke32 on x86 and include a script for compiling all four versions, packing each into a fat binary and zipping the whole pack.
git-svn-id: https://svn.eduke32.com/eduke32@1907 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e1378c3020
commit
fdcfd8db0f
3 changed files with 80 additions and 3 deletions
|
@ -20,7 +20,7 @@ POLYMER = 1
|
|||
USE_OPENGL = 1
|
||||
NOASM = 0
|
||||
LINKED_GTK = 0
|
||||
BUILD32_ON_64 = 0
|
||||
BUILD32_ON_64 ?= 0
|
||||
# DO NOT SET THIS TO 1 AND COMMIT IT.
|
||||
NEDMALLOC = 0
|
||||
USE_LIBPNG = 0
|
||||
|
|
|
@ -146,9 +146,11 @@ static inline float nearbyintf(float x)
|
|||
|
||||
#elif defined(__APPLE__)
|
||||
#if defined __i386__ && defined __GNUC__
|
||||
// PK 20110617: isidigit() crashes for me in x86 code compiled from 64-bit.
|
||||
// PK 20110617: is*() crashes for me in x86 code compiled from 64-bit.
|
||||
// This hack patches all occurences.
|
||||
# define isdigit(c) ({ int32_t tmpc=c; tmpc>='0' && tmpc<='9';})
|
||||
# define isdigit(ch) ({ int32_t c__dontuse_=ch; c__dontuse_>='0' && c__dontuse_<='9'; })
|
||||
# define isalpha(ch) ({ int32_t c__dontuse2_=ch; (c__dontuse2_>='A' && c__dontuse2_<='Z') || (c__dontuse2_>='a' && c__dontuse2_<='z'); })
|
||||
# define isalnum(ch2) ({ int32_t c2__dontuse_=ch2; isalpha(c2__dontuse_) || isdigit(c2__dontuse_); })
|
||||
# endif
|
||||
# if defined(__LITTLE_ENDIAN__)
|
||||
# define B_LITTLE_ENDIAN 1
|
||||
|
|
75
polymer/eduke32/osxbuild.sh
Executable file
75
polymer/eduke32/osxbuild.sh
Executable file
|
@ -0,0 +1,75 @@
|
|||
#!/bin/sh
|
||||
|
||||
# build debug/release x86/x64 versions of mapster32 and eduke32 on OSX
|
||||
|
||||
if [ `uname -s` != Darwin ]; then
|
||||
echo This script is for OSX only.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
onlyzip=0
|
||||
|
||||
if [ $1 ]; then
|
||||
if [ $1 == onlyzip ]; then
|
||||
onlyzip=1
|
||||
else
|
||||
echo usage: osxbuild [onlyzip]
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $onlyzip -eq 0 ]; then
|
||||
make veryclean
|
||||
WITHOUT_GTK=1 RELEASE=0 BUILD32_ON_64=0 make -j 3
|
||||
if [ $? ]; then
|
||||
echo 64-bit debug build succeeded.
|
||||
cp mapster32 mapster32.debug.x64
|
||||
cp eduke32 eduke32.debug.x64
|
||||
else
|
||||
echo 64-bit debug build failed.
|
||||
fi
|
||||
|
||||
make veryclean
|
||||
WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=0 make -j 3
|
||||
if [ $? ]; then
|
||||
echo 64-bit release build succeeded.
|
||||
cp mapster32 mapster32.x64
|
||||
cp eduke32 eduke32.x64
|
||||
else
|
||||
echo 64-bit release build failed.
|
||||
fi
|
||||
|
||||
make veryclean
|
||||
WITHOUT_GTK=1 RELEASE=0 BUILD32_ON_64=1 make -j 3
|
||||
if [ $? ]; then
|
||||
echo 32-bit debug build succeeded.
|
||||
cp mapster32 mapster32.debug.x86
|
||||
cp eduke32 eduke32.debug.x86
|
||||
else
|
||||
echo 32-bit debug build failed.
|
||||
fi
|
||||
|
||||
make veryclean
|
||||
WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=1 make -j 3
|
||||
if [ $? ]; then
|
||||
echo 32-bit release build succeeded.
|
||||
cp mapster32 mapster32.x86
|
||||
cp eduke32 eduke32.x86
|
||||
else
|
||||
echo 32-bit release build failed.
|
||||
fi
|
||||
fi
|
||||
|
||||
# Almost done...
|
||||
if [ -f mapster32.debug.x64 ] && [ -f mapster32.x64 ] && [ -f eduke32.debug.x86 ] && [ -f eduke32.x86 ]; then
|
||||
echo Creating fat binaries.
|
||||
lipo -create mapster32.x64 mapster32.x86 -output mapster32
|
||||
lipo -create mapster32.debug.x64 mapster32.debug.x86 -output mapster32.debug
|
||||
lipo -create eduke32.x64 eduke32.x86 -output eduke32
|
||||
lipo -create eduke32.debug.x64 eduke32.debug.x86 -output eduke32.debug
|
||||
rev=`svn info | grep Revision | awk '{ print $2 }'`
|
||||
arfilename="eduke32-osx-$rev.zip"
|
||||
echo "This archive was produced from revision $rev by the osxbuild.sh script." > README.OSX
|
||||
rm -f "$arfilename"
|
||||
zip "$arfilename" mapster32 eduke32 README.OSX
|
||||
fi
|
Loading…
Reference in a new issue