Universal Binaries for SDL projects

Hello all,

Is there a list of those SDL projects (those listed on www.libsdl.org) that
have Universal Binaries?

Thanks,

Ryan

Hello all,

Is there a list of those SDL projects (those listed on www.libsdl.org) that
have Universal Binaries?

I don’t know of any at the moment, but I’ve put together a script that you
can use to make Unversal binaries of many open source projects…

./configure CC=“sh gcc-fat.sh

This will build them with 10.2 API compatibility on PowerPC and 10.4
compatbility on Intel, but you need to build all related projects the
same way.

Alternatively, you can try:
./configure CC=“gcc -arch ppc -arch i386”

This will build fat binaries with the current ABI.

See ya!
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment
-------------- next part --------------
#!/bin/sh#

Build Universal binaries on Mac OS X, thanks Ryan!

Usage: ./configure CC=“sh gcc-fat.sh” && make && rm -rf ppc x86

PowerPC compiler flags (10.2 runtime compatibility)

GCC_COMPILE_PPC=“gcc-3.3 -arch ppc
-DMAC_OS_X_VERSION_MIN_REQUIRED=1020
-nostdinc
-F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks
-I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3
-isystem /Developer/SDKs/MacOSX10.2.8.sdk/usr/include”

GCC_LINK_PPC="
-L/Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3
-F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk"

Intel compiler flags (10.4 runtime compatibility)

GCC_COMPILE_X86=“gcc-4.0 -arch i386 -mmacosx-version-min=10.4
-DMAC_OS_X_VERSION_MIN_REQUIRED=1040
-nostdinc
-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks
-I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/include
-isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include”

GCC_LINK_X86="
-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.0
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"

Output both PowerPC and Intel object files

args="$"
compile=yes
link=yes
while test x$1 != x; do
case $1 in
–version) exec gcc $1;;
-v) exec gcc $1;;
-V) exec gcc $1;;
-print-prog-name=
) exec gcc $1;;
-print-search-dirs) exec gcc $1;;
-E) GCC_COMPILE_PPC="$GCC_COMPILE_PPC -E"
GCC_COMPILE_X86="$GCC_COMPILE_X86 -E"
compile=no; link=no;;
-c) link=no;;
-o) output=$2;;
.c|.cc|.cpp|.S) source=$1;;
esac
shift
done
if test x$link = xyes; then
GCC_COMPILE_PPC="$GCC_COMPILE_PPC $GCC_LINK_PPC"
GCC_COMPILE_X86="$GCC_COMPILE_X86 $GCC_LINK_X86"
fi
if test x"$output" = x; then
if test x$link = xyes; then
output=a.out
elif test x$compile = xyes; then
output=echo $source | sed -e 's|.*/||' -e 's|\(.*\)\.[^\.]*|\1|'.o
fi
fi

if test x"$output" != x; then
dir=ppc/dirname $output
if test -d $dir; then
:
else
mkdir -p $dir
fi
fi
set – $args
while test x$1 != x; do
if test -f “ppc/$1” && test “$1” != “$output”; then
ppc_args="$ppc_args ppc/$1"
else
ppc_args="$ppc_args $1"
fi
shift
done
$GCC_COMPILE_PPC $ppc_args || exit $?
if test x"$output" != x; then
cp $output ppc/$output
fi

if test x"$output" != x; then
dir=x86/dirname $output
if test -d $dir; then
:
else
mkdir -p $dir
fi
fi
set – $args
while test x$1 != x; do
if test -f “x86/$1” && test “$1” != “$output”; then
x86_args="$x86_args x86/$1"
else
x86_args="$x86_args $1"
fi
shift
done
$GCC_COMPILE_X86 $x86_args || exit $?
if test x"$output" != x; then
cp $output x86/$output
fi

if test x"$output" != x; then
lipo -create -o $output ppc/$output x86/$output
fi

Wow…thanks Sam!
Incase you were wondering, I’m trying to build SDL_ttf as a universal. My
newest snag is the FreeType library (which does not seem to have universal
support, so I’m gonna have to build that).

Thanks agian,

Ryan

“Sam Lantinga” wrote in message
news:E1FaZIm-0006gh-KY at twomix.devolution.com…>> Hello all,

Is there a list of those SDL projects (those listed on www.libsdl.org)
that
have Universal Binaries?

I don’t know of any at the moment, but I’ve put together a script that you
can use to make Unversal binaries of many open source projects…

./configure CC=“sh gcc-fat.sh

This will build them with 10.2 API compatibility on PowerPC and 10.4
compatbility on Intel, but you need to build all related projects the
same way.

Alternatively, you can try:
./configure CC=“gcc -arch ppc -arch i386”

This will build fat binaries with the current ABI.

See ya!
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment


#!/bin/sh

Build Universal binaries on Mac OS X, thanks Ryan!

Usage: ./configure CC=“sh gcc-fat.sh” && make && rm -rf ppc x86

PowerPC compiler flags (10.2 runtime compatibility)

GCC_COMPILE_PPC=“gcc-3.3 -arch ppc
-DMAC_OS_X_VERSION_MIN_REQUIRED=1020
-nostdinc
-F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks
-I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3
-isystem /Developer/SDKs/MacOSX10.2.8.sdk/usr/include”

GCC_LINK_PPC="
-L/Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3
-F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk"

Intel compiler flags (10.4 runtime compatibility)

GCC_COMPILE_X86=“gcc-4.0 -arch i386 -mmacosx-version-min=10.4
-DMAC_OS_X_VERSION_MIN_REQUIRED=1040
-nostdinc
-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks
-I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/include

-isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include”

GCC_LINK_X86="
-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.0
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"

Output both PowerPC and Intel object files

args="$"
compile=yes
link=yes
while test x$1 != x; do
case $1 in
–version) exec gcc $1;;
-v) exec gcc $1;;
-V) exec gcc $1;;
-print-prog-name=
) exec gcc $1;;
-print-search-dirs) exec gcc $1;;
-E) GCC_COMPILE_PPC="$GCC_COMPILE_PPC -E"
GCC_COMPILE_X86="$GCC_COMPILE_X86 -E"
compile=no; link=no;;
-c) link=no;;
-o) output=$2;;
.c|.cc|.cpp|.S) source=$1;;
esac
shift
done
if test x$link = xyes; then
GCC_COMPILE_PPC="$GCC_COMPILE_PPC $GCC_LINK_PPC"
GCC_COMPILE_X86="$GCC_COMPILE_X86 $GCC_LINK_X86"
fi
if test x"$output" = x; then
if test x$link = xyes; then
output=a.out
elif test x$compile = xyes; then
output=echo $source | sed -e 's|.*/||' -e 's|\(.*\)\.[^\.]*|\1|'.o
fi
fi

if test x"$output" != x; then
dir=ppc/dirname $output
if test -d $dir; then
:
else
mkdir -p $dir
fi
fi
set – $args
while test x$1 != x; do
if test -f “ppc/$1” && test “$1” != “$output”; then
ppc_args="$ppc_args ppc/$1"
else
ppc_args="$ppc_args $1"
fi
shift
done
$GCC_COMPILE_PPC $ppc_args || exit $?
if test x"$output" != x; then
cp $output ppc/$output
fi

if test x"$output" != x; then
dir=x86/dirname $output
if test -d $dir; then
:
else
mkdir -p $dir
fi
fi
set – $args
while test x$1 != x; do
if test -f “x86/$1” && test “$1” != “$output”; then
x86_args="$x86_args x86/$1"
else
x86_args="$x86_args $1"
fi
shift
done
$GCC_COMPILE_X86 $x86_args || exit $?
if test x"$output" != x; then
cp $output x86/$output
fi

if test x"$output" != x; then
lipo -create -o $output ppc/$output x86/$output
fi



SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Wow…thanks Sam!
Incase you were wondering, I’m trying to build SDL_ttf as a universal. My
newest snag is the FreeType library (which does not seem to have universal
support, so I’m gonna have to build that).

Yeah, I just did that last night, using that script.

Thanks agian,

My pleasure!
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Hello !

Wow…thanks Sam!
Incase you were wondering, I’m trying to build SDL_ttf as a universal. My
newest snag is the FreeType library (which does not seem to have
universal support, so I’m gonna have to build that).

To get a Universal Binary from FreeType just install
the “i-installer” and install FreeType from that.

It has the static and dynm. libs.

The “i-installer” also has PNG, TIFF, JPEG Univ. binaries,
but only with static libs.

CU

I’ll give that a whirl. Thanks!

“Torsten Giebl” wrote in message
news:49712.195.179.206.103.1146497925.squirrel at mail.syntheticsw.com…> Hello !

Wow…thanks Sam!
Incase you were wondering, I’m trying to build SDL_ttf as a universal.
My
newest snag is the FreeType library (which does not seem to have
universal support, so I’m gonna have to build that).

To get a Universal Binary from FreeType just install
the “i-installer” and install FreeType from that.

It has the static and dynm. libs.

The “i-installer” also has PNG, TIFF, JPEG Univ. binaries,
but only with static libs.

CU

Wow…thanks Sam!
Incase you were wondering, I’m trying to build SDL_ttf as a
universal. My
newest snag is the FreeType library (which does not seem to have
universal
support, so I’m gonna have to build that).

I have built a Universal port of PIL 1.1.5 (Python Imaging Library)
the requires a universal freetype2.
So if you have trouble getting the LDFLAGS and CFLAGS right let me know.

Daniel

“Few people are capable of expressing with equanimity opinions which
differ from the prejudices of their social environment. Most people
are not even capable of forming such opinions.”

  • EinsteinOn May 1, 2006, at 8:35, Sam Lantinga wrote:

Hello !

Has anybody tried to get a UB from SMPEG ?

CU

Off topic, but any help is greatly appreciated.

I’m trying to understand i-installer (I’m a windows guy mainly).
I installed it and then installed the FreeType2 package. But after that,
how do I get access to the libs?

Thanks,

Ryan

“Torsten Giebl” wrote in message
news:49712.195.179.206.103.1146497925.squirrel at mail.syntheticsw.com…> Hello !

Wow…thanks Sam!
Incase you were wondering, I’m trying to build SDL_ttf as a universal.
My
newest snag is the FreeType library (which does not seem to have
universal support, so I’m gonna have to build that).

To get a Universal Binary from FreeType just install
the “i-installer” and install FreeType from that.

It has the static and dynm. libs.

The “i-installer” also has PNG, TIFF, JPEG Univ. binaries,
but only with static libs.

CU

Hello !

Has anybody tried to get a UB from SMPEG ?

Yep, I did that too. Grab the latest CVS from icculus.org.

See ya!
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Nevermind…figured it out. I think. I made sure to get the fat version.
Seems to have solved my problems (just not used to packages and bundles, I
guess).

Ryan

“Michael Ryan Bannon” <ryan.bannon at humagade.com> wrote in message
news:e35dnm$ont$1 at sea.gmane.org…> Off topic, but any help is greatly appreciated.

I’m trying to understand i-installer (I’m a windows guy mainly).
I installed it and then installed the FreeType2 package. But after that,
how do I get access to the libs?

Thanks,

Ryan

“Torsten Giebl” wrote in message
news:49712.195.179.206.103.1146497925.squirrel at mail.syntheticsw.com

Hello !

Wow…thanks Sam!
Incase you were wondering, I’m trying to build SDL_ttf as a universal.
My
newest snag is the FreeType library (which does not seem to have
universal support, so I’m gonna have to build that).

To get a Universal Binary from FreeType just install
the “i-installer” and install FreeType from that.

It has the static and dynm. libs.

The “i-installer” also has PNG, TIFF, JPEG Univ. binaries,
but only with static libs.

CU

Hello !

SDL_rtf gives me an error, it is not
able to find the installed SDL_ttf.
Freetype and SDL_ttf work without problems.

CU

Hello !

SDL_rtf gives me an error, it is not
able to find the installed SDL_ttf. Freetype and SDL_ttf work without
problems.

Okay, now it works. I had to do
export CFLAGS="-I/usr/local/include/freetype2"
before doing ./configure …

CU

Hello !

Okay, now it works. I had to do
export CFLAGS="-I/usr/local/include/freetype2" before doing ./configure …

Sorry, for the posting. But this does not solved the
problem. I looked at the Binarys after that with lipo -info
and they were ppc only.

All the other SDL_… are working fine.

CU